From 8c10fde8cb81f16b2b8ff4fda4bc0dee36909f12 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 17 Aug 2008 11:03:02 -0400 Subject: [PATCH] PO 2.34 --- CHANGES | 221 +- COPYING | 848 +++-- README | 29 +- doc/configure.html | 320 -- doc/css/screen.css | 188 -- doc/images/background.png | Bin 144 -> 0 bytes doc/images/box.bottom.gif | Bin 36 -> 0 bytes doc/images/box.bottom.left.gif | Bin 109 -> 0 bytes doc/images/box.bottom.right.gif | Bin 110 -> 0 bytes doc/images/box.left.gif | Bin 36 -> 0 bytes doc/images/box.right.gif | Bin 36 -> 0 bytes doc/images/box.top.gif | Bin 50 -> 0 bytes doc/images/box.top.header.gif | Bin 38 -> 0 bytes doc/images/box.top.header.left.gif | Bin 123 -> 0 bytes doc/images/box.top.header.right.gif | Bin 123 -> 0 bytes doc/images/box.top.left.gif | Bin 111 -> 0 bytes doc/images/box.top.right.gif | Bin 110 -> 0 bytes doc/images/gnome-warning.png | Bin 1968 -> 0 bytes doc/images/gray.pixel.gif | Bin 61 -> 0 bytes doc/images/icon.jpg | Bin 416 -> 0 bytes doc/images/logo.gif | Bin 5955 -> 0 bytes doc/images/white.pixel.png | Bin 151 -> 0 bytes doc/index.html | 198 -- doc/install.html | 264 -- doc/license.html | 464 --- doc/migration.html | 194 -- doc/openbsd.html | 469 --- doc/test.html | 265 -- doc/uninstall.html | 172 -- old_install | 619 ---- src/COPYING | 340 --- src/admin.php | 47 +- src/admin.system.edit.2.php | 58 - src/admin.system.edit.php | 119 - src/admin.user.del.2.php | 551 +--- src/admin.user.del.php | 67 +- src/admin.user.edit.2.php | 60 +- src/admin.user.edit.php | 90 +- src/admin.volume.edit.2.php | 103 +- src/admin.volume.edit.php | 51 +- src/album.add.2.php | 52 +- src/album.add.php | 97 +- src/album.del.2.php | 37 +- src/album.del.php | 107 +- src/album.edit.2.php | 38 +- src/album.edit.php | 142 +- src/album.php | 390 +-- src/basket.content.php | 85 - src/basket.php | 295 -- src/bulk.update.php | 380 ++- src/camera.add.2.php | 68 +- src/camera.add.php | 173 +- src/camera.del.php | 80 +- src/camera.edit.2.php | 72 +- src/camera.edit.php | 188 +- src/clidemo.php | 293 -- src/client.del.2.php | 25 +- src/client.del.php | 80 +- src/client.edit.2.php | 31 +- src/client.edit.php | 66 +- src/content.indexer.php | 64 +- src/copyright.php | 442 +-- src/event.add.2.php | 27 +- src/event.add.php | 54 +- src/event.del.2.php | 40 +- src/event.del.php | 55 +- src/event.edit.2.php | 27 +- src/event.edit.php | 56 +- src/event.php | 47 +- src/export.2.php | 14 +- src/export.php | 247 +- src/film.add.2.php | 32 +- src/film.add.php | 141 +- src/film.del.php | 75 +- src/film.edit.2.php | 54 +- src/film.edit.php | 173 +- src/folder.add.2.php | 53 +- src/folder.add.php | 82 +- src/folder.content.php | 396 ++- src/folder.del.2.php | 29 +- src/folder.del.php | 84 +- src/folder.edit.2.php | 30 +- src/folder.edit.php | 98 +- src/folder.php | 429 +-- src/help.php | 66 +- src/help/admin.html | 2 +- src/help/content.html | 3 +- src/help/datebook.html | 2 +- src/help/folders.albums.html | 2 +- src/help/front.page.html | 2 +- src/help/login.html | 2 +- src/help/photo.html | 2 +- src/help/print.html | 2 +- src/help/profile.html | 2 +- src/help/registration.html | 2 +- src/help/search.html | 2 +- src/help/settings.html | 2 +- src/help/shop.html | 74 - src/help/tools.html | 2 +- src/image.display.php | 268 +- src/include/admin.php | 244 +- src/include/barcode.php | 2 +- src/include/calendar.php | 191 +- src/include/color.php | 196 +- src/include/common.php | 2717 ++++++++++------- src/include/config.php | 167 +- src/include/config_site.php.dist | 13 +- src/include/contacts.php | 120 +- src/include/database.php | 10 +- src/include/datebook.php | 312 +- src/include/exif.php | 516 ++-- src/include/exifer/canon.tags | 93 - src/include/exifer/exif.php | 1033 ------- src/include/exifer/fuji.tags | Bin 2376 -> 0 bytes src/include/exifer/index.php | 25 - src/include/exifer/kodak.tags | 58 - src/include/exifer/makers/canon.php | 324 -- src/include/exifer/makers/fujifilm.php | 257 -- src/include/exifer/makers/gps.php | 228 -- src/include/exifer/makers/nikon.php | 331 -- src/include/exifer/makers/olympus.php | 178 -- src/include/exifer/makers/sanyo.php | 168 - src/include/exifer/nikon.tags | 60 - src/include/exifer/olympus.tags | 67 - src/include/exifer/unified.tags | Bin 5237 -> 0 bytes src/include/export.php | 59 +- src/include/import.php | 1358 +++++--- src/include/iptc.php | 270 +- src/include/mail.php | 347 +-- src/include/mime.php | 276 +- src/include/orderby.php | 115 +- src/include/print.pdf.php | 2 +- src/include/print.ps.php | 8 +- src/include/profile.php | 536 ++-- src/include/rdf.php | 657 +--- src/include/search.2.php | 38 +- src/include/search.php | 111 +- src/include/settings.php | 34 - src/include/site.php | 622 ++-- src/include/tools.php | 603 +--- src/include/vars.php | 134 +- src/index.php | 98 +- src/index.store.php | 45 - src/install.php | 441 ++- src/java/search.color/ColorSearch.java | 2 +- src/java/search.layout/LayoutSearch.java | 2 +- src/javascript/jscalendar/calendar.js | 3 +- src/javascript/jscalendar/lang/calendar-de.js | 4 + src/javascript/jscalendar/lang/calendar-fr.js | 252 +- src/javascript/jscalendar/lang/calendar-nl.js | 200 +- src/javascript/select.js | 43 +- src/javascript/util.js | 25 - src/javascript/wz_tooltip.js | 1477 ++++++--- src/label.add.2.php | 24 +- src/label.add.php | 50 +- src/label.del.2.php | 51 - src/label.del.php | 80 +- src/label.edit.2.php | 30 +- src/label.edit.php | 57 +- src/lens.add.2.php | 39 +- src/lens.add.php | 173 +- src/lens.del.php | 76 +- src/lens.edit.2.php | 65 +- src/lens.edit.php | 209 +- src/location.add.2.php | 18 +- src/location.add.php | 58 +- src/location.del.2.php | 27 +- src/location.del.php | 82 +- src/location.edit.2.php | 24 +- src/location.edit.php | 72 +- src/login.php | 286 +- src/manufacturer.add.2.php | 18 +- src/manufacturer.add.php | 40 +- src/manufacturer.del.2.php | 22 +- src/manufacturer.del.php | 65 +- src/manufacturer.edit.2.php | 23 +- src/manufacturer.edit.php | 47 +- src/my.datebook.php | 413 +-- src/my.folder.php | 56 - src/my.profile.php | 33 +- src/my.settings.php | 991 +++--- src/my.tools.php | 56 +- src/photo.add.2.php | 307 +- src/photo.add.php | 356 +-- src/photo.dupe.add.2.php | 26 +- src/photo.dupe.add.php | 88 +- src/photo.dupe.del.2.php | 43 +- src/photo.dupe.del.php | 102 +- src/photo.dupe.edit.2.php | 24 +- src/photo.dupe.edit.php | 99 +- src/photo.edit.2.php | 137 +- src/photo.edit.php | 209 +- src/photo.item.add.2.php | 46 - src/photo.item.add.php | 130 - src/photo.item.del.2.php | 50 - src/photo.item.del.php | 116 - src/photo.item.edit.2.php | 49 - src/photo.item.edit.php | 133 - src/photo.move.php | 417 ++- src/photo.php | 1534 ++++------ src/photo.print.2.php | 1 - src/photo.rating.add.2.php | 46 +- src/photo.rating.add.php | 100 +- src/photo.rating.del.2.php | 30 +- src/photo.rating.del.php | 71 +- src/photo.rating.edit.2.php | 37 +- src/photo.rating.edit.php | 76 +- src/photo.submission.add.2.php | 52 - src/photo.submission.add.php | 124 - src/photo.submission.del.2.php | 51 - src/photo.submission.del.php | 127 - src/photo.submission.edit.2.php | 56 - src/photo.submission.edit.php | 142 - src/photo.version.add.2.php | 44 +- src/photo.version.add.php | 93 +- src/photo.version.del.2.php | 65 +- src/photo.version.del.php | 84 +- src/photo.version.edit.2.php | 132 +- src/photo.version.edit.php | 92 +- src/po.dtd | 16 +- src/print.2.php | 125 +- src/print.php | 297 +- src/profile.add.2.php | 37 +- src/profile.add.php | 167 +- src/profile.del.2.php | 16 +- src/profile.del.php | 74 +- src/profile.edit.2.php | 16 +- src/profile.edit.php | 142 +- src/register.php | 343 +-- src/save.front.page.php | 18 +- src/search.image.color.php | 81 +- src/search.image.layout.php | 84 +- src/search.image.php | 8 +- src/search.php | 23 +- src/search.sidebar.php | 493 --- src/search.text.advanced.php | 360 +-- src/search.text.general.php | 374 +-- src/shop.category.add.2.php | 43 - src/shop.category.add.php | 65 - src/shop.category.del.2.php | 51 - src/shop.category.del.php | 89 - src/shop.category.edit.2.php | 54 - src/shop.category.edit.php | 80 - src/shop.item.add.2.php | 44 - src/shop.item.add.php | 73 - src/shop.item.del.2.php | 51 - src/shop.item.del.php | 97 - src/shop.item.edit.2.php | 58 - src/shop.item.edit.php | 93 - src/shop.item.generator.add.2.php | 53 - src/shop.item.generator.add.php | 115 - src/shop.item.generator.del.2.php | 52 - src/shop.item.generator.del.php | 97 - src/shop.item.generator.edit.2.php | 68 - src/shop.item.generator.edit.php | 130 - src/shop.item.generator.php | 146 - src/shop.order.edit.php | 86 - src/shop.order.php | 207 -- src/shop.php | 99 - src/sql/po.data.02.05.sql | 2 +- src/sql/po.data.02.05.to.02.06.sql | 2 +- src/sql/po.data.02.06.to.02.07.sql | 2 +- src/sql/po.data.02.07.to.02.08.sql | 2 +- src/sql/po.data.02.08.to.02.09.sql | 2 +- src/sql/po.data.02.09.to.02.10.sql | 2 +- src/sql/po.data.02.10.to.02.11.sql | 2 +- src/sql/po.data.02.11.to.02.12.sql | 2 +- src/sql/po.data.02.12.to.02.13.sql | 2 +- src/sql/po.data.02.13.to.02.14.sql | 2 +- src/sql/po.data.02.14.to.02.15.sql | 2 +- src/sql/po.data.02.15.to.02.16.sql | 2 +- src/sql/po.data.02.16.to.02.17.sql | 2 +- src/sql/po.data.02.17.to.02.18.sql | 2 +- src/sql/po.data.02.18.to.02.19.sql | 2 +- src/sql/po.data.02.19.to.02.20.sql | 2 +- src/sql/po.data.02.20.to.02.21.sql | 2 +- src/sql/po.data.02.21.to.02.22.sql | 2 +- src/sql/po.data.02.22.to.02.23.sql | 2 +- src/sql/po.data.02.23.to.02.24.sql | 2 +- src/sql/po.data.02.24.to.02.25.sql | 2 +- src/sql/po.data.02.25.to.02.26.sql | 2 +- src/sql/po.data.02.26.to.02.27.sql | 2 +- src/sql/po.data.02.27.to.02.28.sql | 2 +- src/sql/po.data.02.28.to.02.29.sql | 2 +- src/sql/po.data.02.29.to.02.30.sql | 2 +- src/sql/po.data.02.30.to.02.31.sql | 2 +- src/sql/po.data.02.31.to.02.32.sql | 2 +- src/sql/po.data.02.32.to.02.33.sql | 2 +- src/sql/po.db.02.05.sql | 2 +- src/sql/po.db.02.05.to.02.06.sql | 2 +- src/sql/po.db.02.06.to.02.07.sql | 2 +- src/sql/po.db.02.07.to.02.08.sql | 2 +- src/sql/po.db.02.08.to.02.09.sql | 2 +- src/sql/po.db.02.09.to.02.10.sql | 2 +- src/sql/po.db.02.10.to.02.11.sql | 2 +- src/sql/po.db.02.11.to.02.12.sql | 2 +- src/sql/po.db.02.12.to.02.13.sql | 2 +- src/sql/po.db.02.13.to.02.14.sql | 2 +- src/sql/po.db.02.14.to.02.15.sql | 2 +- src/sql/po.db.02.15.to.02.16.sql | 2 +- src/sql/po.db.02.16.to.02.17.sql | 2 +- src/sql/po.db.02.17.to.02.18.sql | 2 +- src/sql/po.db.02.18.to.02.19.sql | 2 +- src/sql/po.db.02.19.to.02.20.sql | 2 +- src/sql/po.db.02.20.to.02.21.sql | 2 +- src/sql/po.db.02.21.to.02.22.sql | 2 +- src/sql/po.db.02.22.to.02.23.sql | 2 +- src/sql/po.db.02.23.to.02.24.sql | 2 +- src/sql/po.db.02.24.to.02.25.sql | 2 +- src/sql/po.db.02.25.to.02.26.sql | 2 +- src/sql/po.db.02.26.to.02.27.sql | 2 +- src/sql/po.db.02.27.to.02.28.sql | 2 +- src/sql/po.db.02.28.to.02.29.sql | 2 +- src/sql/po.db.02.29.to.02.30.sql | 2 +- src/sql/po.db.02.30.to.02.31.sql | 2 +- src/sql/po.db.02.31.to.02.32.sql | 5 +- src/sql/po.db.02.32.to.02.33.sql | 2 +- src/subscription.add.2.php | 41 +- src/subscription.add.php | 83 +- src/subscription.del.php | 76 +- src/themes/aqua/background.png | Bin 144 -> 0 bytes src/themes/aqua/button.add.client.gif | Bin 1149 -> 0 bytes src/themes/aqua/button.add.duplicate.gif | Bin 1495 -> 0 bytes src/themes/aqua/button.add.folder.gif | Bin 1144 -> 0 bytes src/themes/aqua/button.add.gif | Bin 751 -> 0 bytes src/themes/aqua/button.add.manufacturer.gif | Bin 1457 -> 0 bytes src/themes/aqua/button.add.photos.gif | Bin 1158 -> 0 bytes src/themes/aqua/button.apply.changes.gif | Bin 1547 -> 0 bytes src/themes/aqua/button.back.gif | Bin 850 -> 0 bytes src/themes/aqua/button.cancel.gif | Bin 937 -> 0 bytes src/themes/aqua/button.clear.gif | Bin 863 -> 0 bytes src/themes/aqua/button.confirm.delete.gif | Bin 1192 -> 0 bytes src/themes/aqua/button.confirm.purchase.gif | Bin 1359 -> 0 bytes .../aqua/button.confirm.subscription.gif | Bin 1717 -> 0 bytes src/themes/aqua/button.continue.gif | Bin 1021 -> 0 bytes src/themes/aqua/button.convert.gif | Bin 976 -> 0 bytes src/themes/aqua/button.delete.gif | Bin 846 -> 0 bytes src/themes/aqua/button.deselect.all.gif | Bin 1154 -> 0 bytes src/themes/aqua/button.edit.gif | Bin 725 -> 0 bytes src/themes/aqua/button.empty.trash.gif | Bin 1158 -> 0 bytes src/themes/aqua/button.export.gif | Bin 897 -> 0 bytes src/themes/aqua/button.filter.gif | Bin 813 -> 0 bytes src/themes/aqua/button.goto.gif | Bin 833 -> 0 bytes src/themes/aqua/button.goto.this.month.gif | Bin 1091 -> 0 bytes src/themes/aqua/button.goto.this.week.gif | Bin 1103 -> 0 bytes src/themes/aqua/button.goto.today.gif | Bin 903 -> 0 bytes src/themes/aqua/button.hide.equipment.gif | Bin 1287 -> 0 bytes src/themes/aqua/button.link.to.gif | Bin 927 -> 0 bytes src/themes/aqua/button.list.view.gif | Bin 1036 -> 0 bytes src/themes/aqua/button.login.gif | Bin 871 -> 0 bytes src/themes/aqua/button.logout.gif | Bin 943 -> 0 bytes src/themes/aqua/button.move.to.gif | Bin 983 -> 0 bytes src/themes/aqua/button.order.by.gif | Bin 1018 -> 0 bytes src/themes/aqua/button.print.gif | Bin 827 -> 0 bytes .../aqua/button.put.selection.to.basket.gif | Bin 1579 -> 0 bytes src/themes/aqua/button.register.gif | Bin 1243 -> 0 bytes src/themes/aqua/button.remove.gif | Bin 983 -> 0 bytes src/themes/aqua/button.rotate.gif | Bin 927 -> 0 bytes src/themes/aqua/button.save.changes.gif | Bin 1213 -> 0 bytes src/themes/aqua/button.search.gif | Bin 872 -> 0 bytes src/themes/aqua/button.select.all.gif | Bin 1044 -> 0 bytes src/themes/aqua/button.set.as.watermark.gif | Bin 2184 -> 0 bytes src/themes/aqua/button.show.equipment.gif | Bin 1354 -> 0 bytes src/themes/aqua/button.slide.view.gif | Bin 1107 -> 0 bytes src/themes/aqua/button.submit.gif | Bin 938 -> 0 bytes src/themes/aqua/button.submit.to.gif | Bin 1039 -> 0 bytes src/themes/aqua/button.subscribe.gif | Bin 1087 -> 0 bytes src/themes/aqua/button.update.basket.gif | Bin 1267 -> 0 bytes src/themes/aqua/button.view.basket.gif | Bin 1188 -> 0 bytes src/themes/aqua/frame.bottom.edge.gif | Bin 89 -> 0 bytes src/themes/aqua/frame.bottom.left.gif | Bin 211 -> 0 bytes src/themes/aqua/frame.bottom.right.gif | Bin 208 -> 0 bytes src/themes/aqua/frame.left.edge.gif | Bin 77 -> 0 bytes src/themes/aqua/frame.right.edge.gif | Bin 76 -> 0 bytes src/themes/aqua/frame.top.edge.gif | Bin 90 -> 0 bytes src/themes/aqua/frame.top.left.gif | Bin 153 -> 0 bytes src/themes/aqua/frame.top.right.gif | Bin 158 -> 0 bytes src/themes/aqua/navigator.ad.frontpage.a.gif | Bin 1114 -> 0 bytes src/themes/aqua/navigator.ad.frontpage.gif | Bin 1096 -> 0 bytes .../aqua/navigator.ad.image.repository.a.gif | Bin 1413 -> 0 bytes .../aqua/navigator.ad.image.repository.gif | Bin 1397 -> 0 bytes .../navigator.ad.new.user.preferences.a.gif | Bin 1545 -> 0 bytes .../navigator.ad.new.user.preferences.gif | Bin 1529 -> 0 bytes .../aqua/navigator.ad.users.and.clients.a.gif | Bin 1298 -> 0 bytes .../aqua/navigator.ad.users.and.clients.gif | Bin 1281 -> 0 bytes src/themes/aqua/navigator.db.clients.a.gif | Bin 941 -> 0 bytes src/themes/aqua/navigator.db.clients.gif | Bin 930 -> 0 bytes .../aqua/navigator.db.pending.orders.a.gif | Bin 1327 -> 0 bytes .../aqua/navigator.db.pending.orders.gif | Bin 1310 -> 0 bytes src/themes/aqua/navigator.db.shipments.a.gif | Bin 1120 -> 0 bytes src/themes/aqua/navigator.db.shipments.gif | Bin 1107 -> 0 bytes src/themes/aqua/navigator.eq.camera.a.gif | Bin 1019 -> 0 bytes src/themes/aqua/navigator.eq.camera.gif | Bin 1012 -> 0 bytes src/themes/aqua/navigator.eq.film.a.gif | Bin 846 -> 0 bytes src/themes/aqua/navigator.eq.film.gif | Bin 630 -> 0 bytes src/themes/aqua/navigator.eq.filter.a.gif | Bin 910 -> 0 bytes src/themes/aqua/navigator.eq.filter.gif | Bin 899 -> 0 bytes src/themes/aqua/navigator.eq.flash.a.gif | Bin 979 -> 0 bytes src/themes/aqua/navigator.eq.flash.gif | Bin 967 -> 0 bytes src/themes/aqua/navigator.eq.label.a.gif | Bin 913 -> 0 bytes src/themes/aqua/navigator.eq.label.gif | Bin 896 -> 0 bytes src/themes/aqua/navigator.eq.lens.a.gif | Bin 930 -> 0 bytes src/themes/aqua/navigator.eq.lens.gif | Bin 916 -> 0 bytes src/themes/aqua/navigator.eq.location.a.gif | Bin 1032 -> 0 bytes src/themes/aqua/navigator.eq.location.gif | Bin 1020 -> 0 bytes .../aqua/navigator.eq.manufacturer.a.gif | Bin 1283 -> 0 bytes src/themes/aqua/navigator.eq.manufacturer.gif | Bin 1266 -> 0 bytes src/themes/aqua/navigator.eq.scanner.a.gif | Bin 1040 -> 0 bytes src/themes/aqua/navigator.eq.scanner.gif | Bin 1030 -> 0 bytes src/themes/aqua/navigator.eq.shop.a.gif | Bin 1317 -> 0 bytes src/themes/aqua/navigator.eq.shop.gif | Bin 893 -> 0 bytes src/themes/aqua/navigator.eq.support.a.gif | Bin 1044 -> 0 bytes src/themes/aqua/navigator.eq.support.gif | Bin 1031 -> 0 bytes .../aqua/navigator.search.advanced.a.gif | Bin 1111 -> 0 bytes src/themes/aqua/navigator.search.advanced.gif | Bin 1102 -> 0 bytes src/themes/aqua/navigator.search.color.a.gif | Bin 1668 -> 0 bytes src/themes/aqua/navigator.search.color.gif | Bin 1646 -> 0 bytes .../aqua/navigator.search.general.a.gif | Bin 1006 -> 0 bytes src/themes/aqua/navigator.search.general.gif | Bin 999 -> 0 bytes src/themes/aqua/navigator.search.layout.a.gif | Bin 1743 -> 0 bytes src/themes/aqua/navigator.search.layout.gif | Bin 1719 -> 0 bytes src/themes/aqua/navigator.set.calendar.a.gif | Bin 1042 -> 0 bytes src/themes/aqua/navigator.set.calendar.gif | Bin 1032 -> 0 bytes .../aqua/navigator.set.contact.info.a.gif | Bin 1155 -> 0 bytes .../aqua/navigator.set.contact.info.gif | Bin 1140 -> 0 bytes .../aqua/navigator.set.identification.a.gif | Bin 1198 -> 0 bytes .../aqua/navigator.set.identification.gif | Bin 1182 -> 0 bytes .../aqua/navigator.set.photo.browser.a.gif | Bin 1276 -> 0 bytes .../aqua/navigator.set.photo.browser.gif | Bin 1261 -> 0 bytes .../aqua/navigator.set.photo.upload.a.gif | Bin 1212 -> 0 bytes .../aqua/navigator.set.photo.upload.gif | Bin 1202 -> 0 bytes src/themes/aqua/navigator.set.printer.a.gif | Bin 910 -> 0 bytes src/themes/aqua/navigator.set.printer.gif | Bin 684 -> 0 bytes .../aqua/navigator.set.search.engine.a.gif | Bin 1257 -> 0 bytes .../aqua/navigator.set.search.engine.gif | Bin 1242 -> 0 bytes src/themes/aqua/navigator.tl.bulkupdate.a.gif | Bin 1677 -> 0 bytes src/themes/aqua/navigator.tl.bulkupdate.gif | Bin 1662 -> 0 bytes .../aqua/navigator.tl.content.indexer.a.gif | Bin 1753 -> 0 bytes .../aqua/navigator.tl.content.indexer.gif | Bin 1743 -> 0 bytes .../navigator.tl.shop.item.generator.a.gif | Bin 2572 -> 0 bytes .../aqua/navigator.tl.shop.item.generator.gif | Bin 1976 -> 0 bytes src/themes/aqua/navigator.tl.xmlconv.a.gif | Bin 1303 -> 0 bytes src/themes/aqua/navigator.tl.xmlconv.gif | Bin 1286 -> 0 bytes src/themes/aqua/navigator.tl.xmlgen.a.gif | Bin 1653 -> 0 bytes src/themes/aqua/navigator.tl.xmlgen.gif | Bin 1633 -> 0 bytes src/themes/aqua/notebook.admin.a.gif | Bin 1846 -> 0 bytes src/themes/aqua/notebook.admin.gif | Bin 1245 -> 0 bytes src/themes/aqua/notebook.copyright.a.gif | Bin 2129 -> 0 bytes src/themes/aqua/notebook.copyright.gif | Bin 1884 -> 0 bytes src/themes/aqua/notebook.details.a.gif | Bin 1856 -> 0 bytes src/themes/aqua/notebook.details.gif | Bin 1696 -> 0 bytes src/themes/aqua/notebook.duplicates.a.gif | Bin 2142 -> 0 bytes src/themes/aqua/notebook.duplicates.gif | Bin 1458 -> 0 bytes src/themes/aqua/notebook.folder.a.gif | Bin 1867 -> 0 bytes src/themes/aqua/notebook.folder.gif | Bin 1280 -> 0 bytes src/themes/aqua/notebook.help.a.gif | Bin 1677 -> 0 bytes src/themes/aqua/notebook.help.gif | Bin 1101 -> 0 bytes src/themes/aqua/notebook.login.a.gif | Bin 1772 -> 0 bytes src/themes/aqua/notebook.login.gif | Bin 1175 -> 0 bytes src/themes/aqua/notebook.logout.a.gif | Bin 1895 -> 0 bytes src/themes/aqua/notebook.logout.gif | Bin 1271 -> 0 bytes src/themes/aqua/notebook.myalbums.a.gif | Bin 2195 -> 0 bytes src/themes/aqua/notebook.myalbums.gif | Bin 1510 -> 0 bytes src/themes/aqua/notebook.mybasket.a.gif | Bin 2170 -> 0 bytes src/themes/aqua/notebook.mybasket.gif | Bin 1494 -> 0 bytes src/themes/aqua/notebook.mydatebook.a.gif | Bin 2592 -> 0 bytes src/themes/aqua/notebook.mydatebook.gif | Bin 2093 -> 0 bytes src/themes/aqua/notebook.myfolders.a.gif | Bin 2171 -> 0 bytes src/themes/aqua/notebook.myfolders.gif | Bin 1905 -> 0 bytes src/themes/aqua/notebook.myprofile.a.gif | Bin 2145 -> 0 bytes src/themes/aqua/notebook.myprofile.gif | Bin 1448 -> 0 bytes src/themes/aqua/notebook.mysettings.a.gif | Bin 2406 -> 0 bytes src/themes/aqua/notebook.mysettings.gif | Bin 1973 -> 0 bytes src/themes/aqua/notebook.mytools.a.gif | Bin 2033 -> 0 bytes src/themes/aqua/notebook.mytools.gif | Bin 1385 -> 0 bytes src/themes/aqua/notebook.ratings.a.gif | Bin 1927 -> 0 bytes src/themes/aqua/notebook.ratings.gif | Bin 1305 -> 0 bytes src/themes/aqua/notebook.search.a.gif | Bin 1862 -> 0 bytes src/themes/aqua/notebook.search.gif | Bin 1257 -> 0 bytes src/themes/aqua/notebook.shop.a.gif | Bin 1753 -> 0 bytes src/themes/aqua/notebook.shop.gif | Bin 1170 -> 0 bytes src/themes/aqua/notebook.submissions.a.gif | Bin 2298 -> 0 bytes src/themes/aqua/notebook.submissions.gif | Bin 1579 -> 0 bytes src/themes/aqua/notebook.technical.a.gif | Bin 2753 -> 0 bytes src/themes/aqua/notebook.technical.gif | Bin 2433 -> 0 bytes src/themes/aqua/notebook.users.a.gif | Bin 1774 -> 0 bytes src/themes/aqua/notebook.users.gif | Bin 1619 -> 0 bytes src/themes/aqua/notebook.version.a.gif | Bin 2453 -> 0 bytes src/themes/aqua/notebook.version.gif | Bin 1736 -> 0 bytes src/themes/aqua/notebook.view.day.a.gif | Bin 2219 -> 0 bytes src/themes/aqua/notebook.view.day.gif | Bin 1839 -> 0 bytes src/themes/aqua/notebook.view.goto.a.gif | Bin 1789 -> 0 bytes src/themes/aqua/notebook.view.goto.gif | Bin 1196 -> 0 bytes src/themes/aqua/notebook.view.month.a.gif | Bin 2225 -> 0 bytes src/themes/aqua/notebook.view.month.gif | Bin 1530 -> 0 bytes src/themes/aqua/notebook.view.week.a.gif | Bin 2391 -> 0 bytes src/themes/aqua/notebook.view.week.gif | Bin 1954 -> 0 bytes src/themes/aqua/screen.css | 813 ++++- src/themes/aqua/theme.php | 356 ++- src/trash.empty.php | 189 +- src/user.php | 172 +- src/xml.converter.2.php | 31 +- src/xml.converter.php | 178 +- src/xml.generator.php | 37 +- 504 files changed, 15121 insertions(+), 26665 deletions(-) delete mode 100644 doc/configure.html delete mode 100644 doc/css/screen.css delete mode 100644 doc/images/background.png delete mode 100644 doc/images/box.bottom.gif delete mode 100644 doc/images/box.bottom.left.gif delete mode 100644 doc/images/box.bottom.right.gif delete mode 100644 doc/images/box.left.gif delete mode 100644 doc/images/box.right.gif delete mode 100644 doc/images/box.top.gif delete mode 100644 doc/images/box.top.header.gif delete mode 100644 doc/images/box.top.header.left.gif delete mode 100644 doc/images/box.top.header.right.gif delete mode 100644 doc/images/box.top.left.gif delete mode 100644 doc/images/box.top.right.gif delete mode 100644 doc/images/gnome-warning.png delete mode 100644 doc/images/gray.pixel.gif delete mode 100644 doc/images/icon.jpg delete mode 100644 doc/images/logo.gif delete mode 100644 doc/images/white.pixel.png delete mode 100644 doc/index.html delete mode 100644 doc/install.html delete mode 100644 doc/license.html delete mode 100644 doc/migration.html delete mode 100644 doc/openbsd.html delete mode 100644 doc/test.html delete mode 100644 doc/uninstall.html delete mode 100644 old_install delete mode 100644 src/COPYING delete mode 100644 src/admin.system.edit.2.php delete mode 100644 src/admin.system.edit.php delete mode 100644 src/basket.content.php delete mode 100644 src/basket.php delete mode 100755 src/clidemo.php delete mode 100644 src/help/shop.html delete mode 100644 src/include/exifer/canon.tags delete mode 100755 src/include/exifer/exif.php delete mode 100644 src/include/exifer/fuji.tags delete mode 100644 src/include/exifer/index.php delete mode 100644 src/include/exifer/kodak.tags delete mode 100755 src/include/exifer/makers/canon.php delete mode 100755 src/include/exifer/makers/fujifilm.php delete mode 100755 src/include/exifer/makers/gps.php delete mode 100755 src/include/exifer/makers/nikon.php delete mode 100755 src/include/exifer/makers/olympus.php delete mode 100755 src/include/exifer/makers/sanyo.php delete mode 100644 src/include/exifer/nikon.tags delete mode 100644 src/include/exifer/olympus.tags delete mode 100644 src/include/exifer/unified.tags delete mode 100644 src/include/settings.php delete mode 100644 src/index.store.php delete mode 100644 src/javascript/util.js delete mode 100644 src/label.del.2.php delete mode 100644 src/my.folder.php delete mode 100644 src/photo.item.add.2.php delete mode 100644 src/photo.item.add.php delete mode 100644 src/photo.item.del.2.php delete mode 100644 src/photo.item.del.php delete mode 100644 src/photo.item.edit.2.php delete mode 100644 src/photo.item.edit.php delete mode 100644 src/photo.print.2.php delete mode 100644 src/photo.submission.add.2.php delete mode 100644 src/photo.submission.add.php delete mode 100644 src/photo.submission.del.2.php delete mode 100644 src/photo.submission.del.php delete mode 100644 src/photo.submission.edit.2.php delete mode 100644 src/photo.submission.edit.php delete mode 100644 src/search.sidebar.php delete mode 100644 src/shop.category.add.2.php delete mode 100644 src/shop.category.add.php delete mode 100644 src/shop.category.del.2.php delete mode 100644 src/shop.category.del.php delete mode 100644 src/shop.category.edit.2.php delete mode 100644 src/shop.category.edit.php delete mode 100644 src/shop.item.add.2.php delete mode 100644 src/shop.item.add.php delete mode 100644 src/shop.item.del.2.php delete mode 100644 src/shop.item.del.php delete mode 100644 src/shop.item.edit.2.php delete mode 100644 src/shop.item.edit.php delete mode 100644 src/shop.item.generator.add.2.php delete mode 100644 src/shop.item.generator.add.php delete mode 100644 src/shop.item.generator.del.2.php delete mode 100644 src/shop.item.generator.del.php delete mode 100644 src/shop.item.generator.edit.2.php delete mode 100644 src/shop.item.generator.edit.php delete mode 100644 src/shop.item.generator.php delete mode 100644 src/shop.order.edit.php delete mode 100644 src/shop.order.php delete mode 100644 src/shop.php delete mode 100644 src/themes/aqua/background.png delete mode 100644 src/themes/aqua/button.add.client.gif delete mode 100644 src/themes/aqua/button.add.duplicate.gif delete mode 100644 src/themes/aqua/button.add.folder.gif delete mode 100644 src/themes/aqua/button.add.gif delete mode 100644 src/themes/aqua/button.add.manufacturer.gif delete mode 100644 src/themes/aqua/button.add.photos.gif delete mode 100644 src/themes/aqua/button.apply.changes.gif delete mode 100644 src/themes/aqua/button.back.gif delete mode 100644 src/themes/aqua/button.cancel.gif delete mode 100644 src/themes/aqua/button.clear.gif delete mode 100644 src/themes/aqua/button.confirm.delete.gif delete mode 100644 src/themes/aqua/button.confirm.purchase.gif delete mode 100644 src/themes/aqua/button.confirm.subscription.gif delete mode 100644 src/themes/aqua/button.continue.gif delete mode 100644 src/themes/aqua/button.convert.gif delete mode 100644 src/themes/aqua/button.delete.gif delete mode 100644 src/themes/aqua/button.deselect.all.gif delete mode 100644 src/themes/aqua/button.edit.gif delete mode 100644 src/themes/aqua/button.empty.trash.gif delete mode 100644 src/themes/aqua/button.export.gif delete mode 100644 src/themes/aqua/button.filter.gif delete mode 100644 src/themes/aqua/button.goto.gif delete mode 100644 src/themes/aqua/button.goto.this.month.gif delete mode 100644 src/themes/aqua/button.goto.this.week.gif delete mode 100644 src/themes/aqua/button.goto.today.gif delete mode 100644 src/themes/aqua/button.hide.equipment.gif delete mode 100644 src/themes/aqua/button.link.to.gif delete mode 100644 src/themes/aqua/button.list.view.gif delete mode 100644 src/themes/aqua/button.login.gif delete mode 100644 src/themes/aqua/button.logout.gif delete mode 100644 src/themes/aqua/button.move.to.gif delete mode 100644 src/themes/aqua/button.order.by.gif delete mode 100644 src/themes/aqua/button.print.gif delete mode 100644 src/themes/aqua/button.put.selection.to.basket.gif delete mode 100644 src/themes/aqua/button.register.gif delete mode 100644 src/themes/aqua/button.remove.gif delete mode 100644 src/themes/aqua/button.rotate.gif delete mode 100644 src/themes/aqua/button.save.changes.gif delete mode 100644 src/themes/aqua/button.search.gif delete mode 100644 src/themes/aqua/button.select.all.gif delete mode 100644 src/themes/aqua/button.set.as.watermark.gif delete mode 100644 src/themes/aqua/button.show.equipment.gif delete mode 100644 src/themes/aqua/button.slide.view.gif delete mode 100644 src/themes/aqua/button.submit.gif delete mode 100644 src/themes/aqua/button.submit.to.gif delete mode 100644 src/themes/aqua/button.subscribe.gif delete mode 100644 src/themes/aqua/button.update.basket.gif delete mode 100644 src/themes/aqua/button.view.basket.gif delete mode 100644 src/themes/aqua/frame.bottom.edge.gif delete mode 100644 src/themes/aqua/frame.bottom.left.gif delete mode 100644 src/themes/aqua/frame.bottom.right.gif delete mode 100644 src/themes/aqua/frame.left.edge.gif delete mode 100644 src/themes/aqua/frame.right.edge.gif delete mode 100644 src/themes/aqua/frame.top.edge.gif delete mode 100644 src/themes/aqua/frame.top.left.gif delete mode 100644 src/themes/aqua/frame.top.right.gif delete mode 100644 src/themes/aqua/navigator.ad.frontpage.a.gif delete mode 100644 src/themes/aqua/navigator.ad.frontpage.gif delete mode 100644 src/themes/aqua/navigator.ad.image.repository.a.gif delete mode 100644 src/themes/aqua/navigator.ad.image.repository.gif delete mode 100644 src/themes/aqua/navigator.ad.new.user.preferences.a.gif delete mode 100644 src/themes/aqua/navigator.ad.new.user.preferences.gif delete mode 100644 src/themes/aqua/navigator.ad.users.and.clients.a.gif delete mode 100644 src/themes/aqua/navigator.ad.users.and.clients.gif delete mode 100644 src/themes/aqua/navigator.db.clients.a.gif delete mode 100644 src/themes/aqua/navigator.db.clients.gif delete mode 100644 src/themes/aqua/navigator.db.pending.orders.a.gif delete mode 100644 src/themes/aqua/navigator.db.pending.orders.gif delete mode 100644 src/themes/aqua/navigator.db.shipments.a.gif delete mode 100644 src/themes/aqua/navigator.db.shipments.gif delete mode 100644 src/themes/aqua/navigator.eq.camera.a.gif delete mode 100644 src/themes/aqua/navigator.eq.camera.gif delete mode 100644 src/themes/aqua/navigator.eq.film.a.gif delete mode 100644 src/themes/aqua/navigator.eq.film.gif delete mode 100644 src/themes/aqua/navigator.eq.filter.a.gif delete mode 100644 src/themes/aqua/navigator.eq.filter.gif delete mode 100644 src/themes/aqua/navigator.eq.flash.a.gif delete mode 100644 src/themes/aqua/navigator.eq.flash.gif delete mode 100644 src/themes/aqua/navigator.eq.label.a.gif delete mode 100644 src/themes/aqua/navigator.eq.label.gif delete mode 100644 src/themes/aqua/navigator.eq.lens.a.gif delete mode 100644 src/themes/aqua/navigator.eq.lens.gif delete mode 100644 src/themes/aqua/navigator.eq.location.a.gif delete mode 100644 src/themes/aqua/navigator.eq.location.gif delete mode 100644 src/themes/aqua/navigator.eq.manufacturer.a.gif delete mode 100644 src/themes/aqua/navigator.eq.manufacturer.gif delete mode 100644 src/themes/aqua/navigator.eq.scanner.a.gif delete mode 100644 src/themes/aqua/navigator.eq.scanner.gif delete mode 100644 src/themes/aqua/navigator.eq.shop.a.gif delete mode 100644 src/themes/aqua/navigator.eq.shop.gif delete mode 100644 src/themes/aqua/navigator.eq.support.a.gif delete mode 100644 src/themes/aqua/navigator.eq.support.gif delete mode 100644 src/themes/aqua/navigator.search.advanced.a.gif delete mode 100644 src/themes/aqua/navigator.search.advanced.gif delete mode 100644 src/themes/aqua/navigator.search.color.a.gif delete mode 100644 src/themes/aqua/navigator.search.color.gif delete mode 100644 src/themes/aqua/navigator.search.general.a.gif delete mode 100644 src/themes/aqua/navigator.search.general.gif delete mode 100644 src/themes/aqua/navigator.search.layout.a.gif delete mode 100644 src/themes/aqua/navigator.search.layout.gif delete mode 100644 src/themes/aqua/navigator.set.calendar.a.gif delete mode 100644 src/themes/aqua/navigator.set.calendar.gif delete mode 100644 src/themes/aqua/navigator.set.contact.info.a.gif delete mode 100644 src/themes/aqua/navigator.set.contact.info.gif delete mode 100644 src/themes/aqua/navigator.set.identification.a.gif delete mode 100644 src/themes/aqua/navigator.set.identification.gif delete mode 100644 src/themes/aqua/navigator.set.photo.browser.a.gif delete mode 100644 src/themes/aqua/navigator.set.photo.browser.gif delete mode 100644 src/themes/aqua/navigator.set.photo.upload.a.gif delete mode 100644 src/themes/aqua/navigator.set.photo.upload.gif delete mode 100644 src/themes/aqua/navigator.set.printer.a.gif delete mode 100644 src/themes/aqua/navigator.set.printer.gif delete mode 100644 src/themes/aqua/navigator.set.search.engine.a.gif delete mode 100644 src/themes/aqua/navigator.set.search.engine.gif delete mode 100644 src/themes/aqua/navigator.tl.bulkupdate.a.gif delete mode 100644 src/themes/aqua/navigator.tl.bulkupdate.gif delete mode 100644 src/themes/aqua/navigator.tl.content.indexer.a.gif delete mode 100644 src/themes/aqua/navigator.tl.content.indexer.gif delete mode 100644 src/themes/aqua/navigator.tl.shop.item.generator.a.gif delete mode 100644 src/themes/aqua/navigator.tl.shop.item.generator.gif delete mode 100644 src/themes/aqua/navigator.tl.xmlconv.a.gif delete mode 100644 src/themes/aqua/navigator.tl.xmlconv.gif delete mode 100644 src/themes/aqua/navigator.tl.xmlgen.a.gif delete mode 100644 src/themes/aqua/navigator.tl.xmlgen.gif delete mode 100644 src/themes/aqua/notebook.admin.a.gif delete mode 100644 src/themes/aqua/notebook.admin.gif delete mode 100644 src/themes/aqua/notebook.copyright.a.gif delete mode 100644 src/themes/aqua/notebook.copyright.gif delete mode 100644 src/themes/aqua/notebook.details.a.gif delete mode 100644 src/themes/aqua/notebook.details.gif delete mode 100644 src/themes/aqua/notebook.duplicates.a.gif delete mode 100644 src/themes/aqua/notebook.duplicates.gif delete mode 100644 src/themes/aqua/notebook.folder.a.gif delete mode 100644 src/themes/aqua/notebook.folder.gif delete mode 100644 src/themes/aqua/notebook.help.a.gif delete mode 100644 src/themes/aqua/notebook.help.gif delete mode 100644 src/themes/aqua/notebook.login.a.gif delete mode 100644 src/themes/aqua/notebook.login.gif delete mode 100644 src/themes/aqua/notebook.logout.a.gif delete mode 100644 src/themes/aqua/notebook.logout.gif delete mode 100644 src/themes/aqua/notebook.myalbums.a.gif delete mode 100644 src/themes/aqua/notebook.myalbums.gif delete mode 100644 src/themes/aqua/notebook.mybasket.a.gif delete mode 100644 src/themes/aqua/notebook.mybasket.gif delete mode 100644 src/themes/aqua/notebook.mydatebook.a.gif delete mode 100644 src/themes/aqua/notebook.mydatebook.gif delete mode 100644 src/themes/aqua/notebook.myfolders.a.gif delete mode 100644 src/themes/aqua/notebook.myfolders.gif delete mode 100644 src/themes/aqua/notebook.myprofile.a.gif delete mode 100644 src/themes/aqua/notebook.myprofile.gif delete mode 100644 src/themes/aqua/notebook.mysettings.a.gif delete mode 100644 src/themes/aqua/notebook.mysettings.gif delete mode 100644 src/themes/aqua/notebook.mytools.a.gif delete mode 100644 src/themes/aqua/notebook.mytools.gif delete mode 100644 src/themes/aqua/notebook.ratings.a.gif delete mode 100644 src/themes/aqua/notebook.ratings.gif delete mode 100644 src/themes/aqua/notebook.search.a.gif delete mode 100644 src/themes/aqua/notebook.search.gif delete mode 100644 src/themes/aqua/notebook.shop.a.gif delete mode 100644 src/themes/aqua/notebook.shop.gif delete mode 100644 src/themes/aqua/notebook.submissions.a.gif delete mode 100644 src/themes/aqua/notebook.submissions.gif delete mode 100644 src/themes/aqua/notebook.technical.a.gif delete mode 100644 src/themes/aqua/notebook.technical.gif delete mode 100644 src/themes/aqua/notebook.users.a.gif delete mode 100644 src/themes/aqua/notebook.users.gif delete mode 100644 src/themes/aqua/notebook.version.a.gif delete mode 100644 src/themes/aqua/notebook.version.gif delete mode 100644 src/themes/aqua/notebook.view.day.a.gif delete mode 100644 src/themes/aqua/notebook.view.day.gif delete mode 100644 src/themes/aqua/notebook.view.goto.a.gif delete mode 100644 src/themes/aqua/notebook.view.goto.gif delete mode 100644 src/themes/aqua/notebook.view.month.a.gif delete mode 100644 src/themes/aqua/notebook.view.month.gif delete mode 100644 src/themes/aqua/notebook.view.week.a.gif delete mode 100644 src/themes/aqua/notebook.view.week.gif diff --git a/CHANGES b/CHANGES index d5dd29c..c934b38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,22 +1,3 @@ -========================================================================== - - Copyright (C) 2002-2006 Balint Kis (balint@k-i-s.net) - Copyright (C) 2005-2006 Solomon Peachy (pizza@shaftnet.org) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - ========================================================================== For further information about Photo Organizer, see its web site at: @@ -25,7 +6,205 @@ For further information about Photo Organizer, see its web site at: ========================================================================== -2.33e ( August 11, 2007 ) +2.34 (September 20, 2007) + + [fix] Quoting problems with folder passwords. + [fix] UI regression on registration page. + [fix] REALLY fix the bug in count_photos_by_album() function; if you + are upgrading from 2.34-rc1/-rc2/-rc3, you'll need to manually + apply the commands in src/sql/PENDING, or wait until 2.35. + [fix] Minor string errors. + [fix] Settings page wasn't storing the 'preview_copy_metadata' setting. + [fix] Vastly improve the code that computes and checks volume sizes. + [fix] Disable page timeouts on bulk update/photo import. + [fix] Bulk update now selects the correct type (folder/album/selection/spool) + [fix] When the admin registered a user the redirection was incorrect. + [fix] Minor tooltip formatting error. + [fix] Admin page wasn't showing the bulk upload preference properly. + [fix] More errors caused by i18n numeric formatting in incorrect places. + [fix] Exposure/flash compensation wasn't parsing fractional values properly. + [fix] 'ISO' setting was never being recorder/displayed. + [fix] Image count wasn't showing up properly on folder/album delete pages. + [fix] 'Expires' header for images wasn't being generated properly. + [fix] 'forgot password' page wasn't working. + [fix] Work around PHP's inconsistent symlink function. + +2.34-rc4 (August 20, 2007) + + [fix] ufraw decode helper wasn't respecting user settings. + [add] Support ICC profiles when using ufraw. (Robert Hendrickx) + [fix] Scan parameters display was busted on the tech info screen. + [fix] Bulk update/Delete Keywords was failing under some circumstances. + [fix] Incorrect folder link on the 'add photos' page. + [fix] Printouts were failing due to ambiguious SQL. + [fix] Formatting regressions on the label/brochure pages. + [fix] force US locale when printing to ensure correct postscript + generation. + [fix] Several errors relating to custom profile entries. + [fix] Silenced many warnings. + [fix] Pop-up calendar wasn't displaying properly. + [add] Allow user to clear a date. + [fix] Action buttons weren't showing up on the search pages under the + list view. + [fix] Error in the count_photos_by_album() function, causing the photo + count in albums to be incorrect. *** Requires a manual DB update + if you're upgrading from 2.34-rc1/2/3; see src/sql/PENDING *** + [add] jpgfromraw is now configurable instead of always being enabled. + [fix] Some preferences weren't saving properly. + [fix] Camera detection from XMP data was broken. + [fix] User listing on search page respects 'hide user' preference, and + defaults to the logged-in user. + [fix] Tooltips in list view were broken. + [fix] A couple of date bugs on the admin user pages. + [fix] The repository upgrade code was breaking when it couldn't figure + out the image dimensions, plus we should ignore .xmp files for now. + [fix] Fix mis-displayed dates on the profile edit pages. + [fix] Next/prev buttons were failing under some circumstances. + [fix] Some Minolta-generated images were failing to import. + + [misc] Applied a few patches to jscalendar + [misc] Manufacturer links open in a new window. + [misc] Installer now reports more verbose errors when migration fails. + [misc] Ensure all auto-refresh selectboxes work with no javascript. + + [lang] More i18n fixes. + [lang] German translation (de_DE) updated. + [lang] Fixed generation of locale-dependent dates. + +2.34-rc3 (August 11, 2007) + + [fix] Photo edit page had a fixed, English title. + [fix] A couple of typos on the album display page. + [fix] site_display_random_photos() was still broken for album views. + [fix] Admin users had problems emptying other users' trash. + [fix] Work around Nikon NEFs that have slightly bogus metadata. + [fix] Eliminate a warning when no keywords were specified on an import. + [fix] Due to an include order error, graphical UI elements weren't + getting translated properly. + [fix] Script errors involving watermarking. Watermarking works now. + [fix] Bulk update on ALL images was failing to regenerate thumbnails. + [fix] Emptying the trash and deleting photos as the admin user broke + under some circumstances. + [fix] Sort order, and images per page are respeced on the settings page. + [fix] Admin users couldn't empty the trash properly. + [fix] Exclude 'spool' and 'trash' from lists where appropriate, and + prevent users from creating new folders/albums with those names. + [add] Exclusively use ExifTool to extract IPTC/XMP metadata. + [fix] When logging in with a non-default language, the first + page displayed was in the default language. + [fix] Client removal page was broken for non-admins. + [fix] Tweak CSS rules to fix some formatting glitches. + [fix] Rearranged the config file a little bit. + [fix] Emptying trash when watermarking enabled now works. + [fix] Install script was incorrectly migrating old watermark preferences. + [fix] When no exposure date is associated with an image, an invalid + date entry is generated in its exported XML data. + [fix] Removing a user from the admin interface did not work. + [fix] 'Bulk Update Enabled' preference was mistyped in some places. + + [lang] Several missing i18n entries. + [lang] Auto-refresh the login page when a different language is chosen. + [lang] German translation updated. + +2.34-rc2 (August 5, 2007) + + [fix] Folder name not showing up in info bar on photo add page. + [fix] Broken URL and other mistakes on copyright page. + [fix] site_display_random_photos() and site_display_photo() functions + were broken. + [fix] When asked to not display photo frames, don't set the CSS image + class for framed images. + [fix] Display the username on the settings page. + [fix] Export page shouldn't be buffered/compressed. + [fix] 'select all' on photo listing page now works properly. + [fix] Blank page when rotating photos. + [fix] Properly restore the error reporting levels. + [fix] Fix the periodic preference refresh. This also fixes the bug + where changing the photos-per-page wasn't working for signed-in + users. + [fix] Allow a bulk update to proceed if the only option checked was to + regenerate thumbs/images. + [fix] Graphical select buttons and checkboxes were misbehaving. + [fix] Minor formatting tweaks to ease validation. + +2.34-rc1 (August 2, 2007) + + *** License changed to GPLv3 + *** Requires PHP >= 5.0 and PostgreSQL >= 8.0 + + - Vastly improved the themability of the UI. Converted the site + layout to use pure CSS, greatly simplifying the generated HTML. + - Support multiple languages. German, French, and Dutch translations + are available. + - All internal data is now UTF-8 and is served to the user as such. + - Switch to PHP's built-in session management, and take advantage of + per-session storage. This opens up many, many possibilities. + - Rewrote new user preference backend based around a simple + key=value paradigm. In the process, all user preference code was + refactored to eliminate many, many database transactions, resulting + in much simpler code everywhere else. + - The spool has been revamped, making it into a sort of temporary + clipboard. It's much simpler to use and considerably more + useful. Exports, Printing, and bulk updates can work against this + improved spool. + - Error reporting centralized and cleaned up. + - ExifTool is now required, and is used for all image metadata + extraction (XMP/IPTC/EXIF) + - Shopping infrastructure removed, replaced with a simple per-image + URL to an external store + - Sidebar search page removed; it was only semi-working and basically + needs a re-think. + - Individual 'versions' of images can now be added to albums, rated, etc. + - The backend now supports an unlimited number of image sizes, though + the UI does not. + - All image modifications are now properly transactioned. Before it + was possible for a transform to fail leaving a corrupted image on + disk. + - Consolidated most permission checks into the database via stored + procedures. + - Datebook events can be associated with clients, and folders/albums + can be associated with events. It is now possible to selectively + grant access to individual folders/albums to individual users! + - Users can now spool/export any image on the system, permissions + notwithstanding. + - Internal handling of image selection/checkboxes improved considerably. + - Sort order, photos per page, and view type are now dynamic, and + registered users can set defaults. + - GPS Tag support. + - Support GraphicsMagick for image resizing and processing. + - Support password protected folders & albums. + - Albums/Folders/Photos now keep track of when they were last modified. + - Bulk update can work directly against arbitrary photo selections, + including directly from photo listing pages. + - Bulk update now recursively handles subfolders/subalbums. + - Support the UFRaw RAW decoder. + - Keep track of when an image was added to the system. Use this to + speed up a lot of SQL. + - Display the number of photos taken on the datebook week/month/go-to + views. + - Display the number of photos per location/camera/lens/etc on the + profile pages. + - Combined all folder and album actions into a pair of "album actions" + and "folder actions" dialogs. + - Added an explicit 'delete' button to folder/album/photo pages. + - Support keyboard navigation for common tasks. + - Automatically detect lens used based on EXIF data. + - Added an option to ignore the 'UserComment' field on specific cameras. + - Automatically copy image metadata to the preview images. + - User can now specify the default thumbnail/preview image format. + - Allow users to hide themselves on the public user listings. + - Much better support for DICOM (.dcm) images. + - Allow guests read-only access the 'version' tab on the photo page. + - Users can instantly mark other users as their client. + - Per-image comments that are independent of the title/caption fields. + - Keep track of watermark images. + - RAW images with embedded preview JPEGs will have them automatically + imported as an additional version. + - Updated the tooltip library. + - Users can create new accounts for their clients. + - Many, many minor tweaks and fixes. + +2.33e ( Under development ) [fix] Default image orientation value was bogus, so if we failed to properly parse the image metadata, we broke. @@ -33,8 +212,6 @@ For further information about Photo Organizer, see its web site at: Use long php header on the EXIFER decoder files. [fix] Ambiguious SQL the IPTC/XMP location header import code. [fix] Unknown IPTC locations were failing import. - [fix] Removing a user (via the admin interface) was broken when they - had keywords on their photos. 2.33d (May 1, 2007) diff --git a/COPYING b/COPYING index 999ca85..94a9ed0 100644 --- a/COPYING +++ b/COPYING @@ -1,285 +1,626 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + 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 + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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. +them 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. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. 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. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - 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. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - 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. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. 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". + TERMS AND CONDITIONS -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. + 0. Definitions. - 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. + "This License" refers to version 3 of the GNU General Public License. -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. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 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: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - 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. + A "covered work" means either the unmodified Program or a work based +on the Program. - 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. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. -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. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -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. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 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: + 1. Source Code. - 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, + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 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, + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - 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 "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. -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. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. -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. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 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. + The Corresponding Source for a work in source code form is that +same work. - 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 + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of 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 + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying 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. + 13. Use with the GNU Affero General Public License. -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. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -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. + 14. Revised Versions 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 + The Free Software Foundation may publish revised and/or new versions of +the GNU 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. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public 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. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 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. + 15. Disclaimer of Warranty. - 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. + 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. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 @@ -287,15 +628,15 @@ 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 +state 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 + 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 + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + along with this program. If not, see . 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: + If the program does terminal interaction, 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'. + Copyright (C) + This program 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. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -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: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - 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. + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/README b/README index 4f42b2b..eb08cc9 100644 --- a/README +++ b/README @@ -1,31 +1,16 @@ ========================================================================== - Copyright (C) 2002-2006 Balint Kis (balint@k-i-s.net) - Copyright (C) 2005-2006 Solomon Peachy (pizza@shaftnet.org) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -========================================================================== - -The documentation in the doc/ subdirectory is increasingly out-of-date. -Work is underway to rewrite the relevant bits. Photo Organizer's web -site is the most up-to-date source. +Work is underway to rewrite the old, quite-out-of-date documentation. +In the mean time, Photo Organizer's web site is the most up-to-date +source: http://po.shaftnet.org/ We recommend you follow the installation instructions on the web site. +To report bugs and make feature requests, see: + + http://bugs.shaftnet.org/ + ========================================================================== diff --git a/doc/configure.html b/doc/configure.html deleted file mode 100644 index 34fb801..0000000 --- a/doc/configure.html +++ /dev/null @@ -1,320 +0,0 @@ - - - -Photo Organizer Manual - Configuration Instructions - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
-

 

-

-

-CONFIGURIATION INSTRUCTIONS -
-

-

 

-

-Introduction | -Install | -Uninstall | -Configure | -OpenBSD | -Migration | -License -
-

-

 

-Components -

-As you already know Photo Organizer is based on several software -components that have to be configured in order to fully support Photo -Prganizer. This document attempts to list the configuration options -for each software component apart. -

-There are four software components to be configured: -

-

    -
  1. PostgreSQL Client Authentication
  2. -
  3. PHP Configuration
  4. -
  5. Apache HTTP Configuration
  6. -
  7. Photo Organizer Customizations
  8. -
- -

 

-PostgreSQL Client Authentication -

-There is only one thing that must be configured for the PhostgreSQL server, and -that's the client authentication. Whitout proper client authentication -PHP cannot access the PostgreSQL database and therefore Photo Organizer will not work. -

-Consider the following setup. The PostgreSQL server is up and running with the database -system stored at /export/pgdata/db listening on 192.168.42.20:5432. The Photo Organizer -database is po_database created and used by po_user protected with po_password. -

-The Apache HTTP server is running on 192.168.42.22 with mod_php. By default -it's not possible to access po_database from any host via TCP/IP. To enable -TCP/IP access you have to edit the pg_hba.conf file and add a single entry. -

- -
-[balint@mamba ~]$ cd /export/pgdata/db
-[balint@mamba db]$ ls
-base    pg_clog      pg_ident.conf  pg_xlog          postmaster.opts
-global  pg_hba.conf  PG_VERSION     postgresql.conf  postmaster.pid
-[balint@mamba db]$
-
-

-The pg_hba.conf file contains an impressive description of the possible -options. For a strict password protected client authentication add the following line -to the end of the file: -

- -
-# TYPE  DATABASE     USER        IP-ADDRESS        IP-MASK           METHOD
-host    po_database  po_user     192.168.42.22     255.255.255.255   password
-
-

 

-PHP Configuration -

-One of the most frequent problem that occurs when using a fresh Photo Organizer -installation is that the file upload fails. This is because PHP has a built in protection -against unusual client behaviour and Photo Organizer does lot's of unusual things. -

-There are few configuration directives that have to be set in your /etc/php.ini. -

- -

  • file_uploads = On|Off - This enables HTTP file uploads, make -sure it's on. -

    - -
    -file_uploads = On -
    -

    -

  • upload_max_filesize = integer - The maximum size of an uploaded file in bytes. -

    - -
    -upload_max_filesize = 150M -
    -

  • -

    - - -

  • max_execution_time = integer - This sets the maximum time in seconds -a script is allowed to run before it is terminated. This helps prevent poorly written -scripts from tying up the server. The default setting is 30 which might not -be enough to perform a 100Mb bulk upload that can take several minutes. -Set this value according to your needs. In my case this is set to 5 minutes. -

    - -
    -max_execution_time = 300 ; 5 minutes -
    -

    -

  • post_max_size = integer - Sets the maximum size of post. This -setting also affects file upload, therefore to upload large files, this value must be larger -than upload_max_filesize. -

    - -
    -post_max_size = 155M -
    -

  • -
  • memory_limit = integer - This sets the maximum amount of memory -in bytes that a script is allowed to allocate. This helps prevent poorly written -scripts for eating up all available memory on a server. When doing a 100Mb bulk upload -the script needs to allocate over 100Mb since memory_limit -also affects file uploading. Generally speaking, memory_limit should be larger than -post_max_size. -Set this value according to your needs. -

    - -
    -memory_limit = 170M -
    -

  • upload_tmp_dir = /tmp - This sets the temporary directory -where the uploaded file will be stored until the upload script lives. Usually, -you don't have to set this directive, but we had at least one case when the upload -mysteriously failed and after setting this directive to /tmp - which should -be the default value - suddenly everything worked. -If you run into trouble with file uploads and your file sizes and memory limit -is right, try to set this directive. -

    - -
    -upload_tmp_dir = /tmp -
    -

    -
  • - -

     

    -Apache HTTP Configuration -

    -Apache has several configuration directives that might limit Photo Organizer's -operation. For instance by default Apache limits the number of HTTP request fields -to 100. If you display more than 100 photos on a page and you want to move all of them -into a different folder only the first 98 photos will be moved (since Photo Organizer uses 2 fields to -identify the destination and source folders). -

    -Verify your apache configuration usually located at /etc/httpd/conf/httpd.conf. -

    - -

  • LimitRequestBody integer - This directive specifies the number of bytes -from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body. The default -value is 0 and you should make sure that it is not set or it's set to 0 since -you have already specified this parameter via the post_max_size directive in PHP. -

    -

  • - -
  • LimitRequestFields integer - This directive limits the number of HTTP request header fields -that will be accepted from clients (like Photo Organizer), ranging from 0 (meaning unlimited) to 32767. -The default value is defined by the compile-time constant 100. Normally the number of request header fields -used by a client rarely exceeds 20, but in case of Photo Organizer this might become much larger depending on your settings. -The value should be increased if you get an error response from the server that indicates too many fields were sent in the request. -

    - -
    -LimitRequestFields 250 -
    -

    -

  • - -
  • LimitRequestFieldsize integer - This directive specifies the number of bytes from 0 to -the value of the compile-time constant 8190, that will be allowed in an HTTP request header. Should you -need to change the LimitRequestFields directive, make sure to allow more space for the increased -number of request fields. -

    - -
    -LimitRequestFieldSize 16380 -
    -

    -

  • - -

     

    -Photo Organizer Customizations -

    -Photo Organizer uses several helper applications which might not be accessible by PHP -in certain environments. You can specify the full path to these applications via the PO -configuration file located at include/config.php - the path is relative -to your PO installation. -

  • IMAGEMAGICK - This utility program is used to scale images. -If on your system ImageMagick is installed at a custom location please -specify the full path to the convert utility. -

    - -
    -$sys_convert = "/usr/bin/convert"; -
    -

    -

  • - -
  • DCRAW - This utility program is used to convert RAW image files (produced -by digital cameras) into temporary PPM files that are scaled afterwards with ImageMagick -to produce a thumbnail and a preview. This is new software so you will have to compile -and install this program separately, but it will allow you to store the original RAW -images in your Image Repository and still have a preview. -Please note: dcraw changes its behaivor and allowable -command-line arguments from release to release. Photo Organizer's -integration tested with dcraw v8.15. -

    - -
    -$sys_dcraw = "/usr/local/bin/dcraw"; -
    -

    -

  • - -
  • PS2PDF - This utility program is used when printing PDF documents. Photo -Organizer generates PS documents that are converted into PDF using this program. -

    - -
    -$sys_ps2pdf  = "/usr/bin/ps2pdf"; -
    -

    -

  • - -
  • TAR and ZIP - These utility programs are used during bulk upload. The files -to be uploaded have to be zipped or tared and uploaded at once. Than Photo Organizer will -use these utilities to unzip and untar the uploaded file. It is important to mention -that the tar utility must support the -z and -j options. -If on your system tar doesn't support these options, install gtar and specify -the path accordingly. -

    - -
    -$sys_tar     = "/bin/gtar";
    -$sys_unzip   = "/bin/unzip";
    -
    -

    -
  • - -

    -

    -Comments and corrections are welcome at balint@k-i-s.net. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/css/screen.css b/doc/css/screen.css deleted file mode 100644 index 51410d6..0000000 --- a/doc/css/screen.css +++ /dev/null @@ -1,188 +0,0 @@ -/* - - Copyright (C) 2002, 2003, 2004, 2005, 2006 Balint Kis (balint@k-i-s.net) - - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Colors Used: - - Dark Slate Gray #2f4f4f - titles - Gainsboro #dcdcdc - button color, options background, input border - Gray25 #404040 - text, table borders - Gray95 #f0f0f0 - input background - Honeydew 3 #c1cdc1 - link hover background - Navy #000080 - link hover, button border - Royal Blue #27408b - links, button background color - Slate Blue #473c8b - visited links - Slate Gray #708090 - link underline - White #ffffff - page background - -*/ - -body { - font-family: Verdana, "Bitstream Vera Sans", sans-serif; - font-size: 12px; - color: #404040; /* Gray 25 */ - background-color: #ffffff; /* White */ - border-width: 1px; - line-height: 18px; -} - -td { - font-family: Verdana, "Bitstream Vera Sans", sans-serif; - font-size: 12px; - color: #404040; /* Gray 25 */ -} - -a:link { - color: #27408b; /* Rolyal Blue */ - background-color: transparent; -} - -a:visited { - color: #473c8b; /* Slate Blue */ - background-color: transparent; -} - -a:hover { - color: #000080; /* Navy */ - background-color: #c1cdc1; /* Honeydew 3 */ -} - -hr { - color: #708090; /* Slate Gray */ - background-color: #708090; /* Slate Gray */ - height: 1px; - border: 0; -} - - -input { - color: #404040; /* Gray 25 */ - background-color: #f0f0f0; /* Gray95 */ - border-color: c1cdc1; /* Honeydew */ - font-family: Verdana, "Bitstream Vera Sans", sans-serif; - font-size: 12px; -} - -textarea { - color: #404040; /* Gray 25 */ - background-color: #f0f0f0; /* Gray95 */ - border-color: c1cdc1; /* Honeydew */ - font-family: Verdana, "Bitstream Vera Sans", sans-serif; - font-size: 12px; -} - -select { - color: #404040; /* Gray 25 */ - background-color: #f0f0f0; /* Gray95 */ - border-color: c1cdc1; /* Honeydew */ - font-family: Verdana, "Bitstream Vera Sans", sans-serif; - font-size: 12px; -} - -/* Appears on the left or right side of some pages */ -/* these items tell you where you can go */ - -/* comment formatting */ - -#comment td { - border-color: #708090; /* Slate Gray */ - border-width: 1px 1px 1px 1px; - border-style: none none solid none; - background-color: transparent; -} - -#article { - background-color: transparent; - font-size: 12px; - line-height: 18px; -} - -#article mytitle { - color: #2f4f4f; /* Dark Slate Gray */ - text-transform: uppercase; -} - -#article h1 { - font-family: Georgia, serif; - font-size: 16px; - font-weight: normal; - text-align: left; - text-transform: uppercase; -} - -#article h2 { - font-family: Verdana, "Bitstream Vera Sans", Geneva, sans-serif; - font-size: 1em; - font-weight: normal; - line-height: 18px; - letter-spacing: .15em; - text-align: left; - text-transform: uppercase; -} - -#article h3 { - font-family: Verdana, "Bitstream Vera Sans", Geneva, sans-serif; - font-size: .9em; - font-weight: normal; - line-height: 18px; - letter-spacing: .2em; - text-align: left; - text-transform: uppercase; -} - -#article h4 h5 h6 { - font-family: Verdana, "Bitstream Vera Sans", Geneva, sans-serif; - font-size: .9em; - font-weight: normal; - line-height: 18px; - letter-spacing: .1em; - text-align: left; - text-transform: uppercase; -} - -#article pre { - font-family: Monaco, "Andale Mono", Courier, "Courier New", monospace; - font-size: 10px; - line-height: 13px; - background-color: transparent; -} - -#article blockquote { - font-size: 10px; - line-height: 15px; -} - -#article cite { - font-weight: normal; - font-style: italic; -} - -#article thead { - font-weight: bold; -} - -#article strong { - font-weight: normal; - font-size: .9em; - letter-spacing: .2em; - text-transform: uppercase; -} - -#code { - font-family: Monaco, "Andale Mono", Courier, "Courier New", monospace; - font-size: 10px; -} diff --git a/doc/images/background.png b/doc/images/background.png deleted file mode 100644 index f91777b256b2c27c740d47a270b7704e7aeec6c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1SHiab83P(>5jgR3=A9lx&I`x0{NT;9+AZi z4BSE>%y{W;-5;PJdx@v7EBggT4pDZNlK(AJfkN`0E{-7;bCUo3|8LLCv!UkC55a>! ke|}bPI(+aT<8uZEw-p=@t?pDW11e?kboFyt=akR{0O&?3LI3~& diff --git a/doc/images/box.bottom.gif b/doc/images/box.bottom.gif deleted file mode 100644 index 930f257a74101cb78c5049afa99f21546d7bb089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36 ocmZ?wbhEHbWMtrAXkcLY|NsBOr7Lw9fB+=Iz{K3bAIM-00JBvHcK`qY diff --git a/doc/images/box.bottom.left.gif b/doc/images/box.bottom.left.gif deleted file mode 100644 index 3f1c7bf4345a3ce986ada64df6d6f9b84a4c5c96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmZ?wbhEHb>C= z`1|+o=PzD*{P;0Y4G`!s00BrZ1B*d`N2(h~(o|<52B(7x_m|70a7wiN;+-dLq9<_0 btnT{mHUDiE=zGXWh1xC=sLYI0Vz34P*C0Ls diff --git a/doc/images/box.top.header.right.gif b/doc/images/box.top.header.right.gif deleted file mode 100644 index 1f84422e6acaa163d4e0e54481863d8512a9d99a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 123 zcmZ?wbhEHb>C= z`1|+o=PzD*{P;0Y4G`!s00BrZ1B-z{OX8Fr3X_AUosc{vBF~}Fo|JWrOQrcXi=M;o b@3UrG-$=KQ*7cB)Ds+#Xq@HP}%wP=w4e>s^ diff --git a/doc/images/box.top.left.gif b/doc/images/box.top.left.gif deleted file mode 100644 index 6655834b28b72e922160a2e90f48b4ad363ecb45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 111 zcmZ?wbhEHbR963e+ diff --git a/doc/images/box.top.right.gif b/doc/images/box.top.right.gif deleted file mode 100644 index 4ed6caba86d346384d78458e8a697bd66758abcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 110 zcmZ?wbhEHbszen;P16#BP*Oor zp&$@asf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?YZ}GA-9dI}5 z;CBk!Uukn=N&ah!S0U%NedO>@!y9C9O9xbUkn|ja%S6a5+X%wHoWH!*tv8J9u__Na2)mxLlhnGqy+YWoc&6c zV8(f*lygGLvtojs51#qz77LM(Yp^UH;&! z!4>F{kqSq||8pzthE0#9LJ;7BfwG7}vmwP;ixO(Z`#a{r4Mdouj zw~uTLk4Md-+g=#_G~;vYX4R4KFb0nbkv^%jAsImbYq1d4qAT}*`W}wOs(M~Kg=6p^ zY0L^C@TTZl-vidWhFmC%A9x#41_C>I_gfSHI2zbX&*D=^%@@0P-6UT@buJ^}bMhVr z-`Na6UL<_-fQ7`l_qDYdD9<5(4%YB%MBu|Kjc-X#nFt`Yh&rRv4E&ymKn9$9^!wi` zNY1E?v%qQ-4skJ=MIH!-cwDVf{RvC|TKl+Vyb1QBc-;W+9R+u4`Mc+%s2n&%v?u{6 zRwbZIYz`|1D=}*Api{3F37!GIp3>e4aA0aLqZ4tUNSsxDR`%@Z6ke3u;_Y%kC1HCL ztUfKGr|Qm<(7Q!y83ZT7EAv;ByZMpK+CxJyYU9rwlP1w%(Dm524)N z1|$}P`zS$GxXXByr>B_HpT6uA_4D_mvj}!4P(un4j9|Tz++sBW$MI|Iw+3c7n}z@Eu_A3$FE@)n zA{?xt=)F|OwbS}e>1!rR(0_4mL%AwD_ZOiZE_poeA^VXj7@Z|#-5I3EoE-|tVjmH* qKAKRo{ng)tXlmw*pgW&04)K#{ItMxc{5x;q+o - - -Photo Organizer Manual - Introduction - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -PHOTO ORGANIZER INTRODUCTION -
    -

    -

     

    -

    -
    -Introduction | -Install | -Uninstall | -Configure | -OpenBSD | -Migration | -License -
    -
    -

    -

     

    -Thanks -

    -Thank you for chosing Photo Organizer. The format of this document is still fluid and -will change significantly during the following releases. This section lists the system -requirements and briefly presents the installation process. -

    -System Requirements -

    -Mandatory requirements (PO might work with older software versions than specified inhere): -

      -
    1. An Apache 2.0.40+ HTTP server with PHP 4.3.10+ compiled with support for PGSQL, BCMATH,, and SOCKETS.
    2. -
    3. A PostgreSQL 7.4.1+ database server that accepts TCP/IP connections even if the database -server and the HTTP server are located on the same computer.
    4. -
    5. ImageMagick 5.4.7+
    6. -
    -Optional requirements: -
      -
    1. If ExifTool is installed, PO will use it for EXIF extraction.
    2. -
    3. An mail transfer agent is needed and PHP must be configured to use this mail transfer agent if you wish to use e-mail notifications.
    4. -
    5. If tar and/or unzip is available PO will support bulk upload.
    6. -
    7. ps2pdf must be installed in order to enable printing in PDF format.
    8. -
    9. dcraw must be installed in order to support raw image formats.
    10. -
    -Additionally, to complete the installation you will also have to: -
      -
    1. Log in as a superuser on the computer where you install the system.
    2. -
    3. Access a PostgreSQL user account which is allowed to create new databases and database users and new languages (plpgsql).
    4. -
    5. Read and understand the licence conditions described in the Licence section.
    6. -
    -

    -Brief Install Instructions -

    -You can chose to upgrage an exisiting Photo Organizer -installation (older than PHP.2.5.C-SQL.2.5.C) or to -install a new system. Photo Organizer's database -has been developed in such way that it can be easily -upgraded with minimal service interruption. Back up -your database before starting the upgrade, however -you should experience no problems in case your database -is a genuine Photo Organizer database. -

    -To install the software manually follow the instructions listed in -the Install section. For an automated -installation run the install script. This will do the following: -

      -
    1. Collect setup information.
    2. -
    3. Check for an existing Photo Organizer installation.
    4. -
    5. If found:
    6. -
        -
      1. If a repository migration is needed convert the old repository into the new one.
      2. -
      3. Alter and upgrade the database.
      4. -
      5. Remove old Photo Organizer php files.
      6. -
      -
    7. if not found:
    8. -
        -
      1. Create a database user.
      2. -
      3. Create a database for the previous user.
      4. -
      5. Create the database structures and load static data.
      6. -
      7. Create a new image repository.
      8. -
      9. Create the target directory where Photo Organizer files will live.
      10. -
      -
    9. Copy the Photo Organizer php files into the target directory.
    10. -
    11. Reconfigure Photo Organizer to access the image repository and the database server.
    12. -
    13. Change the ownership of the installation and the image repository.
    14. -
    -

    -If you installed Photo Organizer into the HTTP server's -document root directory, your system is ready and it -can be accessed via -

    - -http://yourhost.yourdomain/po - -

    -After installation, you can relocate Photo Organizer's -PHP files to any location in the HTTP server's document -root, but you will have to update include/config.php file -in your PO installation, specifying the new URL of your -PO installation. -

    -Similarly, if you relocate Photo Organizer's Image Repository -you will have to tell update the include/config.php file -in your PO installation, specifying the new location of -your repository. -

    -
    - -You can safely rename volumes via the Admin interface, but -it's not a good idea to rename volumes via shell commands -or to modify the image repository's file structure in any way. -Unless you know exactly what you do, avoid making changes in -the repository. -
    -

    -Photo Organizer's administrator account is created during -installation. You can log in as: -

    - -username: admin
    -password: admin -
    -

    -Make sure you change the administrator username and the password. -

    -

    -Comments and corrections are welcome at balint@k-i-s.net. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/install.html b/doc/install.html deleted file mode 100644 index 134ac5f..0000000 --- a/doc/install.html +++ /dev/null @@ -1,264 +0,0 @@ - - - -Photo Organizer Manual - Installation Instructions - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -INSTALLATION INSTRUCTIONS -
    -

    -

     

    -

    -

    -

     

    -Preparation -

    -First, read the Introduction, that contains -some important information I don't want to repeat once -more. -

    -There are three basic tasks necessary to install Photo Organizer: -

      -
    1. Prepare the database.
    2. -
    3. Install the PO source files.
    4. -
    5. Create the image repository.
    6. -
    7. Run the web install tool.
    8. -
    - -

     

    - -New Installations -- Database Preparation -

    -Follow these step by step instructions to install or upgrade the software: -
      -
    1. -Create a postgresql user and postgresql database. You will need to have access -to a postgresql user account that is allowed to create new users. -In case you are upgrading skip this step and use the exisiting -database and database user. We will refer to the database as po_database and to -the database user as po_user in the future.
    2. -

      - -
      -[balint@apollo ~]$ createuser -A -D -U pg_superuser po_user
      -CREATE USER
      -[balint@apollo ~]$ createdb -U po_superuser -O po_user po_database
      -CREATE DATABASE
      -
      - -

      - - -
    3. -As the superuser of your database server, add the plpgsql language to your -newly created database.
    4. -

      - -
      -[balint@apollo ~]$ createlang -U pg_superuser plpgsql po_database
      -
      -

      - - -
    - -New Installation or Upgrades - -
    - -
      -
    1. -Untar the distribution file (eg po.2.32.tar.bz2). Change directory -into the directory it creates (eg po 2.32). (If you can -read this file you already completed this step) All -directories in this document are relative to this one, -except when indicated otherwise. -

      - -
      -[balint@apollo ~]$ tar xvzf po.2.32.tar.gz
      -[balint@apollo ~]$ cd po.2.32
      -[balint@apollo po.2.32]$ ls
      -COPYING doc src
      -
      -

      -
    2. - -
    3. -

      -In the src directory, you will find the php files. You must copy these -over to a place accessible by your web server. -

      - -

      -Copy the whole src subtree into a location of your choice within the HTTP -server's document_root directory, or into the location of the old php files. You may need root permissions to do this. -

      -

      - -
      -[balint@apollo po.2.32]$ cd src
      -[balint@apollo src]$ cp -R * /var/www/html/po
      -
      -

      - -
    4. - -
    5. If this is a new installation (or you are upgrading from PO 2.31a or older) you will need to back up and copy over your site-specific configuration. -

      -

      - -
      -[balint@apollo src]$ cp include/config_site.php.dist /var/www/html/po/include/config_site.php
      -
      -

      -

      Edit the newly-copied /var/www/html/po/include/config_site.php file and ensure that all settings are correct. This file is not overwritten by upgrades, so you should only have to do this once.

      -
    6. - -
    7. -Log in as root and change the ownership of the installation (of the php -files and directories) to the user which runs the HTTP server. Make sure -that the index.php file is not only owned by the user that runs the HTTP server -but also has write permissions, so that you can edit your Front Page template -online. -

      - -
      -[balint@balint tmp]$ su
      -Password:
      -[root@apollo src]$ chown -R apache:apache /var/www/html/po
      -[root@apollo src]$ chmod +w /var/www/html/po/index.php
      -
      -

      -
    8. - -
    - -

     

    -Create the Photo Organizer Image Repository -

    -
      -
    1. Log in as root and create a directory anywere on the server (not located or linked -in the HTTP server's document root directory), we will reference this -directory as your image repository -

      - -
      -[root@apollo export]$ pwd
      -/export
      -[root@apollo export]$ mkdir my.repository
      -
      -

      -
    2. -
    3. -Check for the include/config_site.php file in your -PO installation directory, and edit the variable -$image_repository_path to point to your image -repository, than in the Photo Organizer administrator -interface, select the current volume. -

      -
    4. -
    5. -Change the ownership of the repository recusrively to the user -which runs the HTTP server (apache in our case), and make sure that -the user can read and write the repository. -

      - -
      -[root@apollo export]$ chown -R apache:apache my.repository
      -[root@apollo export]$ chmod -R 750 my.repository
      -
      -

      -
    6. -
    - -

     

    -Run the web installer -

    -
      -
    1. Now that the database is created, visit http://yourserver/path_to_po/install.php. This script will perform any necessary database upgrades and sanity-check the installation. Please follow any instructions it gives. -
    2. -
    3. Once the installer is finished, it will tell you to erase install.php. We highly recommend you do this to help keep your installation secure. -
    4. -
    - -

    -

    -Comments and corrections are welcome at po-devel@shaftnet.org. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/license.html b/doc/license.html deleted file mode 100644 index d886aa9..0000000 --- a/doc/license.html +++ /dev/null @@ -1,464 +0,0 @@ - - - -Photo Organizer License - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - - -
    - -
    - -
    -

     

    -

    -

    -PHOTO ORGANIZER LICENSE -
    -

    -

     

    -

    -

    -

     

    -

    -GNU GENERAL PUBLIC LICENSE -Version 2, June 1991 -
    -

    - -

    -

    -Copyright (C) 1989, 1991 Free Software Foundation, Inc.
    -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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 -licenser 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 -
    -

    - -

     

    - -
    - - -
    - - - -
    -

     

    - diff --git a/doc/migration.html b/doc/migration.html deleted file mode 100644 index d5ca9f0..0000000 --- a/doc/migration.html +++ /dev/null @@ -1,194 +0,0 @@ - - - -Migrating a 2.14 Photo Organizer Image Repository - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -PHOTO ORGANIZER 2 MIGRATION -
    -

    -

     

    -

    -Introduction | -Install | -Uninstall | -Configure | -Migration | -OpenBSD -License -
    -

    - - -

     

    -Who Should Migrate? -

    - -

    -All users having Photo Organizer version eralier than 2.14 should migrate -their Image Repository to maintain compatibility. -

    - -

     

    -Why Migrate? -

    - -

    -Before 2.14 the Image Repository stored all images (thumbnails, previews and -originals) in the same volume, which was a great disadvantage, inhibiting -the implementation of certain features that are comming with the 2.16 release. -

    -The 2.14 Image Repostory stores the thumbnails, previews and originals in separate -designated sub-volumes. This has two advantages: -

      -
    • It's easy to extend the repository to store photos in a large variety of dimensions -while keeping the repository structured.
    • -
    • It is possible to back up sub-volumes separately, and create an external media library, -where originals do not occupy valuable hard drive space but are stored on high capacity -removable medias, that are mounted upon request.
    • -
    -

    -Therefore, starting with 2.14 a new Image Repository has been created, one -that implements sub-volumes. -

     

    -The 2.6 Image Repository -

    -The 2.6 repository is based on a single layer volume scheme, -where volumes are in fact subdirectories in the Image Repository. -This repository can be located anywhere on the server, -with the restriction that it has to be owned by the user -which runs the HTTP server. -

    -The 2.6 repository also featured a completely automatic -volume management algorithm, with volume auto increment -and auto fill. For more information on these -features refer to the Administrator section of Photo Organizer's -Help. -

    -The disadvantage of the 2.6 repository is that it stores -all photos (original, preview and thumbnail) in the same -volume. -

     

    -The 2.14 Image Repository -

    -The 2.14 repository enhances the 2.6 repository by -creating sub-volumes, one for each photo format. Therefore in -each volume there is a separate sub-volume for the thumbnails, -one for the previews and one for the originals. Since most of the -storage space will be occupied by the sub-volume that contains the originals, -that sub-volume can be moved to a removable media allowing -the system administrator to spare some hard drive space. -

    -Once the originals are saved on a removable media, the system -stays operational since the preview and thumbnail of each photo is -still available. The 2.16 release will implement a feature that -allow users to submit "mount requests" to the system administrator -to mount a certain removable media that contains the desired original. -

     

    -How to Migrate the Repository -

    -If you install a 2.14 system from scratch, you don't have to migrate. -If you upgrade an exisiting system, back it up creating a database -dump (using the pg_dump utility) and by creating -a copy of your Image Repository. Should anything go wrong, you -have a chance to restore your system. After you are on the safe -side, run the install script, or -follow the manual upgrade instructions. -

    -After you completed the upgrade, visit your PO installation and -log in as administrator. Say, your Photo Organizer is accessible -under the following url: -

    -http://www.yourhost.com/po -

    -Once you are logged in as administrator, visit the following url: -

    -http://www.yourhost.com/po/migrate.php -

    -It is important to mentiona that while this script is running do not -interrupt it by pressing the STOP button on your browser. Depending -on how many pictures you have the migration might take quite a long time. -Let it run until it says "Done". Once the migration is completed -make sure to remove the migrate.php file. -

    -This script will migrate your exsting database and Image Repository, -providing you with accurate tracing information for each image file apart. -Normally every operation should conclude as OK and -you should see not a single trace stating: FAILED -

    -Although, for image entries that have no photo attached (when the -PO logo is displayed instead) the migration will fail -because no physical image file was found in the repository -for that image entry. -

     

    -

    -Comments and corrections are welcome at balint@k-i-s.net. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/openbsd.html b/doc/openbsd.html deleted file mode 100644 index 369520b..0000000 --- a/doc/openbsd.html +++ /dev/null @@ -1,469 +0,0 @@ - - - -Photo Organizer Manual Installation Instructions - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -INSTALLING PHOTO ORGANIZER IN THE OPENBSD CHROOT JAIL -
    -

    -

     

    -

    -

    -

     

    -Introduction -

    -This document is Matt Harrington's contribution, this copy was last updated on January 2, 2004. -For the latest version please visit Matt's website at -http://photo.underdogma.net/PO-OpenBSD-chroot.txt -

    -This document guides you through the installation of PhotoOrganizer v2.9 on an -OpenBSD system inside the chroot jail. While it is intended for OpenBSD and -uses various obsd'isms, it may be used as a reference for other systems. The -main difference is the handling of the chroot itself and the installation of -the packages. These instructions are in addition to the README files supplied -in the PO distribution and website, please read those before following these -instructions. -

    -Tasks for installing PO on OpenBSD in the chroot Jail: -

      -
    1. Install and configure PostgreSQL.
    2. -
    3. Install PHP4
    4. -
    5. Install ImageMagick
    6. -
    7. Install unzip
    8. -
    9. Install PO
    10. -
    11. Configure Apache
    12. -
    13. Troubleshooting
    14. -
    -

    -PO v2.9 requires the following pieces of software that are available either as -precompiled ports on the OpenBSD ftp site ftp://ftp.openbsd.org or as source in -the ports tree: -

    -

    - - - - - -
    PACKAGEGROUP REMARK
    ImageMagickgraphics/ImageMagick1
    PHP4 www/php4 1, 2
    PostgreSQL databases/postgresql1
    -

    - -
    - -
      -
    1. These packages require others that must also be installed.
    2. -
    3. At current, the php4-core package is not compiled with the proper options -meaning that a portion of this software has to be built by hand.
    4. -
    -
    - -

    -For portability, this document specifies variables instead file system paths. -All occurrences of these variables in this document should be replaced with -their actual value. These variables are: -

    - - - - - - -
    VARIABLEDESCRIPTION DEFAULT
    $pg_data location of pg database/data
    $po_root location of PO install photo
    $po_data location of PO data photo_store
    $www_chrootapache chroot /var/www
    -

    -

    The default values are what I use but can easily be changed.
    -

    - -

     

    -1. Installing PostgreSQL -

    -The instructions for installing and configuring the database are the same -as for any operating system. The simplest way is to install the OpenBSD -package which will install the relevant files in /usr/local/bin. Create a -user to run the database, the database repository, and fire up the database. -On my system, it was something like this (as root): -

    -

    - -
    -[narse@zord ~]$ setenv PGDATA $pg_data # or export PGDATA=$pg_data
    -[narse@zord ~]$ sudo -u postgres initdb
    -[narse@zord ~]$ useradd -c "PostgreSQL Admin" -d $pg_data -g daemon postgres
    -[narse@zord ~]$ sudo -u postgres pg_ctl -l $pg_data/pg.log start
    -
    -

    -
    - -Special provisions must be made for network database access, as described -in Configure section. -
    - - - - -

     

    -2. Install PHP4 -

    -The installation of php4 is very simple using the OpenBSD packages. -The following packages must be installed: -

    -

      -php4-core
      -php4-pear
      -php4-extensions
      -php4-pgsql
      -
    -

    -As of PO 2.9, php4-core needs to be compiled with EXIF support or photo -uploads will not function. This means compiling php4-core yourself which is -quite simple using the ports tree. Download ports.tar.gz from -ftp://ftp.openbsd.org, uncompress it, -and enter the ports/www/php4/core directory. Edit the Makefile and add the line: -

    -

      ' --enable-exif \ '
    -

    -somewhere in the middle of the CONFIGURE_ARGS definition. Then 'make install' -as you would with any other port. This will build and install an EXIF enabled -php4 package. For information about the ports tree, see http://openbsd.org. -

    -I have tested this with versions 4.3.3 and 4.3.4 and they both work out -of the box. After installing the packages, certain steps may need to be -taken. The packages will tell you what commands to execute. The steps will -be something like: -

    -

      -configure apache 'phpxs -s'
      -add 'AddType application/x-httpd-php .php' to $www_chroot/conf/httpd.conf
      -configure each module '/usr/local/sbin/phpxs -a some_module'
      -
    -

    - -

     

    -3. Install ImageMagick -

    -This step is tricky, it involves a bit of guess and check. Apache will be -running in the chroot meaning that all system calls will be relative to -$www_chroot instead of /. The installation of ImageMagick must be mirrored into -$www_chroot. First install the package as usual. ImageMagick requires several -other packages which also must be mirrored. -Start by creating the directory tree in $www_chroot (as root): -

    - -
    -[narse@zord ~]$ mkdir    $www_chroot/sbin
    -[narse@zord ~]$ mkdir -p $www_chroot/var/run
    -[narse@zord ~]$ mkdir -p $www_chroot/usr/X11R6/lib
    -[narse@zord ~]$ mkdir    $www_chroot/usr/bin
    -[narse@zord ~]$ mkdir -p $www_chroot/usr/local/lib
    -[narse@zord ~]$ mkdir    $www_chroot/usr/local/share
    -
    -

    -I do not know if this is required but a /tmp directory might also be a good -idea to have in the chroot jail: -

    - -
    -[narse@zord ~]$ mkdir     $www_chroot/tmp
    -[narse@zord ~]$ chmod 777 $www_chroot/tmp
    -[narse@zord ~]$ chmod +t  $www_chroot/tmp
    -
    -

    -Now, start mirroring things into the chroot tree. There are several -libraries that are required out of X11, these files are: -

    -

      -libICE.so.x.x libSM.so.x.x libX11.so.xx libXext.so.xx libXt.so.xx -
    -

    - -Copy these files from /usr/X11R6/lib to $www_chroot/usr/X11R6/lib. -Now, copy the relevant files from /usr/local/lib to -$www_chroot/usr/local/lib: - -

    -

      -libMagick.so.x.x  libintl.so.x.x  libjpeg.so.x.x  librecode.so.x.x
      -libiconv.so.x.x   libjbig.so.x.x  libpng.so.x.x   libtiff.so.x.x
      -ImageMagick/
      -
    -

    -From /usr/local/share to $www_chroot/usr/local/share: -

    -

      -ImageMagick/ -
    -

    -I am not sure what binaries are required as it may change depending on -the image format, so I chose to copy them all. From /usr/local/bin to -$www_chroot/usr/bin: -

    -

      -Magick++-config  cgimagick  display  iptcutil -Magick-config    combine    identify  mogrify -animate          convert    import    montage -
    -

    -I am not sure the importance of this next step. On OpenBSD, ldconfig is -used to configure the shared library cache. It loads data into -/var/run/ld.so.hints based on the libraries found on the system. To allow for -shared libraries inside the chroot jail, the jail must have its own -ld.so.hints . This means installing and running ldconfig inside the jail. -This involves: -

    - -
    -[narse@zord ~]$ cp /sbin/ldconfig $www_chroot/sbin/ldconfig
    -[narse@zord ~]$ touch $www_chroot/var/run/ld.so.hints
    -[narse@zord ~]$ chroot $www_chroot /sbin/ldconfig -v /usr/X11R6/lib /usr/local/lib
    -
    -

    -This should print the locations of all of the libraries mirrored into $www_chroot -relative to the chroot. -

    -Unfortunately, the PHP system() calls to ImageMagick (convert) are -executed inside their own shell instance. This means that you also must put a -valid shell inside the chroot. -

    - -
    -[narse@zord ~]$ cp /bin/sh $www_chroot/bin/sh
    -
    -

    -ImageMagick should now be completely installed. This is very easy to -test. Find some random large image from http://images.google.com and put -it in $www_chroot. For reference, it will be known as $big_image. Run the -command (as root): -

    - -
    -[narse@zord ~]$ chroot $www_chroot convert -geometry 210x297 /$big_image /small_image
    -
    -

    -If convert executes without error and there is now an image named -$www_chroot/small_image, then ImageMagick works. If there was a problem, then -the error message is your best bet, but remember that all path names will be -relative to the chroot instead of /. -

    - -

     

    -4. Install unzip -

    -PhotoOrganizer supports `bulk uploads', which allow users to upload -several photos at once by packing them inside a zip file. At current, -PhotoOrganizer uses a system call to `unzip'. Install unzip somewhere PO can -find it. -

    -

    - -
    -[narse@zord ~]$ cp /usr/local/unzip $www_root/bin -
    -

    - -

     

    -5. Install PO -

    -For the most part, the instructions are the same. Either run the install -script or follow the FOR NERDS documentation. Just remember that everything -must be installed inside $www_chroot or it will not be accessible. For my -installation, I chose $www_chroot/$po_root for the Target Directory and -$www_chroot/$po_data for the Image Repository. You must connect to the -database via a network connection. Even if the database server is the local -machine, apache will not have access to the database file socket so you must -connect to 127.0.0.1. -

    -Once the installation has completed, it is important that some changes -are made in the configuration. PO's configure file is in include/config.php -inside the Target Directory. Open this file in an editor. You must change the -$image_repository_path to be relative to the chroot. For example, if the -repository is $www_chroot/$po_data , set this variable to /$po_data. -The $tmp_volume_path may also need to be set if it is not set to /tmp. - -

     

    -6. Configure Apache -

    -This portion of the setup can vary greatly, it is mostly a matter of how -the user wishes to configure the web server. As long as the PO directory is -visible it should function. I chose to install it as a virtual host so that -photo.mydomain.net will point only to my photo album. My configuration looks -like this: -

    - -
    -<Directory /$po_root>
    -  Options MultiViews Indexes IncludesNoExec
    -  AllowOverride AuthConfig
    -  Order allow,deny
    -  Allow from all
    -</Directory>
    -<VirtualHost *>
    -  DocumentRoot /$po_root
    -  ServerName photo.mydomain.net
    -  ServerAlias photos.mydomain.net
    -  ServerAlias pictures.mydomain.net
    -  ServerAlias photo
    -  ServerAlias photos
    -  ServerAlias pictures
    -  ErrorLog logs/photo.mydomain.net-error_log
    -  CustomLog logs/photo.mydomain.net-access_log common
    -</VirtualHost>
    -
    -

    -Thats it! - -

     

    -7. Troubleshooting -

    -If you have read to this point, you are probably quite frustrated. The -first step to take in troubleshooting anything is to take a break, go get a -sandwich, then keep reading. -

    -There are several areas where things can go wrong. -

      -
    1. PHP does not run -

      -When accessing the php site, you see only PHP code. This means that -PHP has not been installed or configured correctly. If there is an -obvious error in the PHP setup inside your apache config file, apache -will tell you when you start it. Look for errors. Check log files. -Make sure that apache knows to actually run the .php files. Old -configurations might be set to run .php3 and not .php. -

      -
    2. -
    3. Cannot login -

      -This is probably a database error. PO requires the ability to connect -to a database when authenticating users and may not give you a good -error when it cannot connect. Check your database configuration and -assure that the variables in include/config.php are correct. A good -place to start is by checking your database logs for failed -connections. -

      -
    4. -
    5. Cannot Convert Images -

      -This is the hardest problem to deal with because it could be a factor -of any number of things. -

        -
      1. Permissions -If the permissions on the $po_data directory are set incorrectly, -it will be impossible to store the photos inside the repository. -Verify that the user running the database has permissions to write -files in $www_chroot/tmp, $www_chroot/$po_data, and all subsequent -directories in $www_chroot/$po_data. -

        -
      2. -
      3. Path -

        -Currently I do now know how to set the path in which system() -calls are searched for. The call to convert is not an absolute -path so the shell PHP executes has to look for it. Try linking -$www_chroot/usr/bin to $www_chroot/bin -

        -
      4. -
      5. Drive Space -

        -Images are large, make sure there is enough space for the images -you are uploading. There must be space in $www_chroot/tmp as well -as the repository for the image you are uploading. -

        -
      6. -
      7. Safe_mode -

        - PHP has a mode called Safe_mode in which it limits the permissions - of scripts. It is a good idea to have Safe_mode on at all times - but trying PO with it off may give you a hint as to why it does - not work. To turn it off, set 'Safe_mode = Off' in your php.ini . - I cannot recommend doing this for long periods of time, it may - result in remote exploits on your server. -

        -
      8. -
      -
    6. -
    7. Anything Else -

      -The best I can say is 'be creative'. Try and walk through the steps -that PO would be doing and see what works and what doesn't. Put in -some debugging 'print's into the code and see where it gets stuck. -

      -
    8. -
    -

    -

    Good luck!
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/test.html b/doc/test.html deleted file mode 100644 index 2c9ca1c..0000000 --- a/doc/test.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - -Photo Organizer Manual - System Test Report - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -PHOTO ORGANIZER SYSTEM TEST REPORT
    -VERSION 2.16 -
    -

    -

     

    -

    -

    -

     

    -Summary -

    -Photo Organizer Version 2.16 passed the following test cases: -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    INSTALLATION
      New Installation 2.16
      Upgrade of previous version 2.16
    FOLDERS
      Create New Folder 2.16
      Upgrade of previous version 2.16
    Folders
      Create New Folder 2.16
      Change Folder Attributes 2.16
      Iterate Folder Content 2.16
      Order Folder Content 2.16
      Move Photos 2.16
      Link Photos 2.16
      List View 2.16
      Print Multiple Photo Brochure 2.16
      Print Multiple Photo Label 2.16
      Export Multiple Photos 2.16
      Export Multiple Photos with XML 2.16
      Delete Folder 2.16
      Empty Trash 2.16
    Albums
      Create New Album 2.16
      Change Album Attributes 2.16
      Iterate Album Content 2.16
      Order Album Content 2.16
      Move Photos 2.16
      Print Multiple Photo Brochure 2.16
      Print Multiple Photo Label 2.16
      List View 2.16
      Delete Album 2.16
    Photo
      Import Single Photo 2.16
      Import Multiple Photos 2.16
      Import Multiple Photos with XML 2.16
      Export Single Photo 2.16
      Export Single Photo with XML 2.16
      Edit Photo Properties 2.16
      Move Photo Into Folder 2.16
      Link Photo To Album 2.16
      Rotate Photo 2.16
      Print Single Photo Brochure 2.16
      Print Single Photo Label 2.16
      Iterate Photos 2.16
      Add Photo Version 2.16
      Change Photo Version Attributes 2.16
      Remove Version 2.16
      Add Photo Dupe 2.16
      Change Photo Dupe Attributes 2.16
      Remove Dupe 2.16
      Add Submission 2.16
      Change Submission Attributes 2.16
      Remove Submission 2.16
      Add Rating 2.16
      Change Rating 2.16
      Remove Rating 2.16
      Add Shop Item 2.16
      Change Shop Item Attributes 2.16
      Remove Shop Item 2.16
    DateBook
      Iterate Day View 2.16
      Iterate Week View 2.16
      Iterate Month View 2.16
      Check GoTo 2.16
      Create Event 2.16
      Display Event in all Views 2.16
      Change Event Attributes 2.16
      Delete Event 2.16
      Delete Client Subscriptions 2.16
      Change Your Client's Subscription Attributes 2.16
      Delete Your Client's Subscription 2.16
      Change Order Status 2.16
    Shop
      Shop Items from Folder View 2.16
      Shop Items from Album View 2.16
      Shop Items from Photo View 2.16
      Change Item Attributes in the Basket 2.16
      Remove Item From Basket 2.16
      Confirm Purchase 2.16
    Profile
      Create Location 2.16
      Change Location Attributes 2.16
      Remove Location 2.16
      Create Photo Format 2.16
      Change Photo Format Attributes 2.16
      Remove Photo Format 2.16
      Create Label 2.16
      Change Label Attributes 2.16
      Remove Label 2.16
      Create Manufacturer 2.16
      Change Manufacturer Attributes 2.16
      Remove Manufacturer 2.16
      Create Support 2.16
      Change Support Attributes 2.16
      Remove Support 2.16
      Create Film 2.16
      Change Film Attributes 2.16
      Remove Film 2.16
      Create Filter 2.16
      Change Filter Attributes 2.16
      Remove Filter 2.16
      Create Scanner 2.16
      Change Scanner Attributes 2.16
      Remove Scanner 2.16
      Create Flash 2.16
      Change Flash Attributes 2.16
      Remove Flash 2.16
      Create Camera 2.16
      Change Camera Attributes 2.16
      Remove Camera 2.16
      Create Lens 2.16
      Change Lens Attributes 2.16
      Remove Lens 2.16
    Settings
      Change Identification Attributes 2.16
      Change Contact Information 2.16
      Change Calendar Attributes 2.16
      Change Search Engine Parameters 2.16
      Change Phot Broswer Parameters 2.16
      Change Photo Upload Parameters 2.16
      Change Printer Attributes 2.16
    Tools
      Generate Sample XML File 2.16
      Convert TXT file into XML 2.16
      Convert NKN file into XML 2.16
      Convert SDF file into XML 2.16
    Administration
      Change Active Volume 2.16
      Change Active Volume Quota 2.16
      Change New User Preferences 2.16
      Edit User Account Attributes 2.16
      Delete User Account 2.16
    Users
      Visit User Account 2.16
      Register as Client 2.16
    Search
      Perform General Search Query 2.16
      Perform Advanced Search Query 2.16
    Login & Registration
      Register 2.16
      Logout 2.16
      Login Single Session 2.16
      Login Multi Session 2.16
    Help
      Check Chapters 2.16
      Iterate Chapters 2.16
    -

    - - -

    -

    -Comments and corrections are welcome at balint@k-i-s.net. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/doc/uninstall.html b/doc/uninstall.html deleted file mode 100644 index d8c5284..0000000 --- a/doc/uninstall.html +++ /dev/null @@ -1,172 +0,0 @@ - - - -Photo Organizer Manual - Installation Instructions - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -

     

    -

    -

    -HOW TO GET RID OF PHOTO ORGANIZER -
    -

    -

     

    -

    -Introduction | -Install | -Uninstall | -Configure | -OpenBSD | -Migration | -License -
    -

    -

     

    -Preparation -

    -To uninstall the system perform the following steps (the order does not matter): -
      -
    1. Remove the Photo Organizer PHP files.
    2. -
    3. Remove the Photo Organizer Image Repository.
    4. -
    5. Drop Photo Organizer's PostgreSQL database and database user.
    6. -
    - -

     

    -Remove the PHP files -

    -Locate the Photo Organizer php files (which should be located in the HTTP server's -document root directory). As root, remove all files with the following command: -

    - -
    -[root@everest ~]$ cd /var/www/html/po
    -[root@everest po]$ pwd
    -/var/www/html/po
    -[root@everest po]$ rm -rf *
    -
    - -

     

    -Remove the Photo Organizer Image Repository -

    -Locate the Photo Organizer image repository. As root, remove all files with the following command: -

    - -
    -[root@everest ~]$ cd /export/my.repository
    -[root@everest my.repository]$ rm -rf *
    -
    - - -

     

    -Drop Photo Organizer's PostgreSQL database and database user -

    -First list all databases and their users: -

    - -
    -[balint@everest ~]$ psql -l
    -          List of databases
    -    Name     |    Owner     | Encoding
    --------------+--------------+-----------
    - po_database | po_user      | SQL_ASCII
    - template0   | pg_superuser | SQL_ASCII
    - template1   | pg_superuser | SQL_ASCII
    -(3 rows)
    -
    -

    -Remove first the database, than the database user. The order does matter here because -the database user cannot be removed as long there are databases created by that user. -

    - -
    -[balint@everest ~]$ dropdb -U po_user po_database
    -DROP DATABASE
    -[balint@everest ~]$ dropuser -U pg_superuser po_user
    -DROP USER
    -[balint@everest ~]$ -
    -

    -You can check that your database was removed with the same command used -above to list the databases: -

    - -
    -[balint@everest ~]$ psql -l
    -          List of databases
    -    Name     |    Owner     | Encoding
    --------------+--------------+-----------
    - template0   | pg_superuser | SQL_ASCII
    - template1   | pg_superuser | SQL_ASCII
    -(2 rows)
    -
    -

    - - -

    -Comments and corrections are welcome at balint@k-i-s.net. -
    -

    - -
    - -
    - - - -
    -

     

    - diff --git a/old_install b/old_install deleted file mode 100644 index 5d9c5fd..0000000 --- a/old_install +++ /dev/null @@ -1,619 +0,0 @@ -#!/bin/csh - -# Copyright (C) 2003-2006 Balint Kis (balint@k-i-s.net) -# Copyright (C) 2005-2006 Solomon Peachy (pizza@shaftnet.org) - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -set dir_work = `pwd` -set dir_def_target = '/var/www' -set dir_def_repos = '/var/po' -set dir_install_log = $dir_work/'logs' - -set url_def = 'http://localhost/' - -set db_def_host = 'localhost' -set db_def_port = '5432' -set db_def_supuser = 'postgres' -set db_def_user = 'apache' -set db_def_dbname = 'photo' -set db_def_passwd = 'none' - -set httpd_def_user = 'apache' - -set po_source = $dir_work/'src' -set po_config_file = 'include/config.php' -set po_site_config_file = 'include/config_site.php' -set po_site_config_template = 'include/config_site.php.dist' -set dir_target = $dir_def_target -set dir_image_rep = $dir_def_repos -set url_site = $url_def - -set os = `uname` -if ("$os" == "SunOS") then -set whoami = "/usr/ucb/whoami" -set awk = "nawk" -else -set whoami = "whoami" -set awk = "awk" -endif - -clear -echo "" -echo "==========================================================" -echo " P H O T O O R G A N I Z E R" -echo "==========================================================" -echo "" -echo " Copyright (C) 2002-2006 Balint Kis" -echo " Copyright (C) 2005-2006 Solomon Peachy" -echo "" -echo " http://po.shaftnet.org/" -echo "" - -set user = `$whoami` -if ("$user" != "root") then - echo "You must run this install script as root. During the" - echo "installation, the ownership of the installed files must" - echo "be changed to the user which runs the HTTP server." - echo "" - echo "If you don't trust this script, you can install the" - echo "system manually, following the step by step" - echo "instructions found in the doc/install.html document." - echo "" - exit 1 -endif - -set this_host=`uname -n` - -echo "This script will install or upgrade PHOTO ORGANIZER" -echo "on $this_host (this computer)." -echo "" -echo "If you don't trust this script, you can install the" -echo "system manually, following the step by step" -echo "instructions found in the doc/install.html document." -echo "" -echo "In case you upgrade a previous installation, the installer" -echo "will search for the location and the configuration" -echo "parameters of your existing system, which you can" -echo "override." -echo "" -echo "Please make sure that PostgreSQL version 7.4 or newer is" -echo "installed so that accepts TCP/IP connections, and that" -echo "you have access to a PostgreSQL user account which is" -echo "allowed to create new databases and database users." -echo "" -echo "The script will first collect all the data needed to" -echo "perform the installation." -echo "Before starting the actual installation process you" -echo "can check all your details once more and correct it" -echo "in case something is wrong." -echo "" -echo "Afterwards the installation will take approximately 30" -echo "seconds or less depending on your computer architecture." -echo "" -echo "Press [Q] - to exit the installation process" -echo " [ ] - or any other key to start" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [qQ]*: - exit 0 - default: - breaksw -endsw - -set db_created = '0'; - -start_install: - -# WE DO OUR BEST TO LOOK UP FOR EXISTING INSTALLATIONS - -echo "Searching for previous Photo Organizer Installations ..." -set httpd_document_root = `find /etc /usr/local -name "httpd\.conf"`; -set httpd_document_root = `echo $httpd_document_root | $awk '{ printf "%s", $1 }'`; -set httpd_document_root = `echo $httpd_document_root | xargs grep -i ^documentroot`; -set httpd_document_root = `echo $httpd_document_root | $awk -F '\"' '{ printf "%s", $2 }'`; - -echo "$httpd_document_root" - -set old_po_config_file = `find $httpd_document_root -name "config_site\.php"`; -if (-z "$old_po_config_file") { - set old_po_config_file = `find $httpd_document_root -name "config\.php"`; -} - -set config_po_target_dir = `find $httpd_document_root -name "photo\.add\.php"`; -set config_po_target_dir = `echo $config_po_target_dir | $awk -F '/photo' '{ printf "%s", $1 }'`; - -set config_po_repository = `echo $old_po_config_file | xargs grep -i image_repository_path`; -set config_po_repository = `echo $config_po_repository | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_url = `echo $old_po_config_file | xargs grep -i site_url`; -set config_po_url = `echo $config_po_url | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_host = `echo $old_po_config_file | xargs grep -i db_host`; -set config_po_host = `echo $config_po_host | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_port = `echo $old_po_config_file | xargs grep -i db_port`; -set config_po_port = `echo $config_po_port | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_name = `echo $old_po_config_file | xargs grep -i db_name`; -set config_po_name = `echo $config_po_name | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_user = `echo $old_po_config_file | xargs grep -i db_user`; -set config_po_user = `echo $config_po_user | $awk -F '"' '{ printf "%s", $2 }'`; - -set config_po_passwd = `echo $old_po_config_file | xargs grep -i db_password`; -set config_po_passwd = `echo $config_po_passwd | $awk -F '"' '{ printf "%s", $2 }'`; - -clear - -if ("$old_po_config_file" == "") then - goto get_target_directory; -endif - -echo "" -echo "----------------------------------------------------------" -echo " A PREVIOUS INSTALLATION WAS FOUND" -echo "----------------------------------------------------------" -echo "" -echo "HTTP URL" -echo " $config_po_url" -echo "" -echo "Target Directory" -echo " $config_po_target_dir" -echo "" -echo "Image Repository" -echo " $config_po_repository" -echo "" -echo "Database Connection:" -echo " Host: $config_po_host" -echo " Port: $config_po_port" -echo " Database: $config_po_name" -echo " User: $config_po_user" -echo " Password: $config_po_passwd" -echo "" -echo "Press [U] - to use these values as defaults and continue" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue and use" -echo " system default values" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [uU]*: - set db_def_host = "$config_po_host" - set db_def_port = "$config_po_port" - set db_def_user = "$config_po_user" - set db_def_dbname = "$config_po_name" - set db_def_passwd = "$config_po_passwd" - - set dir_def_target = "$config_po_target_dir" - set dir_target = "$config_po_target_dir" - - set dir_def_repos = "$config_po_repository" - set dir_image_rep = "$config_po_repository" - - set url_site = "$config_po_url" - set url_def = "$config_po_url" - - goto get_target_directory - case [qQ]*: - goto abort - default: - goto get_target_directory -endsw - - -# READING TARGET DIRECTORY - -get_target_directory: -clear -echo "" -echo "----------------------------------------------------------" -echo " TARGET DIRECTORY" -echo "----------------------------------------------------------" -echo "" -echo "All files belonging to your PO installation will be" -echo "located in your target directory." -echo "" -echo "Say you want to access your PO installation via:" -echo "http://yourhost/po" -echo "" -echo "Let's presume that your HTTP document root directory is:" -echo "/my/http/document_root" -echo "In this case you will have to install the software into:" -echo "/my/http/document_root/po" -echo "All installed files will be copied into this directory" -echo "including the help, sql, and theme files." -echo "" -echo "Please enter the Photo Organizer target directory" -echo "(full path as in the example above):" -echo "[$dir_target]> " | $awk ' { printf "%s", $0 }' -set dir_target = `/bin/sh -c 'read a; echo $a'` -if ("$dir_target" == "") then - set dir_target = $dir_def_target -else - set dir_def_target = $dir_target -endif -echo "" -echo "Photo Organizer will be installed in $dir_target" -echo "" -echo "Press [B] - to change the target directory" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto get_target_directory - case [qQ]*: - goto abort - default: - breaksw -endsw - -# SITE URL - -get_image_rep: -clear -echo "" -echo "----------------------------------------------------------" -echo " PHOTO ORGANIZER SITE URL" -echo "----------------------------------------------------------" -echo "" -echo "Please enter the full URL to your Photo Organizer" -echo "installation, that must begin with http:// and end with /" -echo "" -echo "[$url_site]> " | $awk ' { printf "%s", $0 }' -set url_site = `/bin/sh -c 'read a; echo $a'` -if ("$url_site" == "") then - set url_site = $url_def -else - set url_def = $url_site -endif -echo "" -echo "The Photo Organizer URL is $url_site" -echo "" -echo "Press [B] - to change the URL" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto get_image_rep - case [qQ]*: - goto abort - default: - breaksw -endsw - -# READING IMAGE REPOSITORY - -get_image_rep: -clear -echo "" -echo "----------------------------------------------------------" -echo " IMAGE REPOSITORY" -echo "----------------------------------------------------------" -echo "" -echo "Photo Organizer stores the image files in a image" -echo "repository. Starting with V2.6 this repository can be" -echo "located anywhere on the server, and it doesn't have to be" -echo "linked into the HTTP server's document root directory." -echo "" -echo "Please enter the full path to the image repository" -echo "It is recommended that you speficy a large (possibly" -echo "mirrored) volume:" -echo "[$dir_image_rep]> " | $awk ' { printf "%s", $0 }' -set dir_image_rep = `/bin/sh -c 'read a; echo $a'` -if ("$dir_image_rep" == "") then - set dir_image_rep = $dir_def_repos -else - set dir_def_repos = $dir_image_rep -endif -echo "" -echo "Photo Organizer will store your image files in $dir_image_rep" -echo "" -echo "Press [B] - to change the image repository" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto get_image_rep - case [qQ]*: - goto abort - default: - breaksw -endsw - -# HTTP SERVER USER - -set http_user_name = $httpd_def_user -get_http_server_details: -clear -echo "" -echo "----------------------------------------------------------" -echo " HTTP SERVER DETAILS" -echo "----------------------------------------------------------" -echo "" -echo "Specify the username which under which the Apache HTTP" -echo "server runs. This user will own the Photo Organizer files." -echo "[$http_user_name]> " | $awk ' { printf "%s", $0 }' -set http_user_name = `/bin/sh -c 'read a; echo $a'` -if ("$http_user_name" == "") then - set http_user_name = $httpd_def_user -else - set httpd_def_user = $http_user_name -endif -echo "" -echo "The owner of the Photo Organizer installation will" -echo "be $http_user_name" -echo "" -echo "Press [B] - to change the installation owner" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto get_http_server_details - case [qQ]*: - goto abort - default: - breaksw -endsw - -# DATABASE SERVER AND PORT - -set db_serv_host = $db_def_host -set db_serv_port = $db_def_port -set db_serv_supuser = $db_def_supuser -set db_user = $db_def_user -set db_name = $db_def_dbname -set db_passwd = $db_def_passwd - -get_db_serv_details: -clear -echo "" -echo "----------------------------------------------------------" -echo " DATABASE SERVER DETAILS" -echo "----------------------------------------------------------" -echo "" -echo "Specify the database server used by Photo Organizer." -echo "Host ip address or name: " -echo "[$db_serv_host]> " | $awk ' { printf "%s", $0 }' -set db_serv_host = `/bin/sh -c 'read a; echo $a'` -if ("$db_serv_host" == "") then - set db_serv_host = $db_def_host -else - set db_def_host = $db_serv_host -endif -echo "Database server port: " -echo "[$db_serv_port]> " | $awk ' { printf "%s", $0 }' -set db_serv_port = `/bin/sh -c 'read a; echo $a'` -if ("$db_serv_port" == "") then - set db_serv_port = $db_def_port -else - set db_def_port = $db_serv_port -endif -echo "Database superuser (or a database user who is allowed to" -echo "create new users and databases): " -echo "[$db_serv_supuser]> " | $awk ' { printf "%s", $0 }' -set db_serv_supuser = `/bin/sh -c 'read a; echo $a'` -if ("$db_serv_supuser" == "") then - set db_serv_supuser = $db_def_supuser -else - set db_def_supuser = $db_serv_supuser -endif -echo "Database username (a name of your choice): " -echo "[$db_user]> " | $awk ' { printf "%s", $0 }' -set db_user = `/bin/sh -c 'read a; echo $a'` -if ("$db_user" == "") then - set db_user = $db_def_user -else - set db_def_user = $db_user -endif -echo "Database name (a name of your choice): " -echo "[$db_name]> " | $awk ' { printf "%s", $0 }' -set db_name = `/bin/sh -c 'read a; echo $a'` -if ("$db_name" == "") then - set db_name = $db_def_dbname -else - set db_def_dbname = $db_name -endif -echo "Database password: " -echo "[$db_passwd]> " | $awk ' { printf "%s", $0 }' -set db_passwd = `/bin/sh -c 'read a; echo $a'` -if ("$db_passwd" == "") then - set db_passwd = $db_def_passwd -else - set db_def_passwd = $db_passwd -endif -echo "" -echo "Photo Organizer will connect to the following database server:" -echo " Host: $db_serv_host" -echo " Port: $db_serv_port" -echo " Database: $db_name" -echo " Superuser: $db_serv_supuser" -echo " User: $db_user" -echo " Password: $db_passwd" -echo "" -echo "Press [B] - to change the database server" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to continue" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto get_db_serv_details - case [qQ]*: - goto abort - default: - breaksw -endsw - -set PG_PASSWORD = $db_passwd - -# LAST CHECK - -clear -echo "" -echo "----------------------------------------------------------" -echo " LAST CHECK" -echo "----------------------------------------------------------" -echo "" -echo "Before the installer starts please check once more that" -echo "the data you entered is correct" -echo "" -echo "You are about to install Photo Organizer into the following" -echo " Target Directory: $dir_target" -echo "" -echo "The follwing repositories will be created" -echo " Image Repository: $dir_image_rep" -echo "" -echo "The Photo Organizer URL is:" -echo " $url_site" -echo "" - -echo "The installation will be owned by" -echo " Owner: $http_user_name" -echo "" -echo "The installer will connect to" -echo " Host: $db_serv_host" -echo " Port: $db_serv_port" -echo " As: $db_serv_supuser" -echo "" -echo "and create/update the following" -echo " Database: $db_name" -echo " Database user: $db_user" -echo " Database password: $db_passwd" -echo "" -echo "" -echo "Press [B] - to start over" -echo " [Q] - to cancel the installation process" -echo " [ ] - or any other key to begin the installation" -echo "> " | $awk ' { printf "%s", $0 }' -set selection = `/bin/sh -c 'read a; echo $a'` -switch ($selection) - case [bB]*: - goto start_install - case [qQ]*: - goto abort - default: - breaksw -endsw - -clear - -if (-d $dir_target) then -# WE DON'T CLEAN UP ANY LONGER THE TARGET DIRECTORY; ONCE SOMEBODY -# TRIED TO INSTALL PO IN THE DOCUMENT ROOT SO ALL PHP FILES WERE REMOVED -# find $dir_target | grep ".php" | xargs rm - set dir_target_backup = $dir_target"_backup" - mv $dir_target $dir_target_backup - echo "The contents of $dir_target was moved to $dir_target_backup." - mkdir $dir_target -else - mkdir -p $dir_target - chmod 755 $dir_target - if (!(-d $dir_target)) then - echo "Error: Could not create $dir_target" - echo " Please make sure that you have permissions to" - echo " create the $dir_target directory" - goto abort - endif - echo "Directory $dir_target created." -endif - -if (!(-d $dir_install_log)) then - mkdir -p $dir_install_log - chmod 755 $dir_install_log - if (!(-d $dir_install_log)) then - echo "Error: Could not create $dir_install_log" - echo " Please make sure that you have permissions to" - echo " create the $dir_install_log directory" - goto abort - endif - echo "Directory $dir_install_log created." -endif - -echo "----------------------------------------------------------" -echo "COPYING FILES" -echo "----------------------------------------------------------" - -echo "Copy source files to $dir_target ..." -cd $dir_work - -cp -Rf $po_source/* $dir_target -cd $dir_target - -echo "----------------------------------------------------------" -echo "CREATING/UPGRADING THE DATABASE" -echo "----------------------------------------------------------" - -if ($db_name != $old_db_name) then - createuser -h $db_serv_host -p $db_serv_port -A -d -U $db_serv_supuser $db_user - createdb -h $db_serv_host -p $db_serv_port -U $db_user $db_name - psql -h $db_serv_host -p $db_serv_port -U $db_serv_supuser -t -c "alter user $db_user with password '$db_passwd'" $db_name -# createlang -h $db_serv_host -p $db_serv_port -U $db_serv_supuser plpgsql $db_name - set db_created = '1'; -endif - -echo "----------------------------------------------------------" -echo "CONFIGURING PHOTO ORGANIZER" -echo "----------------------------------------------------------" - -# XXXXXXXX only if no config_inc file present. - -if (! -e $dir_target/$po_site_config_file) then - cd $dir_work - cp $dir_work/$po_site_config_template $dir_target/$po_site_config_file - sed -i -e "s/\(site_url.*=.*\)\".*\"/\1\"$url_site\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(image_repository_path.*=.*\)\".*\"/\1\"$dir_image_rep\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(db_host.*=.*\)\".*\"/\1\"$db_serv_host\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(db_port.*=.*\)\".*\"/\1\"$db_serv_port\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(db_name.*=.*\)\".*\"/\1\"$db_name\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(db_user.*=.*\)\".*\"/\1\"$db_user\"/" $dir_target/$po_site_config_file - sed -i -e "s/\(db_password.*=.*\)\".*\"/\1\"$db_pwssword\"/" $dir_target/$po_site_config_file -endif - -echo "Photo Organizer configured." - -echo "----------------------------------------------------------" -echo "CHANGING OWNERSHIP" -echo "----------------------------------------------------------" - -chown -R $http_user_name $dir_target | cat > $log_chown -chown -R $http_user_name $dir_image_rep | cat > $log_chown - -echo "Ownership changed" - -finish: -echo "" -echo "Installation finished successfully." -echo "Please visit $config_po_url/install.php to complete installation." - -exit 0 - -abort: -if ($db_created == '1') then - dropdb -h $db_serv_host -p $db_serv_port -U $db_user $db_name - dropuser -h $db_serv_host -p $db_serv_port -U $db_serv_supuser $db_user -endif -echo "" -echo "Installation aborted." -exit diff --git a/src/COPYING b/src/COPYING deleted file mode 100644 index 3912109..0000000 --- a/src/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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/src/admin.php b/src/admin.php index eab6cb0..889ac66 100644 --- a/src/admin.php +++ b/src/admin.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,66 +17,45 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/admin.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; include_once "include/import.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_ADMIN); -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$selector = $_REQUEST['selector']; -if (!$selector) { - $selector = 1; -} +$selector = isset($_REQUEST['selector']) ? $_REQUEST['selector'] : 1; $all_user_types = pg_query($database, " select user_type.identifier, user_type.value from user_type - where identifier != $user_type[administrator]"); - -$system_preferences = pg_fetch_row(pg_query($database, " - select user_type.value, new_user_bulk_upload_enable, paper.name, new_user_label, current_volume, volume_max_size, new_user_shop_enable, - new_user_quota_size, new_user_quota_count, new_user_shared - from system_preferences, user_type, paper, label - where system_preferences.new_user_type=user_type.identifier - and system_preferences.new_user_paper = paper.identifier")); - -error_reporting(0); + where identifier != ".PO_USER_TYPE_ADMIN.""); $version = pg_fetch_assoc(pg_query($database, "select major,minor,variation from version")); -site_header($page_width, "Administrator Interface"); +site_header($strings['generic']['admin']); site_navigator(9); -site_navigator_status("Administrator Interface", "PHP v" . version() . " DB v$version[major].$version[minor].$version[variation]"); +site_navigator_status($strings['generic']['admin'], "PHP v$po_version DB v$version[major].$version[minor].$version[variation]"); -print " 
    "; display_navigator_box_top($selector, $admin_data, "100%"); -print " 
    "; switch ($selector) { case $admin_data['repository']['idx']: - display_image_repository($image_repository_path, $system_preferences); - break; - case $admin_data['new_user']['idx']: - display_new_user_properties($database, $system_preferences); + display_image_repository($database, $image_repository_path); break; case $admin_data['users_n_clients']['idx']: display_users_and_clients($database, $po_user['id']); break; case $admin_data['front_page']['idx']: - display_front_page_editor("index.php"); + if (is_readable("index_site.php")) { + display_front_page_editor("index_site.php"); + } else { + display_front_page_editor("index_site.php.dist"); + } + break; } display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/admin.system.edit.2.php b/src/admin.system.edit.2.php deleted file mode 100644 index b1662fc..0000000 --- a/src/admin.system.edit.2.php +++ /dev/null @@ -1,58 +0,0 @@ - diff --git a/src/admin.system.edit.php b/src/admin.system.edit.php deleted file mode 100644 index a856671..0000000 --- a/src/admin.system.edit.php +++ /dev/null @@ -1,119 +0,0 @@ -Adminstrator Interface : Edit System Preferences ", ""); - -print " 
    "; -display_navigator_box_top($admin_data['new_user']['idx'], $admin_data, "100%"); - -print " 
    "; -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    New User Preferences
    User TypeBulk UploadShopSharedQuota SizeQuota CountDefault PaperDefault Label
    "; -display_combo("new_user_type", $all_user_types, $system_preferences[0], "", 1); -print "\n"; -display_enable_disable_combo("new_user_bulk_upload_enable", $system_preferences[1]); -print "\n"; -display_enable_disable_combo("new_user_shop_enable", $system_preferences[4]); -print "\n"; -display_yes_no_combo("new_user_shared", $system_preferences[7]); -print "\n"; -print " Mb"; -print "\n"; -print ""; -print ""; -display_combo("new_user_paper", $all_papers, $system_preferences[2], ", ", 1); -print "\n"; -display_combo("new_user_label", $all_labels, $system_preferences[3], ", ", 1); -print "
    \n"; - -print " 
    "; -print ""; -print "\"Cancel\"/"; -print "\n"; -print "
    \n"; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/admin.user.del.2.php b/src/admin.user.del.2.php index fb28f2b..4412a29 100644 --- a/src/admin.user.del.2.php +++ b/src/admin.user.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,434 +17,153 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/site.php"; include_once "include/admin.php"; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_ADMIN); $user_id = pg_escape_string($_REQUEST['user']); -$photos_to_be_removed = pg_query($database, " - select small_image_path, medium_image_path, large_image_path - from photo, photo_version - where photo.identifier = photo_version.photo - and users = $user_id"); - pg_query($database, "begin"); +$photos_to_be_removed = pg_query($database, " + select path + from photo, photo_version, files + where files.version = photo_version.identifier + and photo.identifier = photo_version.photo + and photo.users = $user_id"); + $result = pg_query($database, "delete from rating where users='$user_id'"); + +if ($result) { + $result = pg_query($database, "update paper set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from label where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from calendar where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update calendar set client = null where client='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from client where users='$user_id' or client='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from rating where photo in (select identifier from photo where users='$user_id')"); +} +if ($result) { + $result = pg_query($database, "delete from files where version in (select identifier from photo_version v where v.photo in(select identifier from photo p where p.users = $user_id))"); +} +if ($result) { + $result = pg_query($database, "delete from photo_keywords where photo in (select identifier from photo where users='$user_id')"); +} +if ($result) { + $result = pg_query($database, "delete from photo_dupe where photo in (select identifier from photo where users='$user_id')"); +} +if ($result) { + $result = pg_query($database, "delete from album_content where album in (select identifier from album where users='$user_id')"); +} +if ($result) { + $result = pg_query($database, "delete from photo_version where photo in (select identifier from photo where users='$user_id')"); + } +if ($result) { + $result = pg_query($database, "delete from photo_tech where photo in (select identifier from photo where users='$user_id')"); +} +if ($result) { + $result = pg_query($database, "delete from album where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from photo where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from folder where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update location set users='$po_user[id]' where users='$user_id'"); + } +if ($result) { + $result = pg_query($database, "delete from film where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update film_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from lens where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update lens_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from camera where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update camera_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from flash where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update flash_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from scanner where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update scanner_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} if (!$result) { + $result = pg_query($database, "delete from support where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update support_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from filter where users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update filter_type set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "update manufacturer set last_modifying_users=null where last_modifying_users='$user_id'"); +} +if ($result) { + $result = pg_query($database, "delete from user_preferences where owner='$user_id'"); + } + +$user_data = pg_fetch_row(pg_query($database, "select contact from users where identifier='$user_id'")); + +if ($result) { + $result = pg_query($database, "delete from users where identifier='$user_id'"); + } +if ($result) { + $result = pg_query($database, "delete from contact_info where identifier='$user_data[0]'"); + } + +/* Delete the actual files now */ +if ($result) { + $num_of_photos_to_remove = pg_num_rows($photos_to_be_removed); + for ($i = 0; $i < $num_of_photos_to_remove; $i++) { + $photo = pg_fetch_row($photos_to_be_removed, $i); + $err = error_reporting(0); + unlink($image_repository_path . "/" . $photo[0]); + error_reporting($err); + } + } + +/* Commit things */ +if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from submission where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update paper set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from label where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo_spooler where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from calendar where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from client where users='$user_id' or client='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from rating where photo in (select identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update imagemagick_composite_options set photo_version=null where identifier in (select imagemagick_composite_options from users where identifier='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo_version where photo in (select identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo_keywords where photo in (select - identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} - -$result = pg_query($database, "delete from photo_dupe where photo in (select identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo_tech where photo in (select identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, " - delete from shop_order - where item in (select photo_item.identifier - from photo_item, photo - where photo_item.photo=photo.identifier - and photo.users='$user_id') - or client='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, " - delete from shop_transaction - where identifier in (select shop_order.transaction - from shop_order, photo_item, photo - where shop_order.item=photo_item.identifier - and photo_item.photo=photo.identifier - and photo.users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo_item where photo in (select identifier from photo where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - - -$result = pg_query($database, "delete from album_content where album in (select identifier from album where users='$user_id')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from album where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from photo where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from folder where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update location set users='$po_user[id]' where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from film where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update film_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from lens where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update lens_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from camera where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update camera_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from flash where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update flash_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from scanner where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update scanner_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from support where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update support_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update shop_item set users='$po_user[id]' where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update shop_category set users='$po_user[id]' where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from filter where users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update filter_type set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "update manufacturer set last_modifying_users=null where last_modifying_users='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$user_data = pg_fetch_row(pg_query($database, "select preferences, contact, imagemagick_options, imagemagick_composite_options, dcraw_options from users where identifier='$user_id'")); - -$result = pg_query($database, "delete from users where identifier='$user_id'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from preferences where identifier='$user_data[0]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from contact_info where identifier='$user_data[1]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from imagemagick_options where identifier='$user_data[2]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from imagemagick_composite_options where identifier='$user_data[3]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, "delete from dcraw_options where identifier='$user_data[4]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -error_reporting(0); -$num_of_photos_to_remove = pg_num_rows($photos_to_be_removed); -for ($i = 0; $i < $num_of_photos_to_remove; $i++) { - $photo = pg_fetch_row($photos_to_be_removed, $i); - if ($photo[0] != "") - if (!unlink($image_repository_path . "/" . $photo[0])) { - error_reporting(1); - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); - } - - if ($photo[1] != "") - if (!unlink($image_repository_path . "/" . $photo[1])) { - error_reporting(1); - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); - } - - if ($photo[2] != "") - if (!unlink($image_repository_path . "/" . $photo[2])) { - error_reporting(1); - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); - } -} -error_reporting(1); - -pg_query($database, "commit"); + } site_epilog($database); -header("location: admin.php?selector=".$admin_data['users_n_clients']['idx']); +header("Location: admin.php?selector=".$admin_data['users_n_clients']['idx']); ?> diff --git a/src/admin.user.del.php b/src/admin.user.del.php index 552f934..55756c0 100644 --- a/src/admin.user.del.php +++ b/src/admin.user.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,43 +17,38 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/admin.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_ADMIN); -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -site_header($page_width, "Adminstrator Interface : Delete User"); +site_header($strings['generic']['admin'] ." : ". $strings['admin']['delete_user']); site_navigator(9); -site_navigator_status("Adminstrator Interface : Delete User", ""); +site_navigator_status(emit_a("admin.php", $strings['generic']['admin'])." : ". $strings['admin']['delete_user'], ""); -print " 
    "; display_navigator_box_top($admin_data['users_n_clients']['idx'], $admin_data, "100%"); -print " 
    "; - $user_id = $_REQUEST['user']; -$user_data = pg_fetch_row(pg_query($database, "select users.identifier, last_name, first_name, member_since, value, user_type.identifier from users, user_type where users.type=user_type.identifier and users.identifier=$user_id")); -$user_preferences = pg_fetch_row(pg_query($database, "select bulk_upload_enable, shop_enable from users, preferences where preferences.identifier=users.preferences and users.identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select users.identifier, last_name, first_name, member_since from users where users.identifier=$user_id")); +$user_preferences = pg_fetch_row(pg_query($database, "select get_user_pref($user_id, 'bulk_upload_enable'), get_user_pref($user_id, 'last_updated')")); -print "\n"; + +if (($user_preferences[1] == null) || ($user_preferences[1] == '')) + $user_preferences[1] = $user_data[3]; + +print "
    \n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['name'], "width=\"30%\" align=\"left\""); +print emit_th($strings['generic']['photos'], "width=\"8%\""); +print emit_th($strings['generic']['folders'], "width=\"8%\""); +print emit_th($strings['generic']['albums'], "width=\"8%\""); +print emit_th($strings['generic']['bulk_upload'], "width=\"8%\""); +print emit_th($strings['generic']['member_since'], "width=\"8%\""); +print emit_th($strings['generic']['last_login'], "width=\"10%\""); print "\n"; $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($user_data[0])")); @@ -61,26 +56,24 @@ $folders_by_user = pg_fetch_row(pg_query($database, "select count_folders_by_use $albums_by_user = pg_fetch_row(pg_query($database, "select count_albums_by_user($user_data[0])")); print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_td("$user_data[1], $user_data[2]", "align=\"left\""); +print emit_td($photos_by_user[0]); +print emit_td($folders_by_user[0]); +print emit_td($albums_by_user[0]); +print emit_td(emit_enable_disable_text($user_preferences[0])); +print emit_td(emit_date_html($user_data[3], 'date')); +print emit_td(emit_date_html($user_preferences[1], 'date')); print ""; print "
    $user_data[4] namePhotosFoldersAlbumsBulk UploadShopMember Since
    $user_data[1], $user_data[2]$photos_by_user[0]$folders_by_user[0]$albums_by_user[0]"; display_enable_disable_text($user_preferences[0]); print""; display_enable_disable_text($user_preferences[1]); print"".generate_date_html($user_data[3], 'date', 1). "
    \n"; -print " 
    "; print "
    "; -print "

    "; -print ""; -print "\"Cancel\"/"; +print ""; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/admin.user.edit.2.php b/src/admin.user.edit.2.php index 1f1eedd..a9ba678 100644 --- a/src/admin.user.edit.2.php +++ b/src/admin.user.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,62 +17,44 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/mail.php"; include_once "include/site.php"; include_once "include/admin.php"; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_ADMIN); $user_id = pg_escape_string($_REQUEST['user']); $type = pg_escape_string($_REQUEST['type']); +$hide = pg_escape_string($_REQUEST['hide']); $bulk_upload_enable = pg_escape_string($_REQUEST['bulk_upload_enable']); -$shop_enable = pg_escape_string($_REQUEST['shop_enable']); -$shared = pg_escape_string($_REQUEST['shared']); $quota_size = pg_escape_string($_REQUEST['quota_size']); $quota_count = pg_escape_string($_REQUEST['quota_count']); $quota_size = $quota_size * 1048576; -$user_preferences = pg_fetch_row(pg_query($database, "select preferences from users where users.identifier=$user_id")); - pg_query($database, "begin"); -$result = pg_query($database, "update users set type='$type', shared='$shared' where identifier='$user_id'"); -if (!$result) { +$result = pg_query($database, "update users set type='$type', hide='$hide' where identifier='$user_id'"); + +if ($result) + $result = store_user_pref($database, $user_id, 'quota_size', $quota_size); +if ($result) + $result = store_user_pref($database, $user_id, 'quota_count', $quota_count); +if ($result) + $result = store_user_pref($database, $user_id, 'bulk_upload_enable', $bulk_upload_enable); + +if ($result) { + pg_query($database, "commit"); + send_po_account_change_notification($database, $user_id); + } else { + site_push_error($strings['errors']['db_insert_failed']); pg_query($database, "rollback"); site_epilog($database); - header("location: admin.php"); - exit(); -} - -$result = pg_query($database, " - update preferences - set bulk_upload_enable='$bulk_upload_enable', - shop_enable='$shop_enable', - quota_size =$quota_size, - quota_count=$quota_count - where identifier='$user_preferences[0]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php"); - exit(); -} - -pg_query($database, "commit"); - -/* send email notifications */ -send_po_account_change_notification($database, $user_id); + } site_epilog($database); -header("location: admin.php?selector=".$admin_data['users_n_clients']['idx']); +header("Location: admin.php?selector=".$admin_data['users_n_clients']['idx']); ?> diff --git a/src/admin.user.edit.php b/src/admin.user.edit.php index 2ba951f..d5348a3 100644 --- a/src/admin.user.edit.php +++ b/src/admin.user.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,100 +17,78 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/admin.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_ADMIN); -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -site_header($page_width, "Adminstrator Interface : Edit Member Type"); +site_header($strings['generic']['admin'] ." : ". $strings['admin']['edit_user']); site_navigator(9); -site_navigator_status("Adminstrator Interface : Edit Member Type", ""); +site_navigator_status(emit_a("admin.php", $strings['generic']['admin'])." : ". $strings['admin']['edit_user'], ""); -print " 
    "; display_navigator_box_top($admin_data['users_n_clients']['idx'], $admin_data, "100%"); -print " 
    "; - - $user_id = $_REQUEST['user']; $user_data = pg_fetch_row(pg_query($database, " - select users.identifier, last_name, first_name, member_since, value, user_type.identifier, shared + select users.identifier, last_name, first_name, member_since, value, user_type.identifier, hide from users, user_type where users.type=user_type.identifier and users.identifier=$user_id")); $user_preferences = pg_fetch_row(pg_query($database, " - select bulk_upload_enable, shop_enable, - quota_size, quota_count - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$user_id")); + select get_user_pref($user_id, 'bulk_upload_enable'), + get_user_pref($user_id, 'quota_size'), + get_user_pref($user_id, 'quota_count')")); -$user_preferences[2] = $user_preferences[2] / 1048576; +if (!$user_preferences[2]) $user_preferences[2] = $po_options_default['quota_count']; +if (!$user_preferences[1]) $user_preferences[1] = $po_options_default['quota_size']; +if (!$user_preferences[0]) $user_preferences[0] = $po_options_default['bulk_upload_enable']; + +$user_preferences[1] /= 1048576; $all_user_types = pg_query($database, " select user_type.identifier, user_type.value from user_type"); print "
    "; -print "\n"; +print "
    \n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['name'], "width=\"20%\" align=\"left\""); +print emit_th($strings['generic']['type'], "width=\"8%\""); +print emit_th($strings['generic']['hide'], "width=\"8%\""); +print emit_th($strings['generic']['bulk_upload'], "width=\"8%\""); +print emit_th($strings['generic']['quota_size'], "width=\"8%\""); +print emit_th($strings['generic']['quota_count'], "width=\"8%\""); print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_td(emit_enable_disable_combo("hide", $user_data[6])); +print emit_td(emit_enable_disable_combo("bulk_upload_enable", $user_preferences[0])); +print emit_td(" MB"); +print emit_td(""); print ""; print "
    Member nameTypeBulk UploadShopSharedQuota SizeQuota Count
    "; -print "$user_data[1], $user_data[2]"; +print emit_td("$user_data[1], $user_data[2]", "align=\"left\""); +print ""; if ($po_user['id'] == $user_data[0]) { - print "administrator"; - print "

    "; + print $strings['generic']['administrator']; + print ""; } else { display_combo("type", $all_user_types, $user_data[5], "", 1); } print "

    "; -display_enable_disable_combo("bulk_upload_enable", $user_preferences[0]); -print ""; -display_enable_disable_combo("shop_enable", $user_preferences[1]); -print ""; -display_yes_no_combo("shared", $user_data[6]); -print ""; -print " Mb"; -print ""; -print ""; -print "
    \n"; -print " 
    "; -print "

    "; -print ""; -print "\"Cancel\"/"; +print ""; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/admin.volume.edit.2.php b/src/admin.volume.edit.2.php index 7e0da9b..63b3706 100644 --- a/src/admin.volume.edit.2.php +++ b/src/admin.volume.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,95 +17,56 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/admin.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_ADMIN); $volume = pg_escape_string($_REQUEST['volume']); $new_volume = pg_escape_string($_REQUEST['new_volume']); $current = pg_escape_string($_REQUEST['current']); -$volume_max_size = pg_escape_string($_REQUEST['volume_max_size']); + +$result = TRUE; if (($handle = opendir($image_repository_path . "/" . $volume)) == FALSE) { - header("location: admin.php?selector=".$admin_data['repository']['idx']); + site_push_error($strings['errors']['cant_open_volume']); + header("Location: admin.php?selector=".$admin_data['repository']['idx']); + site_epilog($database); + exit(); } closedir($handle); -error_reporting(0); -pg_query($database, "begin"); - -/* update system preferences, maximum volume size */ -$result = pg_query($database, "update system_preferences set volume_max_size='$volume_max_size'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); -} - -/* update system preferences current volume */ -if ($current == 't') { - $result = pg_query($database, "update system_preferences set current_volume='$new_volume'"); +/* update current volume */ +if ($result && ($current == 't')) { + unlink($image_repository_path."/current"); + $result = po_symlink($new_volume, "$image_repository_path/current"); if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); + site_push_error($strings['errors']['cant_link_volume']); } -} + } + +if ($result && ($new_volume != $volume)) { + pg_query($database, "begin"); -if ($new_volume != $volume) { $result = pg_query($database, " - update photo_version - set small_image_path = ('$new_volume' || (substr(small_image_path, char_length('$volume') + 1))) - where '$volume' = substr(small_image_path, 0, char_length('$volume') +1 )"); - if (!$result) { + update files + set path = ('$new_volume' || (substr(path, char_length('$volume') + 1))) + where '$volume' = substr(path, 0, char_length('$volume') +1 )"); + if ($result) { + if (!rename($image_repository_path . "/" . $volume, $image_repository_path . "/" . $new_volume)) { + site_push_error($strings['errors']['cant_rename_volume']); + pg_query($database, "rollback"); + } else { + pg_query($database, "commit"); + } + } else { + site_push_error($strings['errors']['db_insert_failed']); pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); - } - $result = pg_query($database, " - update photo_version - set medium_image_path = ('$new_volume' || (substr(medium_image_path, char_length('$volume') + 1))) - where '$volume' = substr(medium_image_path, 0, char_length('$volume') +1 )"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); - } - $result = pg_query($database, " - update photo_version - set large_image_path = ('$new_volume' || (substr(large_image_path, char_length('$volume') + 1))) - where '$volume' = substr(large_image_path, 0, char_length('$volume') +1 )"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); } + } - if (!rename($image_repository_path . "/" . $volume, $image_repository_path . "/" . $new_volume)) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: admin.php?selector=".$admin_data['repository']['idx']); - exit(); - } -} - -error_reporting(1); -pg_query($database, "commit"); site_epilog($database); -header("location: admin.php?selector=".$admin_data['repository']['idx']); +header("Location: admin.php?selector=".$admin_data['repository']['idx']); ?> diff --git a/src/admin.volume.edit.php b/src/admin.volume.edit.php index b118192..a6055d8 100644 --- a/src/admin.volume.edit.php +++ b/src/admin.volume.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,65 +17,58 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/admin.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_ADMIN); $volume = $_REQUEST['volume']; if (($handle = opendir($image_repository_path . "/" . $volume)) == FALSE) { - header("location: admin.php"); + site_push_error($strings['errors']['cant_open_volume']); + header("Location: admin.php?selector=".$admin_data['repository']['idx']); + site_epilog($database); + exit(); } closedir($handle); -$system_preferences = pg_fetch_row(pg_query($database, "select current_volume, volume_max_size from system_preferences")); +$curr_volume = readlink($image_repository_path."/current"); -site_header($page_width, "Adminstrator Interface : Edit Image Repository Volume"); +site_header($strings['generic']['admin'] ." : ".$strings['admin']['edit_volume']); site_navigator(9); -site_navigator_status("Adminstrator Interface : Edit Image Repository Volume ", ""); +site_navigator_status(emit_a("admin.php", $strings['generic']['admin'])." : ".$strings['admin']['edit_volume'], ""); print " 
    "; display_navigator_box_top($admin_data['repository']['idx'], $admin_data, "100%"); -print " 
    "; -print "
    \n"; +print "\n"; print "\n"; -print "\n"; +print "
    \n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['volume'], "width=\"60%\""); +print emit_th($strings['generic']['current'], "width=\"20%\""); +print emit_th($strings['generic']['max_size'], "width=\"20%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print ""; +print emit_td(""); +print emit_td(emit_yes_no_combo("current", $curr_volume == $volume ? 't' : 'f')); +print emit_td("$po_options_default[volume_max_size] MB"); print "\n"; print "
    VolumeCurrentMax Size
    "; -display_yes_no_combo("current", $system_preferences[0] == $volume ? 't' : 'f'); -print "Mb
    \n"; -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    \n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/album.add.2.php b/src/album.add.2.php index 49487d4..c423d7c 100644 --- a/src/album.add.2.php +++ b/src/album.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,52 +17,54 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $album_caption = pg_escape_string($_REQUEST['album_caption']); $album_description = pg_escape_string($_REQUEST['album_description']); $album_access_rights = pg_escape_string($_REQUEST['album_access_rights']); $album_parent = pg_escape_string($_REQUEST['parent']); +$password = pg_escape_string($_REQUEST['password']); +$event = pg_escape_string($_REQUEST['event']); +if ($event != "null") $event = "'$event'"; + +$go = TRUE; if ($album_parent != "null") { - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from album where identifier=$album_parent and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php"); - exit(); + site_push_error($strings['errors']['not_owner']); + $go = FALSE; } } } -global $default_order_by; +if (($album_caption == 'Spool') || ($album_caption == '')) { + site_push_error($strings['errors']['illegal_name']); + $go = FALSE; + } -if ($album_caption != "") { - $album_type = $po_user['type'] > $user_type['client'] ? "u" : "c"; - $result = pg_query($database, "insert into album (identifier, users, caption, description, date_of_creation, access_rights, type, orderby, parent_album) - values (nextval('album_id_sequence'), -'$po_user[id]', '$album_caption', '$album_description', now(), '$album_access_rights', '$album_type', $default_order_by, $album_parent)"); +if ($go) { + $result = pg_query($database, "insert into album (identifier, users, caption, description, access_rights, parent_album, password, event) + values (nextval('album_id_sequence'), +'$po_user[id]', '$album_caption', '$album_description', '$album_access_rights', $album_parent, '$password', $event)"); + if (!$result) { - // print "Failed to create new album: $album_caption"; - exit(); + site_push_error($strings['errors']['db_insert_failed']); } -} + } site_epilog($database); + if ($album_parent == "null") { - header("location: my.folder.php"); + header("Location: user.php?user=$po_user[id]"); } else { - header("location: album.php?album=$album_parent"); + header("Location: album.php?album=$album_parent"); } + ?> diff --git a/src/album.add.php b/src/album.add.php index 041f90e..61e731c 100644 --- a/src/album.add.php +++ b/src/album.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,53 +17,57 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; include_once "include/common.php"; -include_once "$theme/theme.php"; +include_once "include/contacts.php"; +; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$parent_album = pg_escape_string($_REQUEST['parent']); -if ($po_user['type'] > $user_type['client']) { - $navi_path = "My Folders and Albums"; -} else { - $navi_path = "My Albums"; -} +if ($parent_album) { + $album_data = pg_fetch_row(pg_query($database, "select caption from album where identifier='$parent_album'")); + $path_to_album = get_path_to_album($database, $parent_album); + $path_to_album = $path_to_album . " : $album_data[0]"; + } else { + $path_to_album = ""; + } -$parent = pg_escape_string($_REQUEST['parent']); -$album_all = pg_query($database, "select identifier, caption, parent_album from album - where users=$po_user[id] order by date_of_creation desc"); +$album_all = pg_query($database, "select identifier, caption, parent_album from album + where users=$po_user[id] and caption != 'Spool' order by date_of_creation desc"); -site_header($page_width, "Add Album"); +site_header($strings['generic']['add_album']); site_navigator(5); -site_navigator_status("Users : $navi_path : Add Album ", ""); + +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_album : ".$strings['generic']['add_album'], ""); print " 
    \n"; + print "
    "; -print "\n"; +print "
    \n"; print ""; -print ""; -print ""; -if ($po_user['type'] > $user_type['client']) { - print ""; +print emit_th($strings['generic']['album_name'], "width=\"40%\""); +print emit_th($strings['generic']['parent'], "width=\"20%\""); + +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print emit_th($strings['generic']['access'], "width=\"15%\""); + print emit_th($strings['generic']['password'], "width=\"25%\""); } print ""; print ""; -print ""; -print "\n"; -if ($po_user['type'] > $user_type['client']) { - print "\n"; +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print "\n"; + print ""; } else { print ""; } @@ -72,26 +76,33 @@ print "
    Album NameParentAccess
    "; -print ""; -display_folder_combo("parent", $album_all, $parent, "null"); +print emit_td(""); +print ""; +display_album_combo("parent", $album_all, $parent_album, "null"); print ""; - display_access_combo("album_access_rights", "t", ""); print ""; + display_access_combo("album_access_rights", "t", ""); + print "
    "; print " 
    \n"; -print "\n"; +print "
    \n"; print ""; -print ""; -print ""; -print ""; -print ""; +print emit_td($strings['datebook']['event']); +print emit_td(emit_event_combo($database, "event", $po_user['id'], "null")); print ""; print "
    Description
    "; -print ""; -print "
    "; print " 
    \n"; -print "
    \n"; -print ""; -print "\"Cancel\"/"; -print ""; -print "
    \n"; +print "\n"; +print ""; +print emit_th($strings['generic']['description']); +print ""; +print ""; +print emit_td(""); +print ""; +print "
    "; print " 
    \n"; + +print "
    \n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; +print ""; + site_footer($database); site_epilog($database); ?> diff --git a/src/album.del.2.php b/src/album.del.2.php index 1d534d4..5376828 100644 --- a/src/album.del.2.php +++ b/src/album.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,33 +17,28 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $album_id = pg_escape_string($_REQUEST['album']); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); +$go = TRUE; /* Ensure mere users don't erase an album that isn't theirs! */ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from album where identifier='$album_id' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php"); - exit(); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); + $go = FALSE; } } -/* XXX Don't forget sub-albums! */ -if ($album_id!="") { +/* Clean up sub-albums properly */ +if ($go && ($album_id!="")) { $result = pg_query($database, "begin"); if ($result) { /* Find all albums with us as their parent... */ @@ -63,8 +58,6 @@ if ($album_id!="") { $result = pg_query($database, "update album set parent_album = $parent_album[0] where parent_album = $album_id"); } - print "update album set parent_album = $parent_album[0] where parent_album = $album_id"; - if ($result) { $result = pg_query($database, "delete from album_content where album='$album_id'"); } @@ -77,13 +70,15 @@ if ($album_id!="") { pg_query($database, "commit"); } else { pg_query($database, "abort"); + site_push_error($strings['errors']['db_insert_failed']); } -} + } site_epilog($database); + if ($parent_album[0] == FALSE) { - header("location: my.folder.php"); + header("Location: user.php?user=$po_user[id]"); } else { - header("location: album.php?album=$parent_album[0]"); + header("Location: album.php?album=$parent_album[0]"); } ?> diff --git a/src/album.del.php b/src/album.del.php index 09d6a53..ef12fae 100644 --- a/src/album.del.php +++ b/src/album.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,106 +17,73 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $album_id = pg_escape_string($_REQUEST['album']); $album_data = pg_fetch_row(pg_query($database, " - select album.identifier, caption, date_of_creation, value, users, parent_album - from album, access_type - where access_type.identifier=album.access_rights - and album.identifier='$album_id'")); + select album.identifier, caption, date_of_creation, access_rights, users, parent_album + from album + where album.identifier='$album_id'")); if (($album_data[4] != $po_user['id']) && - ($po_user['type'] != $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); + ($po_user['type'] != PO_USER_TYPE_ADMIN)) { + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); + site_epilog($database); + exit(); } -$photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album_id)")); -$subalbums_in_album = pg_fetch_row(pg_query($database, "select count_subalbums_by_album($album_id)")); +$album_stats = pg_fetch_assoc(pg_query($database, "select count_subalbums_by_album($album_id, $po_user[id], '{".$passwords."}') as albums, count_photos_by_album($album_id, $po_user[id], '{".$passwords."}') as photos")); $path_to_album = get_path_to_album($database, $album_id); -site_header($page_width, "Delete Album"); +site_header($strings['generic']['delete_album']); site_navigator(5); -if ($po_user['type'] > $user_type['client']) { - $navi_path = "My Folders and Albums"; -} else { - $navi_path = "My Albums"; -} - -switch ($subalbums_in_album[0]) { - case 0: - switch ($photos_in_album[0]) { - case 0: - site_navigator_status("Users : $navi_path$path_to_album : Delete album $album_data[1]?", ""); - break; - case 1: - site_navigator_status("Users : $navi_path : There is one photo in this Album. The removal of the Album will also remove the reference to the photo. Proceed?.", ""); - break; - default: - site_navigator_status("Users : $navi_path : There are $photos_in_album[0] photos in this Album. The removal of the Album will also remove the references to the photos. Proceed?.", ""); - } - break; - site_navigator_status("Users : $navi_path : Delete album $album_data[1]?", ""); - break; - case 1: - site_navigator_status("Users : $navi_path$path_to_album : There is $subalbums_in_album[0] subalbum in $album_data[1]. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : $navi_path$path_to_album : There are $subalbums_in_album[0] subalbums in $album_data[1]. Cannot remove.", ""); -} +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_album : $album_data[1] : " .$strings['generic']['delete_album'], ""); print " 
    \n"; -print "\n"; +print "
    \n"; print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -if ($po_user['type'] > $user_type['client']) { - print "\n"; +print emit_th($strings['generic']['parent'], "width=\"27%\""); +print emit_th($strings['generic']['photos'], "width=\"5%\""); +print emit_th($strings['generic']['subalbums'], "width=\"5%\""); +print emit_th($strings['generic']['created'], "width=\"12%\""); +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print emit_th($strings['generic']['access'], "width=\"10%\""); } print ""; print ""; -print "\n"; -print "\n"; -print "\n"; -print ""; -if ($po_user['type'] > $user_type['client']) { - print "\n"; +print emit_td("$album_data[1]"); +print emit_td($album_stats['photos']); +print emit_td($album_stats['albums']); +print emit_td(emit_date_html($album_data[2], 'date')); +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print emit_td($strings['generic'][$access[$album_data[3]]]); } print ""; print "
    Album NameSubalbumsPhotosCreatedAccess
    $album_data[1]$photos_in_album[0]$subalbums_in_album[0]".generate_date_html($album_data[2], 'date', 1)."$album_data[3]
    "; print " 
    \n"; print "
    \n"; -if ($subalbums_in_album[0] > 0) { - print "\"Back\"/\n"; -} -else { +if ($album_stats['albums'] > 0) { + print $thm_elem['button.back']; +} else { print "
    "; - print "

    "; - print "

    "; - print ""; - print "\"Cancel\"/"; + print ""; + print ""; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; print "

    "; -} + } print "
    \n"; print " 
    \n"; diff --git a/src/album.edit.2.php b/src/album.edit.2.php index 4c8db6f..835f059 100644 --- a/src/album.edit.2.php +++ b/src/album.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,50 +17,50 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $album_id = pg_escape_string($_REQUEST['album']); $album_name = pg_escape_string($_REQUEST['album_caption']); $album_description = pg_escape_string($_REQUEST['album_description']); $album_access_rights = pg_escape_string($_REQUEST['album_access_rights']); $album_parent = pg_escape_string($_REQUEST['parent']); +$password = pg_escape_string($_REQUEST['password']); +$event = pg_escape_string($_REQUEST['event']); +if ($event != "null") $event = "'$event'"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); +$go = TRUE; /* Ensure mere users don't edit an album that isn't theirs! */ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from album where identifier='$album_id' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php"); - exit(); + site_push_error($strings['errors']['not_owner']); + $go = FALSE; } } -if (($album_id!="") && ($album_name!="")) { +if ($go && ($album_id!="") && ($album_name!="")) { $result = pg_query($database, " update album set caption='$album_name', description='$album_description', access_rights='$album_access_rights', - parent_album=$album_parent + parent_album=$album_parent, + password='$password', + event=$event where identifier='$album_id'"); + if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } } site_epilog($database); if ($album_parent == "null") { - header("location: my.folder.php"); + header("Location: user.php?user=$po_user[id]"); } else { - header("location: album.php?album=$parent"); + header("Location: album.php?album=$album_parent"); } - ?> diff --git a/src/album.edit.php b/src/album.edit.php index f84fdfd..f5b1279 100644 --- a/src/album.edit.php +++ b/src/album.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,109 +17,105 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; +include_once "include/contacts.php"; +include_once "include/orderby.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $album_id = pg_escape_string($_REQUEST['album']); -$album_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, access_rights, description, parent_album, users from album where identifier='$album_id'")); +$album_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, access_rights, description, parent_album, users, password, event from album where identifier='$album_id'")); /* Ensure mere users don't edit an folder that isn't theirs! */ if (($po_user['id'] != $album_data[5]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); site_epilog($database); - header("location: login.php"); exit(); } -if ($po_user['type'] > $user_type['client']) { - $navi_path = "My Folders and Albums"; -} else { - $navi_path = "My Albums"; -} +$album_stats = pg_fetch_assoc(pg_query($database, "select count_subalbums_by_album($album_id, $po_user[id], '{".$passwords."}') as albums, count_photos_by_album($album_id, $po_user[id], '{".$passwords."}') as photos")); + +$album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and caption != 'Spool' order by date_of_creation desc"); -$album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] order by date_of_creation desc"); -$photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album_id)")); -$subalbums_in_album = pg_fetch_row(pg_query($database, "select count_subalbums_by_album($album_id)")); $path_to_album = get_path_to_album($database, $album_id); -site_header($page_width, "Edit Album"); +site_header($strings['generic']['edit_album']); site_navigator(5); -site_navigator_status("Users : $navi_path$path_to_album : Edit album $album_data[0]", ""); - +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_album : $album_data[0] : " .$strings['generic']['edit_album'], ""); + print " 
    \n"; -$photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album_id)")); - print "
    "; -print "\n"; +print ""; +print "
    \n"; print ""; -print "\n"; -print ""; -print "\n"; -print "\n"; -print "\n"; -if ($po_user['type'] > $user_type['client']) { - print "\n"; +print emit_th($strings['generic']['album_name'], "width=\"28%\""); +print emit_th($strings['generic']['parent'], "width=\"27%\""); +print emit_th($strings['generic']['subalbums'], "width=\"5%\""); +print emit_th($strings['generic']['photos'], "width=\"5%\""); +print emit_th($strings['generic']['created'], "width=\"12%\""); +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print emit_th($strings['generic']['access'], "width=\"10%\""); } +print emit_th($strings['generic']['password'], "width=\"10%\""); print ""; print ""; -print ""; -print "\n"; -print "\n"; -print "\n"; -print ""; -if ($po_user['type'] > $user_type['client']) { - print "\n"; -} -else { - print ""; -} -print ""; -print "
    Album NameParent albumSubalbumsPhotosCreatedAccess
    "; -print ""; +print emit_td(""); +print ""; display_folder_combo("parent", $album_all, $album_data[4], "null"); print "$photos_in_album[0]$subalbums_in_album[0]".generate_date_html($album_data[1], 'date', 1).""; - display_access_combo("album_access_rights", $album_data[2], ""); print "
    "; - -print " 
    \n"; - -print "\n"; -print ""; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print "
    Description
    "; -print ""; -print "
    "; - -print " 
    \n"; - -print "
    \n"; -print ""; -if (!$album_data[4]) { - print "\"Cancel\"/"; +print emit_td($album_stats['albums']); +print emit_td($album_stats['photos']); +print "".emit_date_html($album_data[1], 'date').""; +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print ""; + display_access_combo("album_access_rights", $album_data[2], ""); + print "\n"; } else { - print "\"Cancel\"/"; + print emit_td(""); } -print "

    "; -print "

    "; -print "
    \n"; +print emit_td(""); + +print ""; +print ""; print " 
    \n"; + +print "\n"; +print ""; +print emit_td($strings['datebook']['event']); +print emit_td(emit_event_combo($database, "event", $po_user['id'], $album_data[7])); +print ""; +print "
    "; + +print " 
    \n"; + +print "\n"; +print ""; +print emit_th($strings['generic']['description']); +print ""; +print ""; +print emit_td(""); +print ""; +print "
    "; + +print " 
    \n"; + +print "
    \n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    "; +print ""; + site_footer($database); site_epilog($database); ?> diff --git a/src/album.php b/src/album.php index f0c85bc..918e939 100644 --- a/src/album.php +++ b/src/album.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,146 +17,70 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; -include_once "include/site.php"; include_once "include/orderby.php"; -include_once "include/site.php"; -include_once "$theme/theme.php"; -$album_id = pg_escape_string($_REQUEST['album']); -$view = pg_escape_string($_REQUEST['view']); -$order_by = pg_escape_string($_REQUEST['order_by']); +include_once "include/site.php"; +; + +$album_id = pg_escape_string($_REQUEST['album']); +$offset = pg_escape_string(isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0); $database = site_prolog(); +$order_by = $po_options['order_by']; -if (!$album_id) { - header("HTTP/1.1 404 Not found"); - site_header($page_width, "Display Album"); - site_navigator(5); - site_navigator_status("Users : My Folders and Albums : No album specified", ""); - print " 
    "; - site_footer($database); - site_epilog($database); - exit(); +if ($album_id) { + $album = pg_fetch_row(pg_query($database, "select caption, access_rights, users, description, users.type, album.password, can_access_album(album.identifier, $po_user[id], '{".$passwords."}') from album, users where album.identifier=$album_id and users.identifier = album.users")); } -$album = pg_fetch_row(pg_query($database, "select caption, access_rights, users, orderby, description, users.type from album, users where album.identifier='$album_id' and users.identifier = album.users")); if (!$album) { header("HTTP/1.1 404 Not found"); - site_header($page_width, "Display Album"); + site_header($strings['generic']['display_album']); site_navigator(5); - site_navigator_status("Users : My Folders and Albums : No such album", ""); - print " 
    "; + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['no_such_album'], ""); site_footer($database); site_epilog($database); exit(); } -if ($view != "") { - $arguments = $arguments . "&view=$view"; -} - -$album_name = $album[0]; -$owner_id = $album[2]; - -if (!$order_by) { - /* get the last value from the database */ - $order_by = $album[3]; -} else if ($order_by != $album[3]) { - if ($po_user['id'] == $owner_id) { - /* if different, set the database, and use the new value */ - pg_query($database, "update album set orderby='$order_by' where identifier=$album_id"); +if ($album[6] == 'f') { + if ($album[1] == $access['private']) { + header("HTTP/1.1 403 Forbidden"); + site_header($strings['generic']['display_album']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['private'], ""); + site_footer($database); + site_epilog($database); + } else { + site_push_error($strings['errors']['protected']); + header("Location: login.php?reason=protected&orig=".urlencode("album.php?album=$album_id")); } -} + exit(); + } + +/* get the last value from the database */ +$album_name = $album[0]; +$owner_id = $album[2]; -$arguments = $arguments . "&order_by=$order_by"; $sql_query_order_by_string = $order_by_string[$order_by][0]; -$client = FALSE; - -if (($owner_id != "") && - ($po_user['type'] > $user_type['disabled'])) { - $client = pg_fetch_row(pg_query($database, "select identifier from client where users='$owner_id' and client='$po_user[id]' and status=2")); -} - -if (($po_user['id'] != $owner_id) && - ($album[1] == "f") && - ($po_user['type'] < $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -if (($po_user['id'] != $owner_id) && - ($album[1] == "p") && - ($client == FALSE) && - ($po_user['type'] < $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -if (($po_user['id'] == $owner_id) || - ($po_user['type'] == $user_type['administrator'])) { - $sql_query_access_rights_string = ""; -} else { - if ($client == FALSE) { - $sql_query_access_rights_string = "and photo.access_rights = $access[public]"; - } else { - $sql_query_access_rights_string = "and photo.access_rights < $access[private]"; - } -} +$sql_query_access_rights_string = "and can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; $user_data = pg_fetch_row(pg_query($database, " - select first_name, last_name, users.identifier, shop_enable - from users, preferences - where users.preferences=preferences.identifier - and users.identifier=$owner_id")); + select last_name, first_name, users.identifier + from users + where users.identifier=$owner_id")); -site_header($page_width, "Display Album"); +site_header($album_name); -if ($po_user['type'] > $user_type['disabled']) { - $my_data = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, folder_view, num_of_rows_l, popup_enable, popup_delay - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$po_user[id]")); - $num_of_rows = $my_data[0]; - $num_of_columns = $my_data[1]; - if ($view=="") - $view = $my_data[2]; - $num_of_rows_l = $my_data[3]; - $popup_enable = $my_data[4]; - $popup_delay = $my_data[5]; -} else { - $view = "slide"; - $num_of_rows_l = $default_num_of_rows_in_list_view; - $num_of_rows = $default_num_of_rows_in_slide_view; - $num_of_columns = $default_num_of_columns; - $popup_enable = $default_popup_enable; - $popup_delay = $default_popup_delay; -} +$user_display_string = user_disp_string($owner_id, $po_user['id'], + $user_data[0], $user_data[1]); if ($po_user['id'] == $owner_id) { site_navigator(5); - $user_display_string="My Folders and Albums"; - $my_data = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, folder_view, num_of_rows_l, popup_enable, popup_delay - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$po_user[id]")); - $num_of_rows = $my_data[0]; - $num_of_columns = $my_data[1]; - if ($view=="") - $view = $my_data[2]; - $num_of_rows_l = $my_data[3]; - $popup_enable = $my_data[4]; - $popup_delay = $my_data[5]; } else { site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[0]); } $num_of_photos_a = pg_fetch_row(pg_query($database, " @@ -167,185 +91,151 @@ $num_of_photos_a = pg_fetch_row(pg_query($database, " $sql_query_access_rights_string")); $num_of_photos = $num_of_photos_a[0]; -$offset = pg_escape_string($_REQUEST['offset']); -if (!$offset) { - $offset = 0; -} - -if ($view == "slide") { - $limit = $num_of_rows * $num_of_columns; -} -else { - $limit = $num_of_rows_l; +if ($po_options['photo_view'] == "slide") { + $limit = $po_options['photos_per_page']; +} else { + $limit = $po_options['rows_list_view']; } +/* Sanity checks */ if ($limit > $num_of_photos) { $limit = $num_of_photos; } +while ($num_of_photos && $offset >= $num_of_photos) { + $offset -= $limit; +} +if ($offset < 0) { + $offset = 0; +} +if (($offset + $limit) > $num_of_photos) { + $items = $num_of_photos - $offset; +} else { + $items = $limit; +} + +$path_to_album = get_path_to_album($database, $album_id); + +if ($po_user['id'] == $owner_id) + $edit_album = "$album[0]"; + else + $edit_album = "$album[0]"; + +if ($num_of_photos == 0) { + site_navigator_status(emit_a("user.php", $strings['generic']['users']). " : $user_display_string $path_to_album : $edit_album", $strings['generic']['is_empty']); + } else { + site_navigator_status(emit_a("user.php", $strings['generic']['users']). " : $user_display_string $path_to_album : $edit_album", $strings['generic']['displaying'] . " " . display_photo_index_status($offset, $limit, $num_of_photos)); + } + +if ($album[3]) { + site_navigator_status($album[3], ""); + } + +if ($album_id != $po_user['spool_album']) { + display_albums($database, "$album_id", $album[2], $album[4], "with_header"); + } + +if ($num_of_photos == 0) { + site_footer($database); + site_epilog($database); + exit(); + } $album_photo = pg_query($database, - "select photo.identifier, photo_version.small_image_path, photo.caption, date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier = photo.access_rights) as access_rights, + "select photo.identifier as identifier, + photo.caption as caption, + date_of_exposure, + photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo = photo.identifier) as rating, views, - (select is_photo_for_sale(photo.identifier)) as for_sale, - photo.title, photo.author, '' as keyword, - photo_version.original_image_name, photo.users, - view_location.place, view_location.country, view_location.city, view_location.state - from album, album_content, photo, photo_dupe, photo_version, view_location - where album_content.photo = photo.identifier + photo.title as title, + photo.author as author, + photo_version.original_image_name as original_image_name, + photo.users as users, + view_location.place, view_location.country, view_location.city, view_location.state, + photo_version.identifier as version + from album, album_content, photo, photo_version, view_location + where photo_version.identifier = album_content.version and album_content.album = album.identifier and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo and album.users = $owner_id and album.identifier = $album_id - and photo_dupe.key = 1 - and photo_version.master = 't' and view_location.identifier = photo.location $sql_query_access_rights_string order by $sql_query_order_by_string offset $offset limit $limit"); -$path_to_album = get_path_to_album($database, $album_id); - -if ($num_of_photos == 0) { - site_navigator_status("Users : $user_display_string$path_to_album : $album[0] : is empty, or contains no public pictures", ""); - - if ($album[4]) { - print " 
    "; - site_navigator_status($album[4], ""); - } - - print " 
    "; - display_albums($database, "$album_id", $po_user['id'], $po_user['type'], $album[2], $album[5], "with_header"); - print " 
    "; - site_footer($database); - site_epilog($database); - exit; -} else { - site_navigator_status("Users : $user_display_string$path_to_album : $album[0]", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); -} - -if ($album[4]) { - print " 
    "; - site_navigator_status($album[4], ""); -} - -print " 
    "; -display_albums($database, "$album_id", $po_user['id'], $po_user['type'], $album[2], $album[5], "with_header"); - -print ""; -print ""; -print " 
    \n"; print "
    "; print ""; -print ""; -print ""; +print ""; +print ""; print ""; -if (($offset + $limit) > $num_of_photos) { - $items = $num_of_photos - $offset; -} -else { - $items = $limit; +display_photo_navigator("album.php?album=$album_id", $offset, $limit, $num_of_photos); +if ($po_options['photo_view'] == "slide") { + $checkboxes = display_photo_slides("album", $album_id, $album_photo, 0, $items, true, true); +} else { + $checkboxes = display_photo_list("album", $album_id, $album_photo, 0, $items); } +display_photo_navigator("album.php?album=$album_id", $offset, $limit, $num_of_photos); -display_photo_navigator("album", $arguments, $owner_id, $album_id, $offset, $limit, $num_of_photos); -if ($view=="slide") { - display_photo_slides("album", $po_user['id'], $po_user['type'], $album_id, $album_photo, $items, $num_of_columns, $popup_enable, $popup_delay, $user_data[3], true, $order_by); -} -else { - print " 
    \n"; - display_photo_list("album", $po_user['id'], $po_user['type'], $album_id, $album_photo, $items, $user_data[3], $order_by); - print " 
    \n"; -} -display_photo_navigator("album", $arguments, $owner_id, $album_id, $offset, $limit, $num_of_photos); +site_navigator_status(emit_a("user.php", $strings['generic']['users']). " : $user_display_string $path_to_album : $album[0]", $strings['generic']['displaying'] . " " . display_photo_index_status($offset, $limit, $num_of_photos)); -print " 
    \n"; -site_navigator_status("Users : $user_display_string$path_to_album : $album[0]", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); +print "
    "; -if (($po_user['id'] == $owner_id) || - ($po_user['type'] == $user_type['administrator'])) { - print ""; - print ""; +display_order_by_combo_with_button($order_by); - print ""; - print ""; + $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$owner_id and caption != 'Trash' order by date_of_creation desc"); + display_folder_actions($folder_all, ""); + if (pg_num_rows($album_all) > 0) { + display_album_actions($album_all, $album_id); + } + } - /* Display printto/exportto */ +if ($po_user['type'] >= PO_USER_TYPE_CLIENT) { + display_spool_actions($database, $po_user['id']); + } - if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print ""; - print ""; - print ""; - print ""; - } +print ""; - print ""; - - print ""; - - print ""; - print "
    "; - if ($order_by != "") { - $order_by_argument = "&order_by=$order_by"; - } else { - $order_by_argument = ""; +if ($po_options['photo_view'] == 'slide') { + display_photos_per_page_combo('photos_per_page', $po_options['photos_per_page']); + } else { + display_photos_per_page_combo('rows_list_view', $po_options['rows_list_view']); + } + +print ""; - print ""; + } - print "
    \n"; + +if ($checkboxes) { + display_list_slide_option($po_options['photo_view'], "album.php?album=$album_id&offset=$offset"); + } + +if ($checkboxes && ($po_user['type'] >= PO_USER_TYPE_CLIENT)) { + display_selectbutton(); + if ($album_id != $po_user['spool_album']) { + print $thm_elem['button.add.to.spool']; } - display_order_by_combo_with_button($order_by); - print "  "; +if ($checkboxes && (($po_user['id'] == $owner_id) || + ($po_user['type'] == PO_USER_TYPE_ADMIN))) { + print $thm_elem['button.bulk.update']; + print $thm_elem['button.delete_s']; + } + +print "
    "; + +if ($checkboxes && (($po_user['id'] == $owner_id) || + ($po_user['type'] == PO_USER_TYPE_ADMIN))) { $album_all = pg_query($database, " select identifier, caption, parent_album from album where users=$owner_id + and caption != 'Spool' order by date_of_creation desc"); - display_moveto_album($album_all, $album_id); - print "
      "; - display_printto(); - print "  "; - display_export(); - print "  "; - - if ($view=="slide") - print "\"List\n"; - else - print "\"Slide\n"; - print ""; - print "\n"; - print "
    "; -} -elseif ($po_user['type'] >= $user_type['client']) { - print ""; - print ""; - - print ""; - - print ""; - - print ""; - - print ""; - print "
    "; - print ""; - print "\n"; - print "  "; - print "\n"; - print "\"View\n"; - print "  "; - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and type='c' order by date_of_creation desc"); - if (pg_num_rows($album_all) > 0) { - display_linkto_album($album_all, $album_id); - } - print "
    "; -} print "\n"; -print " 
    \n"; -print ""; site_footer($database); site_epilog($database); ?> diff --git a/src/basket.content.php b/src/basket.content.php deleted file mode 100644 index 1d3ed2f..0000000 --- a/src/basket.content.php +++ /dev/null @@ -1,85 +0,0 @@ - diff --git a/src/basket.php b/src/basket.php deleted file mode 100644 index 1db2ecd..0000000 --- a/src/basket.php +++ /dev/null @@ -1,295 +0,0 @@ - $user_type['user'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -site_header($page_width, "Basket"); -site_navigator(11); -site_navigator_status("Users : My Basket", ""); -print " 
    \n"; - - -$total_price = 0; -$currency = ""; -$photos_in_basket = pg_query($database, " - select shop_order.identifier, - (select photo from photo_item where photo_item.identifier=shop_order.item) as photo, - pieces, - (select caption from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select alpha_code from photo_item, currency where photo_item.currency=currency.identifier and photo_item.identifier=shop_order.item) as currency, - (select price from photo_item where photo_item.identifier=shop_order.item) as price, - (select comment from photo_item where photo_item.identifier=shop_order.item) as remark, - (select shop_item.identifier from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_id, - (select title from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select author from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select users from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select first_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select last_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select shop_item.category from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_category - from shop_order - where shop_order.client=$po_user[id] - and transaction is null - order by date_of_creation"); - - -if (pg_num_rows($photos_in_basket) == 0) { - if (pg_escape_string($_REQUEST['thanks']) == "yes") { - $transaction_id = str_pad($_REQUEST['transaction'], 6, "0", STR_PAD_LEFT); - print "
    Thanks for shopping with us.

    - The transaction identifier for your purchase is $transaction_id.
    - Please save this number for future reference of your order.

    "; - } else { - print "
    There are no photos in your basket.
    "; - } - site_footer($database); - site_epilog($database); - exit(); -} - -print "
    "; -print ""; -print ""; - -print ""; -for ($i = 0; $i < pg_num_rows($photos_in_basket); $i++) { - $photo = pg_fetch_row($photos_in_basket, $i); - - print ""; -} -print "
    "; - display_frame_top($cell_size, $cell_size, 10, "#E7E7E7", $theme); - print "\n"; - display_frame_bottom($cell_size, $cell_size, 10, $theme); - print ""; - print "\n"; - if ($photo[9]) { - print "\n"; - print ""; - print ""; - print "\n"; - } - if ($photo[8]) { - print "\n"; - print ""; - print ""; - print "\n"; - } - if ($photo[3]) { - print "\n"; - print ""; - print ""; - print "\n"; - } - print "\n"; - print ""; - print ""; - print "\n"; - print ""; - print ""; - print "\n"; - - print ""; - print "\n"; - print "\n"; - print ""; - if ($tmp_pcs > 1) { - $subtotal = $tmp_pcs * $photo[5]; - $subtotal_string="subtotal for this item $subtotal $photo[4]"; - } - else { - $subtotal = $photo[5]; - $subtotal_string=""; - } - print ""; - print "\n"; - print "
    Author$photo[9]
    Title$photo[8]
    Caption$photo[3]
    Owner$photo[12], $photo[11]
    Details"; - - /* shop category selection */ - $all_shop_categories_of_this_photo = pg_query($database, " - select distinct on (shop_category.identifier) - shop_category.identifier, shop_category.caption - from shop_category, photo_item, shop_item - where shop_item.category = shop_category.identifier - and shop_item.identifier = photo_item.shop_item - and photo_item.photo=$photo[1]"); - - $tmp_shop_category = pg_escape_string($_REQUEST["shop_category".$photo[0]]); - if (!$tmp_shop_category) - $tmp_shop_category = $photo[13]; - elseif ($tmp_shop_category != $photo[13]) { - /* when changing categories the shop_item is reset to the max(identifier) item in the current category */ - pg_query($database, " - update shop_order - set item=(select max(photo_item.identifier) - from photo_item, shop_item - where photo_item.shop_item = shop_item.identifier - and photo=$photo[1] - and shop_item.category = $tmp_shop_category) - where identifier=$photo[0]"); - - /* we have to query to fetch the apropriate shop_item properties */ - $photo = pg_fetch_row(pg_query($database, " - select shop_order.identifier, - (select photo from photo_item where photo_item.identifier=shop_order.item) as photo, - pieces, - (select caption from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select alpha_code from photo_item, currency where photo_item.currency=currency.identifier and photo_item.identifier=shop_order.item) as currency, - (select price from photo_item where photo_item.identifier=shop_order.item) as price, - (select comment from photo_item where photo_item.identifier=shop_order.item) as remark, - (select shop_item.identifier from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_id, - (select title from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select author from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select users from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select first_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select last_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select shop_item.category from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_category - from shop_order - where shop_order.client=$po_user[id] - and identifier = $photo[0]")); - } - print ""; - print ""; - - /* shop item selection */ - $all_shop_items_of_this_photo = pg_query($database, " - select shop_item.identifier, description - from photo_item, shop_item - where photo_item.shop_item=shop_item.identifier - and photo_item.photo=$photo[1] - and shop_item.category=$tmp_shop_category"); - - $tmp_shop_item = pg_escape_string($_REQUEST["shop_item".$photo[0]]); - if (!$tmp_shop_item) - $tmp_shop_item = $photo[7]; - elseif ($tmp_shop_item != $photo[7]) { - /* we do "select max" just in case - normally the subselect should always return 1 row */ - pg_query($database, " - update shop_order - set item=(select max(identifier) - from photo_item - where photo=$photo[1] - and shop_item=$tmp_shop_item) - where identifier=$photo[0]"); - /* we have to query to fetch the apropriate shop_item properties */ - $photo = pg_fetch_row(pg_query($database, " - select shop_order.identifier, - (select photo from photo_item where photo_item.identifier=shop_order.item) as photo, - pieces, - (select caption from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select alpha_code from photo_item, currency where photo_item.currency=currency.identifier and photo_item.identifier=shop_order.item) as currency, - (select price from photo_item where photo_item.identifier=shop_order.item) as price, - (select comment from photo_item where photo_item.identifier=shop_order.item) as remark, - (select shop_item.identifier from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_id, - (select title from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select author from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select users from photo, photo_item where photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select first_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select last_name from photo, photo_item, users where photo.users = users.identifier and photo.identifier=photo_item.photo and photo_item.identifier=shop_order.item), - (select shop_item.category from shop_item, photo_item where photo_item.shop_item=shop_item.identifier and photo_item.identifier=shop_order.item) as shop_item_category - from shop_order - where shop_order.client=$po_user[id] - and identifier = $photo[0]")); - } - print ""; - print ""; - - if ($photo[6]) - print "  $photo[6]
    Pieces"; - $tmp_pcs = pg_escape_string($_REQUEST["pcs".$photo[0]]); - if (!$tmp_pcs) - $tmp_pcs = $photo[2]; - elseif ($tmp_pcs != $photo[2]) - pg_query($database, "update shop_order set pieces=$tmp_pcs where shop_order.identifier=$photo[0]"); - print ""; - print "
    Price"; - print "
    "; - print "$photo[5] $photo[4], $subtotal_string"; - print ""; - print "Remove this Item"; - print "
    "; - - print "
    "; - $currency = $photo[4]; - $total_price += $subtotal; - print "
    "; - -print " 
    \n"; -site_navigator_status("Total: $currency $total_price", ""); -print " 
    \n"; - -print "
    "; -print "
    Additional Comments:
    \n"; -print " 
    \n"; -print "\n"; - -print "
     
    \n"; -print "\n"; -print "
    "; -print "
    "; -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/bulk.update.php b/src/bulk.update.php index b99575e..dc352b6 100644 --- a/src/bulk.update.php +++ b/src/bulk.update.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,46 +17,38 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/tools.php"; include_once "include/mime.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/import.php"; $select_folder = pg_escape_string($_REQUEST['select_folder']); $select_album = pg_escape_string($_REQUEST['select_album']); -$spool_album = pg_escape_string($_REQUEST['spool_album']); -$selection = pg_escape_string($_REQUEST['selection']); -$to_update = $_REQUEST['to_update']; +$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : FALSE; +$selection = pg_escape_string(isset($_REQUEST['selection']) ? $_REQUEST['selection'] : ""); +$to_update = isset($_REQUEST['to_update']) ? $_REQUEST['to_update'] : array(); +$recursive = isset($_REQUEST['recursive']); +$set_generate_images = $_REQUEST['set_generate_images']; $compress_pages = false; /* Explicitly disable it here */ +set_time_limit(0); /* Explicitly disable timeouts here */ -if (!$selection) { - /* return if no search criteria exists */ - header("location: my.tools.php?selector=1"); +$database = site_prolog(PO_USER_TYPE_USER); + +if (!$type || !sizeof($to_update)) { + if ($set_generate_images != 't') { + site_push_error($strings['errors']['invalid_options']); + header("Location: my.tools.php?selector=".$tools_data['bulkupdate']['idx']); + site_epilog($database); + exit(); + } } -if (!$to_update) { - /* return if no update criteria exists */ - header("location: my.tools.php?selector=1"); - } - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$set_generate_images = $_REQUEST['set_generate_images']; - -site_header($page_width, "Display Tools"); +site_header($strings['generic']['bulk_update']); site_navigator(10); -site_navigator_status("Users : My Tools", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['bulk_update'], ""); print " 
    "; display_navigator_box_top($tools_data['bulkupdate']['idx'], $tools_data, "100%"); @@ -70,160 +62,168 @@ $clear_keyword = ""; foreach ($to_update as $field) { switch ($field) { case 'set_title': - $set_title = pg_escape_string($_REQUEST['set_title']); + $set_title = pg_escape_string($_REQUEST['title']); $update_photo_sql .= " title = '$set_title', "; break; case 'set_author': - $set_author = pg_escape_string($_REQUEST['set_author']); + $set_author = pg_escape_string($_REQUEST['author']); $update_photo_sql .= " author = '$set_author', "; break; case 'set_keyword': - $set_keyword = $_REQUEST['set_keyword']; + $set_keyword = $_REQUEST['set_keywords']; break; case 'clear_keyword': - $clear_keyword = $_REQUEST['clear_keyword']; + $clear_keyword = $_REQUEST['clear_keywords']; break; case 'set_headline': - $set_headline = pg_escape_string($_REQUEST['set_headline']); + $set_headline = pg_escape_string($_REQUEST['headline']); $update_photo_sql .= " headline = '$set_headline', "; break; case 'set_caption_writer': - $set_caption_writer = pg_escape_string($_REQUEST['set_caption_writer']); + $set_caption_writer = pg_escape_string($_REQUEST['caption_writer']); $update_photo_sql .= " caption_writer = '$set_caption_writer', "; break; case 'set_caption': - $set_caption = pg_escape_string($_REQUEST['set_caption']); + $set_caption = pg_escape_string($_REQUEST['caption']); $update_photo_sql .= " caption = '$set_caption', "; break; case 'set_category': - $set_category = pg_escape_string($_REQUEST['set_category']); + $set_category = pg_escape_string($_REQUEST['category']); $update_photo_sql .= " category = '$set_category', "; break; case 'set_supplemental_category': - $set_supplemental_category = pg_escape_string($_REQUEST['set_supplemental_category']); + $set_supplemental_category = pg_escape_string($_REQUEST['supplemental_category']); $update_photo_sql .= " supplemental_category = '$set_supplemental_category', "; break; case 'set_credit': - $set_credit = pg_escape_string($_REQUEST['set_credit']); + $set_credit = pg_escape_string($_REQUEST['credit']); $update_photo_sql .= " credit = '$set_credit', "; break; case 'set_copyright': - $set_copyright = pg_escape_string($_REQUEST['set_copyright']); + $set_copyright = pg_escape_string($_REQUEST['copyright']); $update_photo_sql .= " copyright_statement = '$set_copyright', "; break; case 'set_web_statement': - $set_web_statement = pg_escape_string($_REQUEST['set_web_statement']); + $set_web_statement = pg_escape_string($_REQUEST['web_statement']); $update_photo_sql .= " web_statement = '$set_web_statement', "; break; case 'set_instructions': - $set_instructions = pg_escape_string($_REQUEST['set_instructions']); + $set_instructions = pg_escape_string($_REQUEST['instructions']); $update_photo_sql .= " instructions = '$set_instructions', "; break; case 'set_source': - $set_source = pg_escape_string($_REQUEST['set_source']); + $set_source = pg_escape_string($_REQUEST['source']); $update_photo_sql .= " source = '$set_source', "; break; case 'set_transmission_reference': - $set_transmission_reference = pg_escape_string($_REQUEST['set_transmission_reference']); + $set_transmission_reference = pg_escape_string($_REQUEST['transmission_reference']); $update_photo_sql .= " transmission_reference = '$set_transmission_reference', "; break; case 'set_date_of_exposure': - $set_date_of_exposure = check_date_validity($_REQUEST['set_date_of_exposure']); - $update_photo_sql .= " date_of_exposure= $set_date_of_exposure, "; + $set_date_of_exposure = check_date_validity($_REQUEST['exposure_timestamp']); + $update_photo_sql .= " date_of_exposure = $set_date_of_exposure, "; break; case 'set_location': - $set_location = pg_escape_string($_REQUEST['set_location']); + $set_location = pg_escape_string($_REQUEST['location']); $update_photo_sql .= " location = $set_location, "; break; case 'set_access_rights': - $set_access_rights = pg_escape_string($_REQUEST['set_access_rights']); + $set_access_rights = pg_escape_string($_REQUEST['access_rights']); $update_photo_sql .= " access_rights = $set_access_rights, "; break; case 'set_hide_original': - $set_hide_original = pg_escape_string($_REQUEST['set_hide_original']); - $update_photo_sql .= " hide_original = $set_hide_original, "; + $set_hide_original = pg_escape_string($_REQUEST['hide_original']); + $update_photo_sql .= " hide_original = '$set_hide_original', "; + break; + case 'set_store_url': + $set_store_url = pg_escape_string($_REQUEST['store_url']); + $update_photo_sql .= " store_url = '$set_store_url', "; + break; + case 'set_remark': + $set_remark = pg_escape_string($_REQUEST['remark']); + $update_photo_sql .= " comments = '$set_remark', "; break; case 'set_camera': - $set_camera = pg_escape_string($_REQUEST['set_camera']); + $set_camera = pg_escape_string($_REQUEST['camera']); $update_photo_tech_sql .= " camera = $set_camera, "; break; case 'set_camera_metering': - $set_camera_metering = pg_escape_string($_REQUEST['set_camera_metering']); + $set_camera_metering = pg_escape_string($_REQUEST['camera_metering']); $update_photo_tech_sql .= " camera_metering = $set_camera_metering, "; break; case 'set_camera_program': - $set_camera_program = pg_escape_string($_REQUEST['set_camera_program']); + $set_camera_program = pg_escape_string($_REQUEST['camera_program']); $update_photo_tech_sql .= " camera_program = $set_camera_program, "; break; case 'set_lens': - $set_lens = pg_escape_string($_REQUEST['set_lens']); + $set_lens = pg_escape_string($_REQUEST['lens']); $update_photo_tech_sql .= " lens = $set_lens, "; break; case 'set_focal_length': - $set_focal_length = pg_escape_string($_REQUEST['set_focal_length']); + $set_focal_length = pg_escape_string($_REQUEST['focal_length']); $update_photo_tech_sql .= " focal_length = $set_focal_length, "; break; case 'set_filter': - $set_filter = pg_escape_string($_REQUEST['set_filter']); + $set_filter = pg_escape_string($_REQUEST['filter']); $update_photo_tech_sql .= " filter = $set_filter, "; break; case 'set_film': - $set_film = pg_escape_string($_REQUEST['set_film']); + $set_film = pg_escape_string($_REQUEST['film']); $update_photo_tech_sql .= " film = $set_film, "; break; case 'set_iso_override': - $set_iso_override = pg_escape_string($_REQUEST['set_iso_override']); + $set_iso_override = pg_escape_string($_REQUEST['iso_override']); $update_photo_tech_sql .= " iso_override = $set_iso_override, "; break; case 'set_aperture': - $set_aperture = pg_escape_string($_REQUEST['set_aperture']); + $set_aperture = pg_escape_string($_REQUEST['aperture']); $update_photo_tech_sql .= " aperture = $set_aperture, "; break; case 'set_shutter': - $set_shutter = pg_escape_string($_REQUEST['set_shutter']); + $set_shutter = pg_escape_string($_REQUEST['shutter']); $update_photo_tech_sql .= " shutter = $set_shutter, "; break; case 'set_exp_comp': - $set_exp_comp = pg_escape_string($_REQUEST['set_exp_comp']); + $set_exp_comp = pg_escape_string($_REQUEST['exp_comp']); $update_photo_tech_sql .= " exposure_comp = $set_exp_comp, "; break; case 'set_exp_diff': - $set_exp_diff = pg_escape_string($_REQUEST['set_exp_diff']); + $set_exp_diff = pg_escape_string($_REQUEST['exp_diff']); $update_photo_tech_sql .= " ev_difference = $set_exp_diff, "; break; case 'set_flash': - $set_flash = pg_escape_string($_REQUEST['set_flash']); + $set_flash = pg_escape_string($_REQUEST['flash']); $update_photo_tech_sql .= " flash = $set_flash, "; break; case 'set_flash_mode': - $set_flash_mode = pg_escape_string($_REQUEST['set_flash_mode']); + $set_flash_mode = pg_escape_string($_REQUEST['flash_mode']); $update_photo_tech_sql .= " flash_mode = $set_flash_mode, "; break; case 'set_flash_comp': - $set_flash_comp = pg_escape_string($_REQUEST['set_flash_comp']); + $set_flash_comp = pg_escape_string($_REQUEST['flash_comp']); $update_photo_tech_sql .= " flash_comp = $set_flash_comp, "; break; case 'set_scanner': - $set_scanner = pg_escape_string($_REQUEST['set_scanner']); + $set_scanner = pg_escape_string($_REQUEST['scanner']); $update_photo_tech_sql .= " scanner = $set_scanner, "; break; case 'set_scan_params': - $param = pg_escape_string($_REQUEST['set_scan_resolution']); + $param = pg_escape_string($_REQUEST['scan_resolution']); $update_photo_tech_sql .= " scan_resolution = $param, "; - $param = pg_escape_string($_REQUEST['set_scan_bitdepth']); + $param = pg_escape_string($_REQUEST['scan_bitdepth']); $update_photo_tech_sql .= " scan_bitdepth = $param, "; - $param = pg_escape_string($_REQUEST['set_scan_multiscan']); + $param = pg_escape_string($_REQUEST['scan_multiscan']); $update_photo_tech_sql .= " scan_multiscan = $param, "; break; case 'set_support': - $set_support = pg_escape_string($_REQUEST['set_support']); + $set_support = pg_escape_string($_REQUEST['support']); $update_photo_tech_sql .= " support = $set_support, "; break; case 'set_geo_location': - $pos = pg_escape_string($_REQUEST['latitude']); + $pos = pg_escape_string(parse_latitude($_REQUEST['latitude'])); if ($pos == "") $pos = "null"; $update_photo_tech_sql .= " latitude = $pos, "; - $pos = pg_escape_string($_REQUEST['longitude']); + $pos = pg_escape_string(parse_latitude($_REQUEST['longitude'])); if ($pos == "") $pos = "null"; $update_photo_tech_sql .= " longitude = $pos, "; $pos = pg_escape_string($_REQUEST['altitude']); @@ -239,35 +239,55 @@ foreach ($to_update as $field) { } } -switch ($selection) { +switch ($type) { case 'folder': - if ($select_folder == "all") - $sql_selector = " users = $po_user[id] "; - else - $sql_selector = " folder = $select_folder "; + if ($select_folder == "all") { + $sql_selector = " p.users = $po_user[id] "; + } else { + if ($recursive) { + $sql_selector = " p.folder in (select * from folder_and_subfolders($select_folder))"; + } else { + $sql_selector = " p.folder = $select_folder "; + } + } break; case 'album': - $sql_selector = " identifier in( select photo from album_content where album = $select_album) "; + if ($recursive) { + $sql_selector = " a.album in (select * from album_and_subalbums($select_album)) "; + } else { + $sql_selector = " a.album = $select_album "; + } + + $sql_selector = " p.identifier in( select photo from album_content a where $sql_selector) "; + break; case 'spool': - $sql_selector = " identifier in( select photo from album_content where album = $spool_album)"; + $sql_selector = " p.identifier in( select photo from album_content where album = $po_user[spool_album])"; break; + case 'list': + $sql_selector = " p.identifier in( $selection )"; + break; default: - header("location: my.tools.php?selector=1"); + site_push_error($strings['errors']['invalid_operation']); + header("Location: my.tools.php?selector=".$tools_data['bulkupdate']['idx']); + site_epilog($database); exit(); break; } /* Ensure users only update files they own */ -if ($po_user['type'] != $user_type['administrator']) { - $sql_selector = " users = $po_user[id] AND $sql_selector "; +if ($po_user['type'] != PO_USER_TYPE_ADMIN) { + $sql_selector = " p.users = $po_user[id] AND $sql_selector "; } $num_of_updates = pg_fetch_row(pg_query($database, " - select count(identifier) from photo + select count(identifier) from photo p where $sql_selector")); -if ($update_photo_sql != "") { +$result = pg_query($database, "begin"); + + +if ($result && $update_photo_sql != "") { $update_photo_sql = substr($update_photo_sql, 0, strlen($update_photo_sql) - 2); // print "
  • $update_photo_sql
  • "; @@ -275,23 +295,23 @@ if ($update_photo_sql != "") { $result = pg_query($database, " update photo set - $update_photo_sql - where $sql_selector"); + $update_photo_sql where identifier in (select identifier from photo p + where $sql_selector)"); } -if ($update_photo_tech_sql != "") { +if ($result && $update_photo_tech_sql != "") { $update_photo_tech_sql = substr($update_photo_tech_sql, 0, strlen($update_photo_tech_sql) - 2); - // print "
  • $update_photo_tech_sql
  • "; - // print "
  • $sql_selector
  • "; - - $result = pg_query($database, " - update photo_tech set + $query = "update photo_tech set $update_photo_tech_sql - where photo in (select identifier from photo where $sql_selector)"); + where photo in (select identifier from photo p where $sql_selector)"; + + // print "
  • $query
  • "; + + $result = pg_query($database,$query); } -if ($set_keyword != "") { +if ($result && $set_keyword != "") { if (strstr($set_keyword, ";")) $keywords = semi_string_to_array($set_keyword); else @@ -304,16 +324,16 @@ if ($set_keyword != "") { if ($keyword == "") continue; $keyword = pg_escape_string($keyword); - pg_query($database, "insert into photo_keywords (photo, keyword) + $result = pg_query($database, "insert into photo_keywords (photo, keyword) select p.identifier, '$keyword' from photo p where $sql_selector and not exists (select k.photo from photo_keywords k where k.photo = p.identifier and k.keyword = '$keyword')"); } } -if ($clear_keyword != "") { - if (strstr($set_keyword, ";")) - $keywords = semi_string_to_array($set_keyword); +if ($result && $clear_keyword != "") { + if (strstr($clear_keyword, ";")) + $keywords = semi_string_to_array($clear_keyword); else - $keywords = space_string_to_array($set_keyword); + $keywords = space_string_to_array($clear_keyword); foreach ($keywords as $keyword) { $keyword = strtolower(trim($keyword)); @@ -322,85 +342,151 @@ if ($clear_keyword != "") { if ($keyword == "") continue; $keyword = pg_escape_string($keyword); - pg_query($database, "delete from photo_keywords where keyword = $keyword and $sql_selector"); + $query = "delete from photo_keywords where keyword = '$keyword' and photo in (select p.identifier from photo p where $sql_selector)"; + + $result = pg_query($database, $query); } - } -print "

    Updated $num_of_updates[0] photos.

    "; +if ($result) { + pg_query($database, "commit"); + print "

    ".$strings['tools']['num_photos_updated'].": $num_of_updates[0]

    "; + } else { + pg_query($database, "rollback"); + // print "
    $query
    "; + print err_str($strings['errors']['db_insert_failed']); + } -if (($set_generate_images == 't')) { - $im_options = get_im_options($database, $po_user['id']); - $my_im_composite_options = get_im_composite_options($database, $po_user['id']); - $dcraw_options = get_dcraw_options($database, $po_user['id']); +if ($result && $set_generate_images == 't') { + print "
      "; - print "
      "; - - $limit = 20; - $offset = 0; - while (1) { - $photo = pg_query($database, " - select small_image_path, medium_image_path, large_image_path, title, photo.identifier, colorspace, orientation - from photo, photo_version - where photo.identifier = photo_version.photo + $counter = 0; +$query = " + select get_image_path(v.identifier, 1) as thumb_path, + get_image_path(v.identifier, 2) as preview_path, + get_image_path(v.identifier, 3) as original_path, + title, p.identifier, colorspace, orientation, v.identifier as version + from photo p, photo_version v + where p.identifier = v.photo and $sql_selector - limit $limit - offset $offset"); - - $num_of_photos = pg_num_rows($photo); - - if ($num_of_photos == 0) + order by p.identifier"; + $photo = pg_query($database, $query); + // print "
      $query
      "; + $num_of_photos = pg_num_rows($photo); + + for ($counter = 0; $counter < $num_of_photos; $counter++) { + $photo_data = pg_fetch_row($photo, $counter); + + if (($current_volume = get_current_volume($database, FALSE)) == FALSE) { + print err_str($strings['errors']['failed_volume']); break; + } - for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_data = pg_fetch_row($photo, $counter); + pg_query($database, "begin"); + + $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); - $camera_profile = pg_fetch_row(pg_query($database, " + $camera_profile = pg_fetch_row(pg_query($database, " select raw_icc_profile from photo_tech, camera, camera_type where photo_tech.photo = $photo_data[4] and photo_tech.camera = camera.identifier and camera.type = camera_type.identifier")); - $thumb_name = $image_repository_path ."/". $photo_data[0]; - $image_name = $image_repository_path ."/". $photo_data[1]; - $original_name = $image_repository_path ."/". $photo_data[2]; - $orientation = orientation_to_xform($database, $photo_data[6]); + $orientation = orientation_to_xform($database, $photo_data[6]); + $original_name = $image_repository_path ."/". $photo_data[2]; + $original_file_type = strtolower(substr($original_name, strrpos($original_name, ".") + 1)); + $multi_page_parameter = $mime_type[$original_file_type]['page']; + $decoder = $mime_type[$original_file_type]['decoder']; - $original_file_type = strtolower(substr($original_name, strrpos($original_name, ".") + 1)); - $multi_page_parameter = $mime_type[$original_file_type]['page']; - $decoder = $mime_type[$original_file_type]['decoder']; + $thumb = "$current_volume/00002/$next_index[0]" . "_1." . $po_options['thumb_format']; + $preview = "$current_volume/00001/$next_index[0]" . "_2." . $po_options['preview_format']; + + print "
    • ".$strings['tools']['regenerating_images']."# $photo_data[4]-$photo_data[7]: $photo_data[3].
        "; - print "Regenerating thumbnail and preview for $photo_data[3].
          "; + $image_data = array(); + $image_data['jpgfromraw'] = FALSE; - $image_data = array(); - $temporary_ppm_file = import_raw_decode($original_name, $dcraw_options, $decoder, TRUE, $camera_profile[0], $image_data); + if ($po_options['watermark_location'] && + $po_options['watermark_brightness'] && + $po_options['watermark_photo']) { + $watermark = $po_options['watermark_photo']; + } else { + $watermark = "null"; + } + if ($result) { + $temporary_ppm_file = import_raw_decode($original_name, $decoder, $camera_profile[0], TRUE, $image_data); if ($temporary_ppm_file) { $original_name = $temporary_ppm_file; } - - import_generate_preview($original_name, $image_name, TRUE, $im_options, $my_im_composite_options, $multi_page_parameter, $orientation, $photo_data[5]); - import_generate_thumbnail($original_name, $thumb_name, TRUE, $im_options, $multi_page_parameter, $orientation, $photo_data[5]); - - if ($temporary_ppm_file) { - unlink($temporary_ppm_file); - } - - print "
        "; + $result = import_generate_preview($original_name, $image_repository_path."/".$preview, TRUE, $multi_page_parameter, $orientation, $photo_data[5]); + } + + if ($result) { + $result = transfer_metadata(NULL, $original_name, $preview, TRUE, TRUE); } - $offset += $limit; + if ($result) { + $image_dimension = po_get_image_size($image_repository_path."/".$preview); + $size = filesize($image_repository_path."/".$preview); + $result = pg_query($database, "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $photo_data[7], 2, + $image_dimension[0], $image_dimension[1], '$preview', + $size, '', '', $watermark)"); + } + + /* Thumbnail */ + if ($result) { + $result = import_generate_thumbnail($original_name, $image_repository_path."/".$thumb, TRUE, $multi_page_parameter, $orientation, $photo_data[5]); + } + + if ($result) { + $image_dimension = po_get_image_size($image_repository_path."/".$thumb); + $size = filesize($image_repository_path."/".$thumb); + $result = pg_query($database, "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $photo_data[7], 1, + $image_dimension[0], $image_dimension[1], '$thumb', + $size, '', '', null)"); + } + + if ($temporary_ppm_file) { + unlink($temporary_ppm_file); + } + + // XXX -- Kick the date_changed fields via the DB drigger + if ($result) { + $result = pg_query($database, "update photo_version set date_changed = now() where identifier = $photo_data[7] "); + } + + /* Delete the old files! */ + if ($result) { + $result = pg_query($database, "delete from files where path in ('$photo_data[0]', '$photo_data[1]')"); + } + if ($result) { + $err = error_reporting(0); + unlink($image_repository_path . "/" .$photo_data[0]); + unlink($image_repository_path . "/" .$photo_data[1]); + error_reporting($err); + } + + print "
    • "; + + if ($result) { + pg_query($database, "commit"); + } else { + pg_query($database, "rollback"); + break; + } } - print "
      "; + + print "
    "; } -print "

    "; -print ""; -print "

    "; - +print $thm_elem['button.back.2']; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/camera.add.2.php b/src/camera.add.2.php index 0e8108f..0fe0eba 100644 --- a/src/camera.add.2.php +++ b/src/camera.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,17 +17,18 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/calendar.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; function add_camera($database, $user_id, - $camera_type_id, $camera_manufacturer_id, $camera_model, $camera_variation, - $camera_serial_number, $camera_purchase_timestamp, - $camera_purchased_new, $camera_access_rights, $camera_icc_profile) { + $camera_type_id, $camera_manufacturer_id, $camera_model, $camera_variation, + $camera_serial_number, $camera_purchase_timestamp, + $camera_purchased_new, $camera_access_rights, $camera_icc_profile, $camera_ignore_comment) { + global $strings; $camera_date_of_purchase = check_date_validity($camera_purchase_timestamp); @@ -35,45 +36,46 @@ function add_camera($database, $user_id, $camera_variation = pg_escape_string($camera_variation); $camera_serial_number = pg_escape_string($camera_serial_number); + $result = TRUE; + + pg_query($database, "begin"); + if ($camera_type_id=='custom') { $new_camera_type_id = pg_fetch_row(pg_query($database, "select nextval('camera_type_id_sequence')")); $camera_type_id = $new_camera_type_id[0]; $result = pg_query($database, "insert into camera_type (identifier, manufacturer, model, variation, last_modified_date, last_modifying_users, raw_icc_profile) values ($camera_type_id, $camera_manufacturer_id, '$camera_model', '$camera_variation', now(), $user_id, $camera_icc_profile)"); - if (!$result) { - // print "Failed to create new camera type"; - return FALSE; - } } - $result = pg_query($database, "insert into camera (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights) - values (nextval('camera_id_sequence'), '$camera_type_id', '$user_id', '$camera_serial_number', $camera_date_of_purchase, '$camera_purchased_new', '$camera_access_rights')"); - if (!$result) { - //print "Failed to create new camera"; + if ($result) { + $result = pg_query($database, "insert into camera (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights, ignore_comment) + values (nextval('camera_id_sequence'), '$camera_type_id', '$user_id', '$camera_serial_number', $camera_date_of_purchase, '$camera_purchased_new', '$camera_access_rights', '$camera_ignore_comment')"); + } + + if ($result) { + pg_query($database, "commit"); + return TRUE; + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); return FALSE; } - return TRUE; + return FALSE; } - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); add_camera($database, $po_user['id'], - pg_escape_string($_REQUEST['camera_type_id']), - pg_escape_string($_REQUEST['camera_manufacturer_id']), - pg_escape_string($_REQUEST['camera_model']), - pg_escape_string($_REQUEST['camera_variation']), - pg_escape_string($_REQUEST['camera_serial_number']), - pg_escape_string($_REQUEST['camera_purchase_timestamp']), - pg_escape_string($_REQUEST['camera_purchased_new']), - pg_escape_string($_REQUEST['camera_access_rights']), - pg_escape_string($_REQUEST['camera_icc_profile'])); + pg_escape_string($_REQUEST['type_id']), + pg_escape_string($_REQUEST['manufacturer_id']), + pg_escape_string($_REQUEST['model']), + pg_escape_string($_REQUEST['variation']), + pg_escape_string($_REQUEST['serial_number']), + pg_escape_string($_REQUEST['purchase_timestamp']), + pg_escape_string($_REQUEST['purchased_new']), + pg_escape_string($_REQUEST['access_rights']), + pg_escape_string($_REQUEST['icc_profile']), + pg_escape_string($_REQUEST['ignore_comment'])); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['camera']['idx']); +header("Location: my.profile.php?selector=".$profile_data['camera']['idx']); ?> diff --git a/src/camera.add.php b/src/camera.add.php index 22a8f0d..db52494 100644 --- a/src/camera.add.php +++ b/src/camera.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,23 +17,17 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; include_once "include/profile.php"; include_once "include/site.php"; +; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); +$type = "camera"; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); -$all_manufacturers = pg_query($database, "select identifier, name from manufacturer order by name"); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); +$manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); switch ($manufacturer_filter) { case 'All': @@ -44,150 +38,117 @@ switch ($manufacturer_filter) { $camera_type = pg_query($database, "select identifier, name, model, variation, url, raw_icc_profile from view_camera_type where view_camera_type.name='$manufacturer_filter' order by name"); } -site_header($page_width, "Add Camera"); +site_header(sprintf($strings['profile']['add'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Add new camera", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['camera']['idx'], $profile_data, "100%"); -print " 
    "; -if (pg_num_rows($all_manufacturers) == 0) { - print "\n"; - print "\n"; - print "
    \n"; - print "You must add manufacturers, before adding cameras"; - print "
     

    \n"; - print "\"Add\n"; - print "

    \n"; +if (pg_num_rows($manufacturer) == 0) { + print emit_manuf_add_needed($type); display_navigator_box_bottom("100%"); - print " 
    "; site_footer($database); site_epilog($database); exit; } -print "\n"; -print "\n"; -print "\n"; -print "\n"; +emit_profile_manuf_combo("camera.add.php?type=$type", $type, 4, $manufacturer, $manufacturer_filter); print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th(""); +print emit_th($strings['profile']['manufacturer'], "width=\"29%\""); +print emit_th($strings['profile']['model'], "width=\"25%\""); +print emit_th($strings['profile']['variation'], "width=\"21%\""); +print emit_th($strings['profile']['icc_profile'], "width=\"21%\""); print "\n"; -print "\n"; $num_of_camera_types = pg_num_rows($camera_type); if ($num_of_camera_types > 0) { for ($i=0; $i < $num_of_camera_types; $i++) { $camera = pg_fetch_row($camera_type, $i); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; } } else -print "\n"; + print "\n"; print "
    \n"; +print "
    \n"; +print "\n"; -print "
    \n\n"; -print "\n"; -print "\n
    Camera Types\n"; -print "\n"; -print ""; -print "\n"; -print "
    \n"; - -print "
    ManufacturerModelVariationICC Profile
    "; - print "$camera[1]$camera[2]$camera[3]"; - print $icc_profiles[$camera[5]]['name']; + print ""; + print "$camera[1]$camera[2]$camera[3]"; + if ($camera[5] != "") + print $icc_profiles[$camera[5]]['name']; print "
    No camera types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])."
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; +print "
    New Camera Type
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th(""); +print emit_th($strings['profile']['manufacturer'], "width=\"29%\""); +print emit_th($strings['profile']['model'], "width=\"25%\""); +print emit_th($strings['profile']['variation'], "width=\"21%\""); +print emit_th($strings['profile']['icc_profile'], "width=\"21%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; print "\n"; print "
    ".sprintf($strings['profile']['new_type'], $strings['generic'][$type])."
    ManufacturerModelVariationICC Profile
    "; -print ""; -print ""; -print ""; -print ""; -display_icc_profiles_combo("camera_icc_profile", ""); +print ""; +print ""; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, ""); +print ""; +print ""; +print ""; +display_icc_profiles_combo("icc_profile", ""); print "
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; - +print "
    Camera Specific Data
    \n"; +print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['profile']['ignore_comment']); +print emit_th($strings['generic']['access']); print "\n"; print "\n"; -print "\n"; -print "\n"; +print "\n"; -print "\n"; -print "\n"; +print "\n"; print "\n"; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Serial NumberPurchase DateNewAccess
    \n"; -print "\n"; -display_date_input_form("camera_purchase_timestamp", ""); +print "\n"; +print "\n"; +print emit_date_input_form("purchase_timestamp", ""); print "\n"; -display_yes_no_combo("camera_purchased_new", "t"); +print "\n"; +display_yes_no_combo("purchased_new", "t"); print "\n"; -display_access_combo("camera_access_rights", "t", ""); +print ""; +display_yes_no_combo("ignore_comment", 'f'); +print "\n"; +display_access_combo("access_rights", "t", ""); print "
    \n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/camera.del.php b/src/camera.del.php index cceb239..110aad9 100644 --- a/src/camera.del.php +++ b/src/camera.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,65 +17,48 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $camera_id = pg_escape_string($_REQUEST['item']); $number_of_references = pg_fetch_row(pg_query($database, "select number_of_camera_references($camera_id)")); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from camera where identifier=$camera_id and users=$po_user[id]")); if ($result[0] == 0) { + site_push_error($strings['errors']['not_owner']); site_epilog($database); - header("location: login.php"); + header("Location: login.php"); exit(); } } -site_header($page_width, "Delete Camera"); +site_header(sprintf($strings['profile']['delete'], $strings['generic']['camera'])); site_navigator(6); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete camera", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this camera. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this camera. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic']['camera']), ""); -print " 
    "; display_navigator_box_top($profile_data['camera']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    Remove Camera
    \n"; +print "\n"; +print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); +print emit_th($strings['profile']['image_count']); print ""; $camera_to_be_removed = pg_fetch_row(pg_query($database, " @@ -84,29 +67,26 @@ $camera_to_be_removed = pg_fetch_row(pg_query($database, " from view_camera where identifier='$camera_id'")); print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print "\n"; +print ""; +print ""; +print ""; +print emit_td(emit_yes_no_text($camera_to_be_removed[5])); +print emit_td($strings['generic'][$access[$camera_to_be_removed[7]]]); +print "\n"; print ""; print "
    ".sprintf($strings['profile']['delete'], $strings['generic']['camera'])."
    ManufacturerModelSerial NumberPurchase DatePurchased NewAccessNum Photos
    $camera_to_be_removed[0]$camera_to_be_removed[1] $camera_to_be_removed[2]"; -print "$camera_to_be_removed[3] ".generate_date_html($camera_to_be_removed[4], 'short_date', 1).""; display_yes_no_text($camera_to_be_removed[5]); print "$camera_to_be_removed[7]$number_of_references[0]$camera_to_be_removed[0]$camera_to_be_removed[1] $camera_to_be_removed[2]"; +print "$camera_to_be_removed[3] ".emit_date_html($camera_to_be_removed[4], 'short_date')."$number_of_references[0]
    "; -print " 
    "; if ($number_of_references[0]==0) { - print "\n"; - print "\"Cancel\"/\n"; -} -else { - print "\"Back\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; +} else { + print $thm_elem['button.back']; } print "
    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/camera.edit.2.php b/src/camera.edit.2.php index 6184f69..d413121 100644 --- a/src/camera.edit.2.php +++ b/src/camera.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,31 +17,38 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; include_once "include/calendar.php"; function update_camera($database, $user_id, $camera_id, $camera_type_id, $camera_manufacturer_id, $camera_model, $camera_variation, - $camera_serial_number, $camera_purchase_timestamp, $camera_purchased_new, $camera_access_rights, $camera_icc_profile) { + $camera_serial_number, $camera_purchase_timestamp, $camera_purchased_new, $camera_access_rights, $camera_icc_profile, $camera_ignore_comment) { global $po_user; + global $strings; $camera_date_of_purchase = check_date_validity($camera_purchase_timestamp); $camera_model = pg_escape_string($camera_model); $camera_variation = pg_escape_string($camera_variation); $camera_serial_number = pg_escape_string($camera_serial_number); + $camera_ignore_comment = pg_escape_string($camera_ignore_comment); + + $result = TRUE; /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from camera where identifier=$camera_id and users=$po_user[id]")); if ($result[0] == 0) { + site_push_error($strings['errors']['not_owner']); return FALSE; } } pg_query($database, "begin"); + $camera_type_to_remove = FALSE; + if ($camera_type_id=='custom') { /* camera type has changed */ $number_of_cameraes_of_same_type = pg_fetch_row(pg_query($database, "select count(identifier) from camera where type=(select type from camera where identifier='$camera_id')")); @@ -52,64 +59,55 @@ function update_camera($database, $user_id, $camera_id, $camera_type_id, $camera /* create new type */ $new_camera_type_id = pg_fetch_row(pg_query($database, "select nextval('camera_type_id_sequence')")); $camera_type_id = $new_camera_type_id[0]; - $result = pg_query($database, " - insert into camera_type (identifier, manufacturer, model, variation, last_modified_date, last_modifying_users, raw_icc_profile) - values ($camera_type_id, $camera_manufacturer_id, '$camera_model', '$camera_variation', now(), $user_id, $camera_icc_profile)"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to create new camera type"; - return FALSE; - } + $result = pg_query($database, "insert into camera_type (identifier, manufacturer, model, variation, last_modified_date, last_modifying_users, raw_icc_profile) + values ($camera_type_id, $camera_manufacturer_id, '$camera_model', '$camera_variation', now(), $user_id, $camera_icc_profile)"); } /* add camera */ - $result = pg_query($database, " + if ($result) { + $result = pg_query($database, " update camera set type=$camera_type_id, serial_number='$camera_serial_number', date_of_purchase=$camera_date_of_purchase, purchased_new='$camera_purchased_new', - access_rights='$camera_access_rights' + access_rights='$camera_access_rights', + ignore_comment='$camera_ignore_comment' where identifier='$camera_id'"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to create new camera"; - return FALSE; - } + } /* remove old type */ - if ($camera_type_to_remove) { + if ($result && $camera_type_to_remove) { $result = pg_query($database, "delete from camera_type where identifier='$camera_type_to_remove[0]'"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to delete camera type: $camera_type"; - return FALSE; - } } - pg_query($database, "commit"); - return TRUE; + + if ($result) { + pg_query($database, "commit"); + return TRUE; + } else { + pg_query($database, "rollback"); + site_push_error($strings['errors']['db_insert_failed']); + return FALSE; + } + return FALSE; } -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); update_camera($database, $po_user['id'], pg_escape_string($_REQUEST['item_id']), pg_escape_string($_REQUEST['camera_type_id']), - pg_escape_string($_REQUEST['camera_manufacturer_id']), + pg_escape_string($_REQUEST['manufacturer_id']), pg_escape_string($_REQUEST['camera_model']), pg_escape_string($_REQUEST['camera_variation']), pg_escape_string($_REQUEST['camera_serial_number']), pg_escape_string($_REQUEST['camera_purchase_timestamp']), pg_escape_string($_REQUEST['camera_purchased_new']), pg_escape_string($_REQUEST['camera_access_rights']), - pg_escape_string($_REQUEST['camera_icc_profile'])); + pg_escape_string($_REQUEST['camera_icc_profile']), + pg_escape_string($_REQUEST['camera_ignore_comment'])); + site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['camera']['idx']); +header("Location: my.profile.php?selector=".$profile_data['camera']['idx']); ?> diff --git a/src/camera.edit.php b/src/camera.edit.php index 291471c..ae11810 100644 --- a/src/camera.edit.php +++ b/src/camera.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,38 +17,36 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); $camera_id = pg_escape_string(array_key_exists('item', $_REQUEST) ? $_REQUEST['item'] : 0); -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); +$type = 'camera'; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$camera_current_value = pg_fetch_row(pg_query($database, "select name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile, users - from view_camera where identifier='$camera_id'")); +$camera_current_value = pg_fetch_row(pg_query($database, "select name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile, users, ignore_comment + from view_camera where identifier=$camera_id")); /* Ensure the user owns it !*/ if (($po_user['id'] != $camera_current_value[9]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['db_insert_failed']); + header("Location: login.php"); exit(); } -$camera_type_current_value = pg_fetch_row(pg_query($database, "select type from camera where identifier='$camera_id'")); +$camera_type_current_value = pg_fetch_row(pg_query($database, "select type from camera where identifier=$camera_id")); -$all_manufacturers = pg_query($database, "select identifier, name from manufacturer order by name"); +if ($camera_type_current_value == FALSE) { + $camera_type_current_value[0] = 0; +} + +$manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); switch ($manufacturer_filter) { case 'All': @@ -57,46 +55,25 @@ switch ($manufacturer_filter) { break; default: $all_camera_types = pg_query($database, "select identifier, name, model, variation, url, raw_icc_profile - from view_camera_type where name='$manufacturer_filter' or identifier='$camera_type_current_value[0]' order by name"); + from view_camera_type where name='$manufacturer_filter' or identifier=$camera_type_current_value[0] order by name"); } -site_header($page_width, "Edit Camera"); +site_header(sprintf($strings['profile']['edit'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit camera", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['camera']['idx'], $profile_data, "100%"); -print " 
    "; -print "\n"; -print ""; -print ""; -print ""; - print ""; +print "
    \n"; -print "\n\n"; -print "\n"; -print "\n
    Camera Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; -print "
    \n"; +emit_profile_manuf_combo("camera.edit.php?type=$type&item=$camera_id", $type, 4, $manufacturer, $manufacturer_filter); + print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th(""); +print emit_th($strings['profile']['manufacturer'], "width=\"29%\""); +print emit_th($strings['profile']['model'], "width=\"25%\""); +print emit_th($strings['profile']['variation'], "width=\"21%\""); +print emit_th($strings['profile']['icc_profile'], "width=\"21%\""); print "\n"; $num_of_camera_types = pg_num_rows($all_camera_types); @@ -105,100 +82,91 @@ if ($num_of_camera_types > 0) { $camera_type = pg_fetch_row($all_camera_types, $i); print ""; if ($camera_type_current_value[0] == $camera_type[0]) - print ""; + print ""; else - print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + if ($camera_type[5] != "") { + print ""; + } else { + print ""; + } print ""; } } -else -print ""; - + else + print "\n"; print "
    ManufacturerModelVariationICC Profile
    $camera_type[1]$camera_type[2]$camera_type[3]"; - print $icc_profiles[$camera_type[5]]['name']; - print "$camera_type[1]$camera_type[2]$camera_type[3]" . $icc_profiles[$camera_type[5]]['name'] . "
    No camera types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])."
    \n"; -print " 
    \n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    Edit Camera Type
    ManufacturerModelVariationICC Profile
    \n"; +print ""; +print "\n"; print ""; +print "\n"; +print emit_th(""); +print emit_th($strings['profile']['manufacturer'], "width=\"29%\""); +print emit_th($strings['profile']['model'], "width=\"25%\""); +print emit_th($strings['profile']['variation'], "width=\"21%\""); +print emit_th($strings['profile']['icc_profile'], "width=\"21%\""); +print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; +print ""; print ""; print "
    ".sprintf($strings['profile']['edit_type'], $strings['generic'][$type])."
    "; +print ""; print ""; print ""; -print ""; - +print ""; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, $camera_current_value[0]); print ""; -print ""; +print ""; +print ""; print ""; -print ""; +print ""; +print ""; print ""; +print ""; display_icc_profiles_combo("camera_icc_profile", $camera_current_value[8]); -print "
    \n"; -print " 
    \n"; -print "\n"; -print ""; +print "
    Camera Specific Data
    \n"; +print "\n"; + +print "\n"; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['profile']['ignore_comment']); +print emit_th($strings['generic']['access']); +print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; $date_of_purchase= substr($camera_current_value[4], 0, 10); -print "\n"; -print "\n"; -print "\n"; +print "\n"; print ""; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Serial NumberPurchase DatePurchased NewAccess
    "; +print ""; print "\n"; -display_date_input_form("camera_purchase_timestamp", "$date_of_purchase"); +print "\n"; +print emit_date_input_form("camera_purchase_timestamp", $date_of_purchase); print ""; +print ""; display_yes_no_combo("camera_purchased_new", $camera_current_value[5]); print ""; +print ""; +display_yes_no_combo("camera_ignore_comment", $camera_current_value[10]); +print ""; display_access_combo("camera_access_rights", $camera_current_value[7], ""); print "
    "; -print " 
    "; -print "\n"; -print "Cancel/\n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print ""; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/clidemo.php b/src/clidemo.php deleted file mode 100755 index 42681bf..0000000 --- a/src/clidemo.php +++ /dev/null @@ -1,293 +0,0 @@ -#!/usr/bin/php -\n", $i, $indent, $folder_list[$i]["caption"], $folder_list[$i]["id"]); -} - -printf ("Total of %d folders.\n", count($folder_list)); - - -// -// Ask user for folder in which to create the new folders. -// - -do { - printf ("\nEnter number of folder in which to upload the local structure: "); - fscanf(STDIN, "%s", $folder_key); - - if (($folder_key < 0) or ($folder_key > count($folder_list))) { - printf ("Sorry, that folder number does not exist. Please try again.\n"); - } -} while (($folder_key < 0) or ($folder_key > count($folder_list))); - - -if ( $folder_key == 0 ) { - printf ("You selected the root folder.\n"); - $root_folder_id = "null"; - $root_folder_name = "/"; -} else { - // printf ("You selected the folder '%s'.\n", $folder_list[$folder_key]["caption"]); - printf ("You selected the folder '%s/%s'.\n", get_path_to_folder_slashed($database, $folder_list[$folder_key]["id"]), $folder_list[$folder_key]["caption"]); - $root_folder_id = $folder_list[$folder_key]["id"]; - $root_folder_name = get_path_to_folder_slashed($database, $folder_list[$folder_key]["id"]) . "/" . $folder_list[$folder_key]["caption"]; -} - - -// -// Display directory tree. -// - -$path = getcwd(); -find_directory_tree (".", $directory_list, 0); - -printf ("\nHierarchical directory list under '%s':\n", $path); -for ($i = 1; $i <= count($directory_list); $i++) { - $indent = str_repeat(" ", $directory_list[$i]["level"]); - printf("[%4d] %s%s \n", $i, $indent, $directory_list[$i]["name"], $directory_list[$i]["id"], $directory_list[$i]["parent_key"], $directory_list[$i]["parent_id"]); -} - - -// -// Ask confirmation before adding new folders. -// - -do { - printf ("\nShall I create this folder structure in '%s'? (y/n): ", $root_folder_name); - fscanf(STDIN, "%s", $answer); - - if (($answer != "y") and ($answer != "n")) { - printf ("Please answer 'y' or 'n'.\n"); - } -} while (($answer != "y") and ($answer != "n")); - - -// -// Create folders if answer was positive. -// - -if ($answer == "y") { - printf ("Creating folder structure in '%s'...\n", $root_folder_name); - - for ($i = 1; $i <= count($directory_list); $i++) { - - // print what we are doing - $indent = str_repeat(" ", $directory_list[$i]["level"]); - printf("Creating folder %s%s\n", $indent, $directory_list[$i]["name"]); - - // begin transaction - pg_query($database, "begin"); - - // Get a new unique ID for this folder. - $result = pg_fetch_row(pg_query($database, "select nextval('folder_id_sequence')")); - $directory_list[$i]["id"]=$result[0]; - - // Retrieve ID from parent - $directory_list[$i]["parent_id"] = $directory_list[$directory_list[$i]["parent_key"]]["id"]; - - // Find out parent folder - if ($directory_list[$i]["parent_id"] == 0 ) { - $parent_id = $root_folder_id; - } else { - $parent_id = $directory_list[$i]["parent_id"]; - } - - // shortcut names for values - $folder_id = $directory_list[$i]["id"]; - $caption = $directory_list[$i]["name"]; - - // insert folder - $result = pg_query($database, "insert into folder (identifier, parent_folder, users, caption, description, date_of_creation, access_rights, orderby) values ($folder_id, $parent_id, $user_id, '$caption', 'CLI generated folder', now(), 3, 1)"); - - // commit transaction - pg_query($database, "commit"); - - } - -} else { - printf ("Skipping folder structure create.\n"); -} - - - - - - -function find_directory_tree ($path, &$directory_list, $level ) -{ - // if no path specified, assume current directory - if ( $path == "" ) { - $path = "."; - } - - if (!file_exists($path)) { - echo "not an existing directory"; - return; - } - - if (!is_dir($path)) { - echo $path." isnt a directory"; - return; - } - - $parent_key = count($directory_list); - - $main_dir =opendir ($path) or die("Error reading ".$path); - - - while ($entry=readdir($main_dir)) - { - // Only look for directories - if (filetype($path."/".$entry) == "dir") - { - // Ignore special directories "." and ".." - if ($entry != "." and $entry != "..") - { - $count = count($directory_list)+1; - $directory_list[$count]["name"]=$entry; - $directory_list[$count]["path"]=$path."/".$entry; - $directory_list[$count]["level"]=$level; - $directory_list[$count]["parent_key"]=$parent_key; - $directory_list[$count]["id"]=0; - $directory_list[$count]["parent_id"]=0; - - find_directory_tree($path."/".$entry, $directory_list, $level+1); - } - } - } -} - - - - -function find_folder_tree($database, $user_id, $parent_id, &$folder_list, $level ) -{ - // If user_id is empty, assume administrator - if ($user_id == "") { - $user_id = 1; - } - - // Select only subfolders of the specified folder, if no folder is specified - // we assume the root folder is requested - if ($parent_id == "") { - $folder_selector = "parent_folder is null"; - } - else { - $folder_selector = "parent_folder=$parent_id"; - } - - $parent_key = count($folder_list); - - // Get the list of subfolders. - $sub_folders = pg_query($database, "select identifier, caption from folder where users=$user_id and $folder_selector order by date_of_creation asc"); - - // Get the number of subfolders - $num_of_folders = pg_num_rows($sub_folders); - - // Loop over all subfolders, and recurse into them if they have subfolders - // themselves. - for ($i = 0; $i < $num_of_folders; $i++) { - $folder = pg_fetch_row($sub_folders, $i); - - // We filter out the Trash and Orphanage folders. - if (($folder[1] != "Trash" && ($folder[1] != "Orphanage")) { - $count = count($folder_list)+1; - $folder_list[$count]["id"]=$folder[0]; - $folder_list[$count]["caption"]=$folder[1]; - $folder_list[$count]["level"]=$level; - $folder_list[$count]["parent_id"]=$parent_id; - $$folder_list[$count]["parent_key"]=$parent_key; - $subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder[0])")); - if ($subfolders_in_folder > 0 ) { - find_folder_tree($database, $user_id, $folder[0], $folder_list, $level+1); - } - } - } -} - - - - -function get_path_to_folder_slashed($database, $folder_id) { - $stack_size = 0; - - $folder_data = pg_fetch_row(pg_query($database, " - select parent_folder, folder.caption - from folder - where folder.identifier = '$folder_id'")); - $folder_id = $folder_data[0]; - - if ($folder_id == "") - return; - - do { - $folder_data = pg_fetch_row(pg_query($database, " - select parent_folder, folder.caption - from folder - where folder.identifier = '$folder_id'")); - $folder_data[1] = strip_tags($folder_data[1]); - $folder_data[1] = makeZanza($folder_data[1], "No caption"); - $stack[$stack_size] = "$folder_data[1]"; - $folder_id = $folder_data[0]; - $stack_size++; -} while ($folder_id); - - $path = ""; - for ($i = $stack_size - 1; $i >= 0; $i--) { - $path = $path . "/$stack[$i]"; -} - - return $path; -} - -?> diff --git a/src/client.del.2.php b/src/client.del.2.php index 99ed151..c644828 100644 --- a/src/client.del.2.php +++ b/src/client.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,33 +17,32 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $client_id = pg_escape_string($_REQUEST['client']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_USER) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from client where identifier=$client_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } $result = pg_query($database, "delete from client where identifier='$client_id'"); +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } + site_epilog($database); -header("location: my.datebook.php"); +header("Location: my.datebook.php"); ?> diff --git a/src/client.del.php b/src/client.del.php index b68f15f..217b96c 100644 --- a/src/client.del.php +++ b/src/client.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,89 +17,57 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $client_id = pg_escape_string($_REQUEST['client']); $result = pg_fetch_row(pg_query($database, "select identifier, client, last_name, first_name, date_of_creation, value, users from view_client where users=$po_user[id] and identifier=$client_id")); /* Ensure the user owns it !*/ -if (($po_user['id'] != $result[7]) && - ($po_user['type'] < $user_type['administrator'])) { +if (($po_user['id'] != $result[6]) && + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -$number_of_references = pg_fetch_row(pg_query($database, "select count(submission.identifier) - from client, photo_dupe, photo - where photo_dupe.photo = photo.identifier - and photo_dupe.identifier = submission.photo_dupe - and photo.users = $po_user[id] - and submission.users = $result[1]")); - - - -site_header($page_width, "Delete Client"); +site_header($strings['user']['del_client']); site_navigator(8); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Date Book : Remove client", ""); - break; - case 1: - site_navigator_status("Users : My Date Book : There is 1 reference to this client. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Date Book : There are $number_of_references[0] references to this client. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['user']['del_client'], ""); -print " 
    \n"; print "
    "; -print "\n"; -print ""; -print ""; -print "
    "; print ""; -print "\n"; -print "\n"; -print "\n"; +print "
    Delete Client
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['client_name'], "width=\"50%\""); +print emit_th($strings['generic']['reg_date'], "width=\"20%\""); +print emit_th($strings['generic']['status'], "width=\"20%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; print "
    ".$strings['user']['del_client']."
    Client NameRegistration DateStatus
    "; +print ""; print "$result[2], $result[3]".generate_date_html($result[4], 'date', 1)."$result[5]".emit_date_html($result[4], 'date')."".$strings['generic'][$client_status[$result[5]]]."
    \n"; -print "
     
    "; -if ($number_of_references[0] == 0) { - print "\n"; - print "\"Cancel\"/"; -} -else { - print "\"Back\"/\n"; -} -print "
    \n"; +print "
    "; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; +print "
    "; + print "
    "; site_footer($database); site_epilog($database); diff --git a/src/client.edit.2.php b/src/client.edit.2.php index aae8031..caf17e9 100644 --- a/src/client.edit.2.php +++ b/src/client.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/mail.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $client_id = pg_escape_string($_REQUEST['client']); $status = pg_escape_string($_REQUEST['status']); $trusted = pg_escape_string($_REQUEST['trusted']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from client where identifier=$client_id and users=$po_user[id]")); if ($result[0] == 0) { + site_push_error($strings['errors']['not_owner']); site_epilog($database); - header("location: login.php"); + header("Location: login.php"); exit(); } } @@ -48,10 +43,14 @@ if ($po_user['type'] < $user_type['administrator']) { $error = 0; $result = pg_query($database, "update client set status='$status', trusted='$trusted' where identifier='$client_id'"); -$my_client_id = pg_fetch_row(pg_query($database, "select client from client where identifier='$client_id'")); - -send_client_account_change_notification($database, $po_user['id'], $my_client_id[0]); +if ($result) { + $my_client_id = pg_fetch_row(pg_query($database, "select client from client where identifier='$client_id'")); + + send_client_account_change_notification($database, $po_user['id'], $my_client_id[0]); + } else { + site_push_error($strings['errors']['db_insert_failed']); + } site_epilog($database); -header("location: my.datebook.php"); +header("Location: my.datebook.php"); ?> diff --git a/src/client.edit.php b/src/client.edit.php index a1d5037..176905c 100644 --- a/src/client.edit.php +++ b/src/client.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $client_id = pg_escape_string($_REQUEST['client']); @@ -37,63 +31,55 @@ $result = pg_fetch_row(pg_query($database, " select identifier, client, last_nam /* Ensure the user owns it !*/ if (($po_user['id'] != $result[7]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } $all_client_states = pg_query($database, " select identifier, value from client_status where identifier!=4"); -site_header($page_width, "Edit Client"); +site_header($strings['user']['edit_client']); site_navigator(8); -site_navigator_status("Users : My Date Book : Edit client status", ""); -print " 
    \n"; +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['user']['edit_client'], ""); print "
    "; -print "\n"; -print ""; -print ""; -print "
    "; print ""; -print "\n"; -print "\n"; -print "\n"; +print "
    Edit Client Status
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['client_name'], "width=\"50%\""); +print emit_th($strings['generic']['reg_date'], "width=\"20%\""); +print emit_th($strings['generic']['status'], "width=\"20%\""); +print emit_th($strings['generic']['trusted'], "width=\"10%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print ""; -print "\n"; print "
    ".$strings['user']['edit_client']."
    Client NameRegistration DateStatusTrusted
    "; +print ""; print "$result[2], $result[3]".generate_date_html($result[4], 'date', $po_user['id'] == "" ? 0 : 1).""; +print "".emit_date_html($result[4], 'date').""; print ""; +print ""; display_yes_no_combo("trusted", $result[6]); print "
    \n"; -print "
     
    "; -print ""; -print "\"Cancel\"/"; -print "
    \n"; +print "
    "; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    "; print "
    "; site_footer($database); site_epilog($database); diff --git a/src/content.indexer.php b/src/content.indexer.php index bee5d25..034694c 100644 --- a/src/content.indexer.php +++ b/src/content.indexer.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,27 +17,26 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/tools.php"; include_once "include/mime.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['id'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - $select_folder = pg_escape_string($_REQUEST['select_folder']); -if (!$select_folder) { - /* return if no search criteria exists */ - header("location: my.tools.php?selector=2&rule=$rule_identifier"); -} +$select_album = pg_escape_string($_REQUEST['select_album']); + +$selection = $_REQUEST['selection']; + +$database = site_prolog(PO_USER_TYPE_USER); + +if (!$selection) { + site_push_error($strings['errors']['invalid_operation']); + site_epilog($database); + header("Location: my.tools.php?selector=".$tools_data['content_indexer']['idx']); + } $type = $_REQUEST['type']; switch ($type) { @@ -48,23 +47,35 @@ switch ($type) { $index_algorithm = "ar_index_histogram:0.1.0"; } -site_header($page_width, "Display Tools"); +site_header($strings['generic']['content_indexer']); site_navigator(10); -site_navigator_status("Users : My Tools", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['content_indexer'], ""); -print " 
    "; display_navigator_box_top($tools_data['content_indexer']['idx'], $tools_data, "100%"); -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $user_sel = " and users = $po_user[id]"; } else { $user_sel = ""; } -if ($select_folder == "all") { - $sql_selector = " users = $po_user[id] "; -} else { - $sql_selector = " folder = $select_folder $user_sel"; +switch ($selection) { + case 'folder': + if ($select_folder == "all") + $sql_selector = " users = $po_user[id] "; + else + $sql_selector = " folder = $select_folder $user_sel"; + break; + case 'album': + $sql_selector = " identifier in( select photo from album_content where album = $select_album) $user_sel"; + break; + case 'spool': + $sql_selector = " identifier in( select photo from album_content where album = $po_user[spool_album]) $user_sel"; + break; + default: + header("Location: my.tools.php?selector=5"); + exit(); + break; } $all_photos = pg_query($database, " @@ -75,18 +86,17 @@ $all_photos = pg_query($database, " $num_of_updates = pg_num_rows($all_photos); for ($i=0; $i < $num_of_updates; $i++) { $photo = pg_fetch_row($all_photos, $i); - submit_photo($database, $photo[0], $po_user['session'], $index_algorithm); + submit_photo($database, $photo[0], $index_algorithm); } -print "

    Indexed $num_of_updates photos.

    "; +print "

    ".$strings['tools']['num_photos_indexed']." : $num_of_updates

    "; print "

    "; -print ""; +print $thm_elem['button.back']; print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/copyright.php b/src/copyright.php index 13088a9..28e9c7b 100644 --- a/src/copyright.php +++ b/src/copyright.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,401 +17,97 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $database = site_prolog(); -site_header($page_width, "Copyright & License"); +site_header($strings['generic']['copyright_license']); site_navigator(4); -site_navigator_status("Help : License", ""); +site_navigator_status("Help : ".$strings['generic']['copyright_license'], ""); -print ""; -print ""; -print "

    "; ?> -

    +

    + + + +

    +
    -GNU GENERAL PUBLIC LICENSE -Version 2, June 1991 +
    -

    +

    Photo Organizer is copyright © 2002-2006 Balint Kis (balint@k-i-s.net), 2005-2007 Solomon Peachy (pizza@shaftnet.org)

    +

    This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 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. -

    +

    Full GPLv3 License Text

    +

    -Copyright (C) 1989, 1991 Free Software Foundation, Inc.
    -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    -Everyone is permitted to copy and distribute verbatim copies
    -of this license document, but changing it is not allowed. +
    +

    wz_tooltips is Copyright © Walter Zorn. +

    This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License (LGPL) as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version.

    -

    -  +This library 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 Library General Public License for more details.

    +

    Full LGPLv2.1 License Text

    +
    +
    +
    +

    The DHTML/Javascript Calendar is Copyright © Dynarch.com. +

    This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License (LGPL) as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version.

    -

    -

    PREAMBLE
    -

    +This library 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 Library General Public License for more details.

    +

    Full LGPLv2.1 License Text

    +
    +
    +
    +

    IE7 is Copyright © Dean Edwards. +

    This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published by + the Free Software Foundation, version 2.1.

    +

    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 Library General Public License for more details.

    +

    Full LGPLv2.1 License Text

    +
    +
    +
    +

    checkbox.js is Copyright © the folks at Brainerror.net.

    -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. +Scripts shown here [http://www.brainerror.net] can be copied, used and altered as you please. However, I don't like other people taking credit for my work. It really pisses me off. I'm a real bad ass person, once I feel pissed off. So here are the rules:

    - - -

    -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 -licenser 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
    -

    - -

    -  -

    - +

    1. Don't distribute the scripts publicly, I am already doing that for you.

    +

    2. Don't claim that they're your own, because they're not (unless you altered them a lot). That means when you get money for it, I have done work for you and you have to give all your money to me.

    +

    Please note that the version in use has been heavily modified and +only bears a superficial resemblance to the original

    "; site_footer($database); site_epilog($database); ?> diff --git a/src/event.add.2.php b/src/event.add.2.php index 497757e..db5b296 100644 --- a/src/event.add.2.php +++ b/src/event.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,18 +17,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $year = (int)$_REQUEST['year']; $month = (int)$_REQUEST['month']; @@ -39,6 +33,9 @@ $start_minute = (int)$_REQUEST['start_minute']; $end_hour = (int)$_REQUEST['end_hour']; $end_minute = (int)$_REQUEST['end_minute']; +$client = pg_escape_string($_REQUEST['client']); +if ($client != "null") $client = "'$client'"; + if ($start_hour > $end_hour) { $end_hour = $start_hour; } @@ -52,9 +49,13 @@ $remark = pg_escape_string($_REQUEST['remark']); $start_date = pg_escape_string("$year-$month-$day $start_hour:$start_minute:00"); $end_date = pg_escape_string("$year-$month-$day $end_hour:$end_minute:00"); -pg_query($database, "insert into calendar (identifier, users, start_date, end_date, date_of_creation, remark) - values (nextval('calendar_id_sequence'), '$po_user[id]', '$start_date', '$end_date', now(), '$remark')"); +$result = pg_query($database, "insert into calendar (identifier, users, start_date, end_date, date_of_creation, remark, client) + values (nextval('calendar_id_sequence'), '$po_user[id]', '$start_date', '$end_date', now(), '$remark', $client)"); + +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } site_epilog($database); -header("location: my.datebook.php?view=1year=$year&month=$month&day=$day"); +header("Location: my.datebook.php?view=1&year=$year&month=$month&day=$day"); ?> diff --git a/src/event.add.php b/src/event.add.php index 1b3179d..5f2bf39 100644 --- a/src/event.add.php +++ b/src/event.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $year = (int)$_REQUEST['year']; $month = (int)$_REQUEST['month']; @@ -42,35 +36,33 @@ if ($day < 1 || $day > $daysInMonth[$month]) { } $timestamp = mktime(12, 0, 0, $month, $day, $year); -$date = getdate($timestamp); -$dayNameIndex = $date["wday"]; +$date = strftime($strings['formats']['date'], $timestamp); -site_header($page_width, "Add Event"); +site_header($strings['datebook']['create_event']); site_navigator(8); -site_navigator_status("Users : My Date Book : Create new event", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['datebook']['create_event'], ""); -print " 
    \n"; +print "
    "; print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "
    Date $dayNames[$dayNameIndex], $monthNames[$month] $day, $year
    Start "; display_hour_combo("start_hour", "", "display_null"); print ": "; display_minute_combo("start_minute", ""); print "
    End "; display_hour_combo("end_hour", "", "display_null"); print ": "; display_minute_combo("end_minute", ""); print "
    Remark
    \n"; +print "\n"; +print "\n"; +print "\n"; +print ""; +print "\n"; print "
    ".$strings['datebook']['date']."$date
    ".$strings['datebook']['start'].""; display_hour_combo("start_hour", "", TRUE); print ": "; display_minute_combo("start_minute", ""); print "
    ".$strings['datebook']['end'].""; display_hour_combo("end_hour", "", TRUE); print ": "; display_minute_combo("end_minute", ""); print "
    ".$strings['datebook']['client']."" . generate_html_clients_combo("client", $database, $po_user['id'], $event_data[4]) . "
    ".$strings['generic']['remark']."
    \n"; -print " 
    \n"; -print "
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; +print "
    \n"; +print "
    \n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; print "
    \n"; - -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/event.del.2.php b/src/event.del.2.php index cbb37fe..a03202f 100644 --- a/src/event.del.2.php +++ b/src/event.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $event = pg_escape_string($_REQUEST['event']); @@ -37,7 +31,8 @@ $current = pg_fetch_row(pg_query($database, "select users from calendar where id if ($po_user['id'] != $current[0]) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -45,8 +40,27 @@ $year = (int)$_REQUEST['year']; $month = (int)$_REQUEST['month']; $day = (int)$_REQUEST['day']; -pg_query($database, "delete from calendar where identifier=$event"); +$result = pg_query($database, "begin"); + +if (!$result) { + $result = pg_query($database, "update folder set event = null where event = $event"); + } +if (!$result) { + $result = pg_query($database, "update album set event = null where event = $event"); + } +if (!$result) { + $result = pg_query($database, "delete from calendar where identifier=$event"); + } + +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + } else { + pg_query($database, "commit"); + } + + site_epilog($database); -header("location: my.datebook.php?view=1&year=$year&month=$month&day=$day"); +header("Location: my.datebook.php?view=1&year=$year&month=$month&day=$day"); ?> diff --git a/src/event.del.php b/src/event.del.php index d9ffcdf..16d4f75 100644 --- a/src/event.del.php +++ b/src/event.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $event = pg_escape_string($_REQUEST['event']); @@ -40,7 +34,8 @@ $day = (int)substr($event_data[0], 8, 2); if ($po_user['id'] != $event_data[3]) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -49,34 +44,30 @@ $event_data[2] = str_replace("$CR$CR", "

    ", "$event_data[2]"); $event_data[2] = str_replace("$CR", "
    ", "$event_data[2]"); $timestamp = mktime(12, 0, 0, $month, $day, $year); -$date = getdate($timestamp); -$dayNameIndex = $date["wday"]; -site_header($page_width, "Delete Event"); +site_header($strings['datebook']['del_event']); site_navigator(8); -site_navigator_status("Users : My Date Book : Delete event on $dayNames[$dayNameIndex], $monthNames[$month] $day, $year", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : " . $strings['datebook']['del_event'], ""); -print " 
    \n"; -print "

    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    \n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "
    Date $dayNames[$dayNameIndex], $monthNames[$month] $day, $year
    Time ".generate_date_html($event_data[0], "time", 0)."-".generate_date_html($event_data[1], "time", 0)."
    Remark $event_data[2]
    \n"; +print "\n"; +print "\n"; +print "\n"; print "
    ".$strings['datebook']['date']."".emit_date_html($event_data[0], "date")."
    ".$strings['datebook']['time'] ."".emit_date_html($event_data[0], "time")." - ".emit_date_html($event_data[1], "time")."
    ".$strings['generic']['remark']."$event_data[2]
    \n"; -print " 
    \n"; -print "
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; +print "
    \n"; +print "
    \n"; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; +print "
    \n"; print "
    \n"; -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/event.edit.2.php b/src/event.edit.2.php index 0b47772..e1733eb 100644 --- a/src/event.edit.2.php +++ b/src/event.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,25 +17,21 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; -$database = site_prolog(); +; $event = pg_escape_string($_REQUEST['event']); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $current = pg_fetch_row(pg_query($database, "select users from calendar where identifier = $event")); if ($po_user['id'] != $current[0]) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -48,6 +44,9 @@ $start_minute = (int)$_REQUEST['start_minute']; $end_hour = (int)$_REQUEST['end_hour']; $end_minute = (int)$_REQUEST['end_minute']; +$client = pg_escape_string($_REQUEST['client']); +if ($client != "null") $client = "'$client'"; + if ($start_hour > $end_hour) { $end_hour = $start_hour; } @@ -61,8 +60,12 @@ $remark = pg_escape_string($_REQUEST['remark']); $start_date = pg_escape_string("$year-$month-$day $start_hour:$start_minute:00"); $end_date = pg_escape_string("$year-$month-$day $end_hour:$end_minute:00"); -pg_query($database, "update calendar set start_date='$start_date', end_date='$end_date', remark='$remark' where identifier=$event"); +$result = pg_query($database, "update calendar set start_date='$start_date', end_date='$end_date', remark='$remark', client = $client where identifier=$event"); + +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } site_epilog($database); -header("location: my.datebook.php?view=1&year=$year&month=$month&day=$day"); +header("Location: my.datebook.php?view=1&year=$year&month=$month&day=$day"); ?> diff --git a/src/event.edit.php b/src/event.edit.php index 0717ec8..0588897 100644 --- a/src/event.edit.php +++ b/src/event.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,24 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $event = pg_escape_string($_REQUEST['event']); -$event_data = pg_fetch_row(pg_query($database, "select start_date, end_date, remark, users from calendar where identifier=$event")); +$event_data = pg_fetch_row(pg_query($database, "select start_date, end_date, remark, users, client from calendar where identifier=$event")); $year = (int)substr($event_data[0], 0, 4); $month = (int)substr($event_data[0], 5, 2); $day = (int)substr($event_data[0], 8, 2); if ($po_user['id'] != $event_data[3]) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -54,32 +48,32 @@ $timestamp = mktime(12, 0, 0, $month, $day, $year); $date = getdate($timestamp); $dayNameIndex = $date["wday"]; -site_header($page_width, "Edit Event"); +site_header($strings['datebook']['edit_event']); site_navigator(8); -site_navigator_status("Users : My Date Book : Edit event", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['datebook']['edit_event'], ""); -print " 
    \n"; +print "
    "; print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "
    Date $dayNames[$dayNameIndex], $monthNames[$month] $day, $year
    Start "; display_hour_combo("start_hour", $start_hour, "display_null"); print ": "; display_minute_combo("start_minute", $start_minute); print "
    End "; display_hour_combo("end_hour", $end_hour, "display_null"); print ": "; display_minute_combo("end_minute", $end_minute); print "
    Remark
    \n"; +print "\n"; +print "\n"; +print "\n"; +print ""; +print "\n"; print "
    ".$strings['datebook']['date']."".emit_date_html($event_data[0], "date")."
    ".$strings['datebook']['start'].""; display_hour_combo("start_hour", $start_hour, TRUE); print ": "; display_minute_combo("start_minute", $start_minute); print "
    ".$strings['datebook']['end'].""; display_hour_combo("end_hour", $end_hour, TRUE); print ": "; display_minute_combo("end_minute", $end_minute); print "
    ".$strings['datebook']['client']."" . generate_html_clients_combo("client", $database, $po_user['id'], $event_data[4]) . "
    ".$strings['generic']['remark']."
    \n"; -print " 
    \n"; -print "
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; +print "
    "; +print "
    "; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; print "
    \n"; -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/event.php b/src/event.php index c02ea05..8737f67 100644 --- a/src/event.php +++ b/src/event.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $event = pg_escape_string($_REQUEST['event']); $event_data = pg_fetch_row(pg_query($database, "select start_date, end_date, remark from calendar where users='$po_user[id]' and identifier='$event'")); @@ -38,8 +32,6 @@ $month = (int)substr($event_data[0], 5, 2); $day = (int)substr($event_data[0], 8, 2); $timestamp = mktime(12, 0, 0, $month, $day, $year); -$date = getdate($timestamp); -$dayNameIndex = $date["wday"]; $calendar_view = $_REQUEST['view']; $CR = chr(13); @@ -47,25 +39,28 @@ $CR = chr(13); $event_data[2] = str_replace("$CR$CR", "

    ", "$event_data[2]"); $event_data[2] = str_replace("$CR", "
    ", "$event_data[2]"); -site_header($page_width, "Display Event"); +site_header($strings['datebook']['event']); site_navigator(8); -site_navigator_status("Users : My Date Book : Event details", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['datebook']['event'] , ""); -print " 
    "; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    "; +print "
    Date $dayNames[$dayNameIndex], $monthNames[$month] $day, $year
    Time ".generate_date_html($event_data[0], "time", 0)."-".generate_date_html($event_data[1], "time", 0)."
    Remark $event_data[2]
    \n"; +print "\n"; +print "\n"; +print "\n"; print "
    ".$strings['datebook']['date']."".emit_date_html($event_data[0], "date")."
    ".$strings['datebook']['time'] ."".emit_date_html($event_data[0], "time")." - ".emit_date_html($event_data[1], "time")."
    ".$strings['generic']['remark']." $event_data[2]
    \n"; -print " 
    "; -print "
    \n"; -print "\"Back\"/\n"; -print "\"Edit\"/\n"; -print "\"Delete\"/\n"; -print "
    \n"; +display_folders($database, "", $po_user['id'], "with_header", $event); + +display_albums($database, "", $po_user['id'], $po_user['type'], "with_header", $event); + +print "
    "; +print "

    "; +print $thm_elem['button.back']; +print sprintf($thm_elem['button.edit'], "event.edit.php?event=$event"); +print sprintf($thm_elem['button.delete'], "event.del.php?event=$event"); +print "
    "; -print " 
    "; site_footer($database); site_epilog($database); ?> diff --git a/src/export.2.php b/src/export.2.php index 06f7ca7..2db30c1 100644 --- a/src/export.2.php +++ b/src/export.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,18 +17,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $export_id = $_REQUEST['export_id']; @@ -44,7 +38,7 @@ $stats = stat($file_name); header("Content-Length: $stats[7]"); header("Content-Type: application/tar"); -header("Content-Disposition: filename=po.export." . $export_id . ".tar"); +header("Content-Disposition: filename=po.export." . date(DATE_W3C, $stats[9]) . ".tar"); /* read 1M chunks */ while (!feof($file)) { diff --git a/src/export.php b/src/export.php index 4f1d8b4..244fb4f 100644 --- a/src/export.php +++ b/src/export.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,57 +17,31 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/mime.php"; include_once "include/common.php"; +include_once "include/site.php"; include_once "include/export.php"; include_once "include/orderby.php"; -include_once "include/site.php"; -$database = site_prolog(); +$compress_pages = false; /* Explicitly disable it here */ -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); -$source_photo_id = pg_escape_string($_REQUEST['source_photo']); -$source_folder_id = pg_escape_string($_REQUEST['source_folder']); -$source_album_id = pg_escape_string($_REQUEST['source_album']); $export_type = $_REQUEST['export_type']; -if ($source_photo_id != "") { - $photo_data_single = pg_fetch_row(pg_query($database, "select identifier, folder, caption, title from photo where identifier='$source_photo_id'")); - $photo_data_single[2] = makeZanza($photo_data_single[3] ? $photo_data_single[3] : $photo_data_single[2], "No Title"); - $container_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier=$photo_data_single[1]")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : $photo_data_single[2] : Exporting Photos"; -} elseif ($source_album_id != "") { - $container_name = pg_fetch_row(pg_query($database, "select caption from album where identifier='$source_album_id'")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : Exporting Photos"; -} elseif ($source_folder_id != "") { - $container_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$source_folder_id'")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : Exporting Photos"; -} - $photos_in_spooler = pg_query($database, " - select photo.identifier - from photo_spooler, photo - where photo.identifier = photo_spooler.photo - and photo_spooler.users = $po_user[id]"); + select photo as identifier from album_content where album = $po_user[spool_album] group by photo order by photo"); -site_header($page_width, "Export Photos"); +$num_photos = pg_num_rows($photos_in_spooler); + +site_header($strings['generic']['export']); site_navigator(5); -site_navigator_status($navigator_status_message, ""); +site_navigator_status("", $strings['spool']['photos_in'] .": $num_photos"); print "
    "; -print " 
    \n"; -print "Exporting ".pg_num_rows($photos_in_spooler)." photos
    \n"; +print "

    ".sprintf($strings['export']['exporting'], "$num_photos")."

    \n"; $temporary_directory = tempnam($tmp_volume_path, "po.export."); unlink($temporary_directory); @@ -76,13 +50,12 @@ $tar_file_name = $temporary_directory . ".tar"; $export_id = basename($temporary_directory); $export_id = substr($export_id, strlen("po.export.")); -print "Creating temporary directory $temporary_directory ... "; +print sprintf($strings['import']['creating_temp_dir']); $old_mask = umask(0000); if (!mkdir($temporary_directory)) { - print "failed [mkdir $temporary_directory]
    "; -} else { - print "done.
    "; -} + print err_str(" - $temporary_directory - ". $strings['generic']['failed']); +} +print "
    "; switch($export_type) { case "photo": @@ -91,12 +64,11 @@ switch($export_type) { default: break; case "photo_xml": - print "Creating XML photo description file $temporary_directory/data.xml ... "; + print $strings['export']['create_xml']; if (($xml_file_desciptor = fopen ($temporary_directory."/data.xml", "w+")) == FALSE) { - print "failed [fopen $temporary_directory/data.xml]
    "; - } else { - print "done.
    "; + print err_str($strings['generic']['failed']); } + print "
    "; fwrite($xml_file_desciptor, create_xml_header()); fwrite($xml_file_desciptor, create_xml_bulkupload_header()); @@ -106,8 +78,8 @@ switch($export_type) { /* creates the tar archive */ $operation = "c"; -for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { - $photo_identifier = pg_fetch_row($photos_in_spooler, $photos); +for ($photos = 0; $photos < $num_photos; $photos++) { + $photo_identifier = pg_fetch_assoc($photos_in_spooler, $photos); /* optimize query, by excluding fields that are not used when not exporting shooting data */ switch($export_type) { @@ -120,14 +92,25 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { access_rights, hide_original, camera, lens, filter, film, flash, scanner, focal_length, aperture, shutter, exposure_comp, ev_difference, camera_metering, camera_program, flash_mode, flash_comp, - scan_resolution, scan_bitdepth, scan_multiscan, iso_override, support + scan_resolution, scan_bitdepth, scan_multiscan, iso_override, support, + latitude, longitude, altitude, img_direction, users, can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}'), + store_url, photo.comments from photo, photo_version, photo_tech, photo_dupe where photo.identifier = photo_version.photo and photo.identifier = photo_dupe.photo and photo.identifier = photo_tech.photo - and photo.identifier = $photo_identifier[0] + and photo.identifier = $photo_identifier[identifier] and photo_dupe.key = 1")); + + /* If we can't access the original or access the image... */ + if (($photo_data[36] != $po_user['id']) && + !($po_user['type'] == PO_USER_TYPE_ADMIN)) { + if (($photo_data[37] != 't') || ($photo_data[11] != 't')) { + continue 2; + } + } + /* Get any keywords for the photo... */ $res = pg_query($database, "select keyword from photo_keywords where photo=$photo_identifier[identifier]"); $keywords = FALSE; @@ -139,21 +122,27 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { break; case "photo": default: - $photo_data = pg_fetch_row(pg_query($database, " - select photo_version.large_image_path, photo_version.original_image_name - from photo, photo_version - where photo.identifier = photo_version.photo - and photo.identifier = $photo_identifier[0]")); + $photo_data = pg_fetch_row(pg_query($database, "select users, hide_original, title, can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') from photo where identifier = $photo_identifier[identifier]")); + /* Make sure we can access it! */ + if (($photo_data[0] != $po_user['id']) && + !($po_user['type'] == PO_USER_TYPE_ADMIN)) { + if (($photo_data[3] != 't') || ($photo_data[1] != 't')) { + continue 2; + } + } break; } $photo_version_data = pg_query($database, " - select large_image_path, original_image_name, comment, master + select get_image_path(identifier, 3) as original_path, original_image_name, comment, master from photo_version - where photo_version.photo = $photo_identifier[0]"); + where photo_version.photo = $photo_identifier[identifier]"); - print " 
    \n"; - print "Exporting $title.

    "; + $title = $photo_data[2]; + if ($title == "") + $title = $strings['photo']['no_title'] ." - $photo_identifier[identifier]"; + + print $strings['export']['image'] . ($photos + 1) . "/$num_photos - $title."; print "
      \n"; for ($versions = 0; $versions < pg_num_rows($photo_version_data); $versions++) { @@ -162,24 +151,52 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { $file_name = $image_repository_path."/".$photo_version_single[0]; $original_name = $temporary_directory."/".$photo_version_single[1]; - $title = $photo_data[2]; - if ($title == "") - $title = "No Title $photo_identifier[0]"; /* check for the source file's existence */ if (!is_file($file_name)) { - print "
    • Photo $title skipped. "; - print "File ".$file_name." does not exist.
    • \n"; + print "
    • ". err_str($strings['errors']['file_not_found']) ." : ". sprintf($strings['export']['skipped'], "$title") . "
    • "; print "
    \n"; continue; } /* copy original image into the temporary directory with it's original name */ + print "
  • " . sprintf($strings['export']['copying'], $photo_version_single[1]); if (!copy($file_name, $original_name)) { - print "
  • Copying $file_name failed [cp $file_name $original_name]
  • "; + print err_str($strings['generic']['failed']); + print ""; + continue; + } else { + print ""; } - else { - print "
  • Copying $file_name into $original_name
  • "; + + print "
  • ".sprintf($strings['export']['archive'], $photo_version_single[1]); + $original_name = $temporary_directory."/".$photo_version_single[1]; + + /* append image file to the tarball */ + $command = $sys_tar." -".$operation."vf ".$tar_file_name." -C \"$temporary_directory\" \"$photo_version_single[1]\""; + /* we use "exec" instead of "system" to avoid unwanted output */ + exec($command, $who_cares, $retval_tar); + if ($retval_tar) { + print err_str($strings['generic']['failed']); + print "
  • "; + $err = error_reporting(0); + unlink($original_name); + error_reporting($err); + return false; + } else { + print ""; } + + /* remove temporary copy of the original image */ + print "
  • "; + if (!unlink($original_name)) { + print err_str($strings['errors']['failed_temp_file_removal']." $original_name"); + } else { + print sprintf($strings['export']['removing'], $photo_version_single[1]); + } + print "
  • "; + + /* from now on, append to the tar archive */ + $operation = "r"; } /* export shooting data */ @@ -221,7 +238,13 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { "scan_bitdepth" => $photo_data[28], "scan_multiscan" => $photo_data[29], "iso_override" => $photo_data[30], - "support" => $photo_data[31]); + "support" => $photo_data[31], + "latitude" => $photo_data[32], + "longitude" => $photo_data[33], + "altitude" => $photo_data[34], + "direction" => $photo_data[35], + "store_url" => $photo_data[38], + "remark" => $photo_data[39]); for ($versions = 0; $versions < pg_num_rows($photo_version_data); $versions++) { $photo_version_single = pg_fetch_row($photo_version_data, $versions); @@ -233,104 +256,62 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { fwrite($xml_file_desciptor, create_xml_folder_header($image_data['folder'])); fwrite($xml_file_desciptor, create_xml_photo($image_data)); fwrite($xml_file_desciptor, create_xml_folder_footer()); - print "
  • Appending XML data to $temporary_directory/data.xml.
  • "; + print "
  • ".$strings['export']['append_xml']."
  • "; break; case "photo_xml_iptc": case "photo_iptc": - print " 
    \n"; - print "IPTC embedding is not yet implemented.

    "; - } - - for ($versions = 0; $versions < pg_num_rows($photo_version_data); $versions++) { - $photo_version_single = pg_fetch_row($photo_version_data, $versions); - - $original_name = $temporary_directory."/".$photo_version_single[1]; - - /* append image file to the tarball */ - $command = $sys_tar." ".$operation."vf ".$tar_file_name." -C ".$temporary_directory." \"".$photo_version_single[1]."\""; - /* we use "exec" instead of "system" to avoid unwanted output */ - exec($command, $who_cares, $retval_tar); - if ($retval_tar) { - print "
  • Export failed - $command returned $retval_tar
  • \n"; - error_reporting(0); - unlink($original_name); - error_reporting(1); - return false; - } - else { - print "
  • File $original_name added to the $tar_file_name archive.
  • \n"; - } - - /* remove temporary copy of the original image */ - if (!unlink($original_name)) { - print "
  • Removing $original_name failed [unlink $original_name]
  • "; - } - else { - print "
  • Removing $original_name
  • "; - } - - /* from now on, append to the tar archive */ - $operation = "r"; + print "
  • ".err_str($strings['errors']['iptc_not_implemented'])."
  • "; } print "\n"; flush(); -} + + } switch($export_type) { - case photo: - case "photo_xml_iptc": - case "photo_iptc": + case 'photo': + case 'photo_xml_iptc': + case 'photo_iptc': default: break; - case "photo_xml": - print "Closing XML description file
    "; + case 'photo_xml': + print $strings['export']['close_xml']."
    "; fwrite($xml_file_desciptor, create_xml_bulkupload_footer()); fclose($xml_file_desciptor); $command = $sys_tar." ".$operation."vf ".$tar_file_name." -C ".$temporary_directory." data.xml"; /* we use "exec" instead of "system" to avoid unwanted output */ exec($command, $who_cares, $retval_tar); + print "
  • ".$strings['export']['add_xml'];; if ($retval_tar) { - print "Export failed - $command returned $retval_tar
    \n"; - error_reporting(0); + print err_str($strings['generic']['failed']); + $err = error_reporting(0); unlink($original_name); - error_reporting(1); - return false; - } - else { - print "XML description file $temporary_directory/data.xml added to the $tar_file_name archive.
    \n"; + error_reporting($err); } + print "
  • "; /* after adding the data.xml file to the tarball, remove it */ - if (!unlink($temporary_directory."/data.xml")) { - print "Removing $temporary_directory/data.xml failed [unlink $temporary_directory/data.xml]
    "; - } - else { - print "Removing $temporary_directory/data.xml
    "; - } - + print $strings['export']['remove_xml']; + unlink($temporary_directory."/data.xml"); + print "\n"; flush(); break; } -print "
    Removing temporary directory $temporary_directory ... "; +print "
    ".sprintf($strings['import']['removing_temp_dir']); if (!rmdir($temporary_directory)) { - print "failed [rmdir $temporary_directory]
    "; -} -else { - print "done.
    "; + print err_str(" - $temporary_directory - " . $strings['generic']['failed']); } +print "
    "; umask($old_mask); -print "Export finished.

    "; +print "

    ".$strings['export']['finished']."

    "; + +print sprintf($strings['export']['download'], "".$strings['generic']['here'].""); -print " 
    \n"; -print "Click here to retrieve your exported photos.\n"; -print " 
    \n"; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); ?> diff --git a/src/film.add.2.php b/src/film.add.2.php index f7f3161..e6687dc 100644 --- a/src/film.add.2.php +++ b/src/film.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,43 +17,37 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; function add_film($database, $user_id, $film_type_id, $film_manufacturer_id, $film_model, $film_iso, $film_format_id, $film_access_rights) { - $film_model = pg_escape_string($film_model); + $result = TRUE; + + pg_query($database, "begin"); if ($film_type_id=='custom') { $new_film_type_id = pg_fetch_row(pg_query($database, "select nextval('film_type_id_sequence')")); $film_type_id = $new_film_type_id[0]; $result = pg_query($database, "insert into film_type (identifier, manufacturer, model, iso, format, last_modified_date, last_modifying_users) values ('$film_type_id', '$film_manufacturer_id', '$film_model', '$film_iso', '$film_format_id', now(), $user_id)"); - if (!$result) { - print "Failed to create new film type"; - return; - } } $result = pg_query($database, "insert into film (identifier, type, users, access_rights) values (nextval('film_id_sequence'), '$film_type_id', '$user_id', '$film_access_rights')"); - if (!$result) { - print "Failed to create new film"; - return; + + if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); } } -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); - } +$database = site_prolog(PO_USER_TYPE_USER); add_film($database, $po_user['id'], @@ -65,5 +59,5 @@ add_film($database, pg_escape_string($_REQUEST['film_access_rights'])); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['film']['idx']); +header("Location: my.profile.php?selector=".$profile_data['film']['idx']); ?> diff --git a/src/film.add.php b/src/film.add.php index e7867cf..d647047 100644 --- a/src/film.add.php +++ b/src/film.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,23 +17,18 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); +$type = 'film'; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); -$all_manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); +$manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); switch ($manufacturer_filter) { case 'All': @@ -44,143 +39,107 @@ switch ($manufacturer_filter) { $all_film_types = pg_query($database, "select identifier, name, model, iso, format, url from view_film_type where view_film_type.name='$manufacturer_filter' order by name"); } -site_header($page_width, "Add Film"); +site_header(sprintf($strings['profile']['add'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Add new film", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['film']['idx'], $profile_data, "100%"); -print " 
    "; -if (pg_num_rows($all_manufacturer) == 0) { - print "\n"; - print "\n"; - print "
    \n"; - print "You must add manufacturers, before adding films"; - print "
     

    \n"; - print "\"Add\n"; - print "

    \n"; +if (pg_num_rows($manufacturer) == 0) { + print emit_manuf_add_needed($type); display_navigator_box_bottom("100%"); - print " 
    "; site_footer($database); site_epilog($database); exit; } -print "\n"; -print "\n"; -print "\n"; -print "\n"; +emit_profile_manuf_combo("film.add.php?type=$film", $type, 4, $manufacturer, $manufacturer_filter); print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['iso']); +print emit_th($strings['profile']['format']); print "\n"; -print "\n"; $num_of_film_types = pg_num_rows($all_film_types); if ($num_of_film_types > 0) { for ($i=0; $i < $num_of_film_types; $i++) { $film_type = pg_fetch_row($all_film_types, $i); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; } -} -else -print "\n"; + } else { + print "\n"; + } print "
    \n"; +print "
    \n"; +print "\n"; -print "
    \n\n"; -print "\n"; -print "\n
    Film Types\n"; -print "\n"; -print ""; -print "\n"; -print "
    \n"; - -print "
    ManufacturerModelISOFormat
    $film_type[1]$film_type[2]$film_type[3]$film_type[4]$film_type[1]$film_type[2]$film_type[3]$film_type[4]
    No film types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; +print "
    New Film Type
    \n"; +print "\n"; +print emit_td($strings['generic']['add']." ".$strings['generic'][$type], 'colspan="5"'); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"20%\""); +print emit_th($strings['profile']['model'], "width=\"20%\""); +print emit_th($strings['profile']['iso']); +print emit_th($strings['profile']['format']); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; -print "\n"; print "\n"; print "
    ManufacturerModelISOFormat
    \n"; +print "\n"; +print emit_manufacturer_combo('film_manufacturer_id', $manufacturer, ""); +print "\n"; $all_film_iso = pg_query($database, "select identifier, value from film_iso order by value"); $num_of_film_iso = pg_num_rows($all_film_iso); print ""; print "
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; +print "
    Film Specific Data
    \n"; +print "\n"; print "\n"; -print "\n"; +print emit_th($strings['generic']['access']); print "\n"; print "\n"; -print "\n"; +print "\n"; print "\n"; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Access
    \n"; display_access_combo("film_access_rights", "t", ""); print "\n"; display_access_combo("film_access_rights", "t", ""); print "
    \n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/film.del.php b/src/film.del.php index ad8a1f4..ef86ccf 100644 --- a/src/film.del.php +++ b/src/film.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,89 +17,74 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; +$type = 'film'; + $database = site_prolog(); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $film_id = pg_escape_string($_REQUEST['item']); $number_of_references = pg_fetch_row(pg_query($database, "select number_of_film_references($film_id)")); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from film where identifier=$film_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } -site_header($page_width, "Delete Film"); +site_header(sprintf($strings['profile']['delete'], $strings['generic'][$type])); site_navigator(6); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete film", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this film. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this film. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['film']['idx'], $profile_data, "100%"); -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print ""; +print "
    Remove Film
    \n"; +print "\n"; +print emit_td($strings['generic']['delete']." ".$strings['generic'][$type], 'colspan="6"'); print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['iso']); +print emit_th($strings['profile']['format']); +print emit_th($strings['generic']['access']); +print emit_th($strings['generic']['refs']); print ""; $film_to_be_removed = pg_fetch_row(pg_query($database, "select name, model, iso, format, url, access_rights from view_film where identifier='$film_id'")); print ""; -print ""; -print ""; -print ""; -print "\n"; +print ""; +print ""; +print ""; +print emit_td($strings['generic'][$access[$film_to_be_removed[5]]]); +print "\n"; print ""; print "
    ManufacturerModelISOFormatAccess
    $film_to_be_removed[0]$film_to_be_removed[1]"; -print "$film_to_be_removed[2]$film_to_be_removed[3]$film_to_be_removed[5]$film_to_be_removed[0]$film_to_be_removed[1]"; +print "$film_to_be_removed[2]$film_to_be_removed[3]$number_of_references[0]
    "; -print " 
    "; if ($number_of_references[0]==0) { - print "\n"; - print "\"Cancel\"/\n"; -} -else { - print "\"Back\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; +} else { + print $thm_elem['button.back']; } print "
    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/film.edit.2.php b/src/film.edit.2.php index a93c8a5..a395041 100644 --- a/src/film.edit.2.php +++ b/src/film.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,75 +17,69 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; function update_film($database, $user_id, $film_id, $film_type_id, $film_manufacturer_id, $film_model, $film_iso, $film_format, $film_access_rights) { + $result = TRUE; pg_query($database, "begin"); + if ($film_type_id=='custom') { /* film type has changed */ $number_of_filmes_of_same_type = pg_fetch_row(pg_query($database, "select count(identifier) from film where type=(select type from film where identifier='$film_id')")); if ($number_of_filmes_of_same_type[0] == 1) { /* there was only one film of this kind, so we have to remove it */ $film_type_to_remove = pg_fetch_row(pg_query($database, "select type from film where identifier='$film_id'")); + } else { + $film_type_to_remove = FALSE; } /* create new type */ $new_film_type_id = pg_fetch_row(pg_query($database, "select nextval('film_type_id_sequence')")); $film_type_id = $new_film_type_id[0]; $result = pg_query($database, "insert into film_type (identifier, manufacturer, model, iso, format, last_modified_date, last_modifying_users) values ($film_type_id, $film_manufacturer_id, '$film_model', '$film_iso', '$film_format', now(), '$user_id')"); - if (!$result) { - pg_query($database, "rollback"); - print "Failed to create new film type"; - return; - } } /* add film */ - $result = pg_query($database, "update film set type=$film_type_id, access_rights='$film_access_rights' where identifier='$film_id'"); - if (!$result) { - pg_query($database, "rollback"); - print "Failed to create new film"; - return; + if ($result) { + $result = pg_query($database, "update film set type=$film_type_id, access_rights='$film_access_rights' where identifier='$film_id'"); } /* remove old type */ - if ($film_type_to_remove) { + if ($result && $film_type_to_remove) { $result = pg_query($database, "delete from film_type where identifier='$film_type_to_remove[0]'"); - if (!$result) { - pg_query($database, "rollback"); - print "Failed to delete film type: $film_type"; - return; - } + } + + if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); } - pg_query($database, "commit"); } -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$film_id = pg_escape_string($_REQUEST['item_id']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from film where identifier=$film_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } update_film($database, $po_user['id'], - pg_escape_string($_REQUEST['item_id']), + $film_id, pg_escape_string($_REQUEST['film_type_id']), pg_escape_string($_REQUEST['film_manufacturer_id']), pg_escape_string($_REQUEST['film_model']), @@ -94,5 +88,5 @@ update_film($database, $po_user['id'], pg_escape_string($_REQUEST['film_access_rights'])); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['film']['idx']); +header("Location: my.profile.php?selector=".$profile_data['film']['idx']); ?> diff --git a/src/film.edit.php b/src/film.edit.php index 2f481b6..83b9dbc 100644 --- a/src/film.edit.php +++ b/src/film.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; -$database = site_prolog(); +$type = 'film'; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); $film_id = pg_escape_string($_REQUEST['item']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from film where identifier=$film_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -48,6 +43,8 @@ if ($po_user['type'] < $user_type['administrator']) { $film_current_value = pg_fetch_row(pg_query($database, "select name, model, iso, format, access_rights from view_film where identifier='$film_id'")); $film_type_current_value = pg_fetch_row(pg_query($database, "select type from film where identifier='$film_id'")); +$manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); + switch ($manufacturer_filter) { case 'All': case '': @@ -57,148 +54,106 @@ switch ($manufacturer_filter) { $all_film_types = pg_query($database, "select identifier, name, model, iso, format, url from view_film_type where name='$manufacturer_filter' or identifier='$film_type_current_value[0]'"); } -site_header($page_width, "Edit Film"); +site_header(sprintf($strings['profile']['edit'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit film", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['film']['idx'], $profile_data, "100%"); -print " 
    "; -print "\n"; -print ""; -print ""; -print ""; - print ""; +print "
    \n"; -print "\n\n"; -print "\n"; -print "\n
    Film Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; -print "
    \n"; + +emit_profile_manuf_combo("film.edit.php?type=$type&item=$film_id", $type, 4, $manufacturer, $manufacturer_filter); + print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['iso']); +print emit_th($strings['profile']['format']); print "\n"; $num_of_film_types = pg_num_rows($all_film_types); if ($num_of_film_types > 0) { for ($i=0; $i < $num_of_film_types; $i++) { $film_type = pg_fetch_row($all_film_types, $i); - print ""; - if ($film_type_current_value[0] == $film_type[0]) - print ""; - else - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; } -} -else -print ""; + } else { + print "\n"; + } print "
    ManufacturerModelISOFormat
    $film_type[1]$film_type[2]$film_type[3]$film_type[4]
    $film_type[1]$film_type[2]$film_type[3]$film_type[4]
    No film types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print ""; +print "
    Edit Film Type
    ManufacturerModelISOFormat
    \n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['iso']); +print emit_th($strings['profile']['format']); +print "\n"; print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; print ""; print "
    ".sprintf($strings['profile']['edit_type'], $strings['generic'][$type])."
    "; -print ""; +print ""; +print ""; print ""; -print ""; +print ""; + +print emit_manufacturer_combo('film_manufacturer_id', $manufacturer, $film_current_value[0]); print ""; -print ""; +print ""; +print ""; print "\n"; +print "\n"; print ""; print "
    \n"; -print " 
    \n"; -print "\n"; -print ""; +print "
    Film Specific Data
    \n"; +print "\n"; -print ""; -print ""; -print ""; +print "\n"; +print emit_th($strings['generic']['access']); +print "\n"; -print ""; -print "\n"; -print ""; -print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Access
    "; display_access_combo("film_access_rights", $film_current_value[4], ""); print "
    "; +print "\n"; +print "\n"; display_access_combo("film_access_rights", $film_current_value[4], ""); print "\n"; +print "\n"; +print "\n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print ""; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/folder.add.2.php b/src/folder.add.2.php index 7bb6dc0..d9e1006 100644 --- a/src/folder.add.2.php +++ b/src/folder.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,55 +17,42 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; +; include_once "include/site.php"; -include_once "$theme/theme.php"; -$return_path = $_REQUEST['return']; +$database = site_prolog(PO_USER_TYPE_USER); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$folder_name = pg_escape_string($_REQUEST['folder_caption']); -$folder_description = pg_escape_string($_REQUEST['folder_description']); -$folder_access_rights = pg_escape_string($_REQUEST['folder_access_rights']); $folder_parent = pg_escape_string($_REQUEST['parent']); if ($folder_parent != "null") { - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from folder where identifier=$folder_parent and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } } -global $default_order_by; - -if (($folder_name != "") && - ($folder_name != "Trash") && - ($folder_name != "Orphanage")) { - $result = pg_query($database, "insert into folder (identifier, parent_folder, users, caption, description, date_of_creation, access_rights, orderby) - values (nextval('folder_id_sequence'), $folder_parent, -'$po_user[id]', '$folder_name', '$folder_description', now(), $folder_access_rights, $default_order_by)"); - if (!$result) { - // print "Failed to create new folder: $folder_name"; - exit(); - } -} +$result = add_folder($database, $po_user['id'], $folder_parent, + $_REQUEST['folder_access_rights'], + $_REQUEST['folder_caption'], + $_REQUEST['folder_description'], + $_REQUEST['password'], + $_REQUEST['event'] +); site_epilog($database); -if ($folder_parent == "null") { - header("location: my.folder.php"); + +if (!$result) { + header("Location: $_SERVER[HTTP_REFERER]"); + } else if ($folder_parent == "null") { + header("Location: user.php?user=$po_user[id]"); } else { - header("location: folder.php?folder=$folder_parent"); + header("Location: folder.php?folder=$folder_parent"); } ?> diff --git a/src/folder.add.php b/src/folder.add.php index bf07588..7015da3 100644 --- a/src/folder.add.php +++ b/src/folder.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,78 +17,78 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; include_once "include/common.php"; -include_once "include/site.php"; -include_once "$theme/theme.php"; +include_once "include/contacts.php"; +; -$return_path = $_REQUEST['return']; - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $folder_parent = pg_escape_string($_REQUEST['parent']); -$folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); +$folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and identifier != $po_user[trash_folder] and caption != 'Trash' order by date_of_creation desc"); if ($folder_parent) { $folder_data = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$folder_parent'")); $path_to_folder = get_path_to_folder($database, $folder_parent); - $path_to_folder = $path_to_folder . " : $folder_data[0]"; -} + $path_to_folder = $path_to_folder . " : $folder_data[0]"; + } else { + $path_to_folder = ""; + } -site_header($page_width, "Add Folder"); +site_header($strings['generic']['add_folder']); site_navigator(5); -site_navigator_status("Users : My Folders and Albums$path_to_folder : Add Folder ", ""); +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_folder : ".$strings['generic']['add_folder'], ""); print " 
    \n"; print "
    "; -print ""; -print "\n"; + +print "
    \n"; print ""; -print ""; -print ""; -print ""; +print emit_th($strings['generic']['folder_name'], "width=\"40%\""); +print emit_th($strings['generic']['parent'], "width=\"25%\""); +print emit_th($strings['generic']['access'], "width=\"15%\""); +print emit_th($strings['generic']['password'], "width=\"15%\""); print ""; print ""; -print ""; -print ""; +print "\n"; -print "\n"; +print "\n"; +print ""; print ""; print "
    Folder NameParent folderAccess
    "; +print ""; display_folder_combo("parent", $folder_all, $folder_parent, "null"); print ""; display_access_combo("folder_access_rights", "t", ""); print ""; display_access_combo("folder_access_rights", "t", ""); print "
    "; print " 
    \n"; -print "\n"; +print "
    \n"; print ""; -print ""; +print emit_td($strings['datebook']['event']); +print emit_td(emit_event_combo($database, "event", $po_user['id'], "null")); +print ""; +print "
    Description
    "; + +print " 
    \n"; + +print "\n"; +print ""; +print emit_th($strings['generic']['description']); print ""; print ""; -print ""; print ""; print "
    "; -print ""; +print ""; +print ""; print "
    "; print " 
    \n"; -print "
    \n"; -print ""; -print "\"Cancel\"/"; -print "
    \n"; +print "
    "; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; print "
    "; site_footer($database); site_epilog($database); diff --git a/src/folder.content.php b/src/folder.content.php index 1dbde6f..5e0f758 100644 --- a/src/folder.content.php +++ b/src/folder.content.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,281 +17,237 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/search.2.php"; + include_once "include/site.php"; -include_once "$theme/theme.php"; -$database = site_prolog(); +$return_path = isset($_REQUEST['return']) ? $_REQUEST['return'] : ""; -if ($po_user['type'] < $user_type['user']) { +$database = site_prolog(PO_USER_TYPE_DISABLED); + +$owner_id = isset($_REQUEST['user']) ? $_REQUEST['user'] : 0; + +$destination_folder = pg_escape_string(isset($_REQUEST['destination_folder']) ? $_REQUEST['destination_folder'] : ""); +$destination_album = pg_escape_string(isset($_REQUEST['destination_album'])? $_REQUEST['destination_album'] : ""); +$source_folder = pg_escape_string(isset($_REQUEST['source_folder']) ? $_REQUEST['source_folder'] : ""); +$source_album = pg_escape_string(isset($_REQUEST['source_album']) ? $_REQUEST['source_album'] : ""); + +$goto_f_request = isset($_REQUEST['go_to_f']); +$goto_a_request = isset($_REQUEST['go_to_a']); +$move_f_request = isset($_REQUEST['move_to_f']); +$link_a_request = isset($_REQUEST['link_to_a']); +$move_a_request = isset($_REQUEST['move_to_a']); + +$print_request = isset($_REQUEST['print_req']); +$spool_request = isset($_REQUEST['spool_req']); +$export_request = isset($_REQUEST['export_req']); +$bulk_update_request = isset($_REQUEST['bulk_update_req']); +$delete_request = isset($_REQUEST['delete_req']); +$add_photo_request = isset($_REQUEST['add_photos']); +$empty_trash_request = isset($_REQUEST['empty_trash_req']); + +if (isset($_REQUEST['selection']) && is_array($_REQUEST['selection'])) { + foreach ($_REQUEST['selection'] as $photo) { + $parts = explode(":", $photo); + $photo_data[] = $parts[0]; + $version_data[] = $parts[1]; + } + $photos = implode(",", $photo_data); + $versions = implode(",", $version_data); +} else { + $photos = ""; + $versions = ""; +} + +/* Doesn't take arguments */ +if ($export_request) { site_epilog($database); - header("location: login.php"); + header("Location: export.php?export_type=$_REQUEST[export_type]"); exit(); } -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $_REQUEST['user']; - } else { - $user_id = $po_user['id']; -} - -$destination_basket = $_REQUEST['basket']; -$destination_folder = $_REQUEST['destination_folder']; -$destination_album = $_REQUEST['destination_album']; -$source_folder = $_REQUEST['source_folder']; -$source_album = $_REQUEST['source_album']; -$source_photo = $_REQUEST['source_photo']; -$goto_folder = $_REQUEST['goto_folder']; -$print_type = $_REQUEST['print_type']; -$export_type = $_REQUEST['export_type']; - -$order_by = $_REQUEST['order_by']; -$return_path = $_REQUEST['return']; - -$access_rights = $_REQUEST['access_rights']; - -if ($order_by) { - $return_path = $return_path . "&order_by=$order_by"; -} - -if ($destination_folder == "" && - $destination_album == "" && - $print_type == "" && - $export_type == "" && - $goto_folder == "" && - $destination_basket == "" && - $access_rights == "") { +/* Doesn't take arguments */ +if ($print_request != "") { site_epilog($database); - header("location: $return_path"); + header("Location: print.php?print_type=$_REQUEST[print_type]"); exit(); } -if ($goto_folder != "") { - header("location: folder.php?folder=$goto_folder"); +if ($add_photo_request) { + header("Location: photo.add.php?folder=$source_folder"); exit(); -} + } -if ($destination_basket == "yes" && $destination_album == "") { - $user_id = $_REQUEST['user']; - $num_of_photos = $_REQUEST['num_of_checkboxes']; - for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_identifier = $_REQUEST['cb'.$counter]; - if ($photo_identifier) { - /* this is quick and dirty but we avoid using plpgsql */ - $num_of_items = pg_fetch_row(pg_query($database, " - select count(identifier) - from shop_order - where item=(select min(identifier) from photo_item where photo=$photo_identifier) - and transaction = null - and client=$po_user[id]")); +if ($empty_trash_request) { + header("Location: trash.empty.php?user=$owner_id"); + exit(); + } - if ($num_of_items[0] == 0) { - pg_query($database, " - insert into shop_order (identifier, client, transaction, pieces, date_of_creation, date_of_last_edit, item) - values (nextval('shop_order_id_sequence'), $po_user[id], null, 1, now(), now(), (select min(identifier) from photo_item where photo=$photo_identifier))"); - } +/* Redirect a trash request appropriately */ +if ($delete_request != "") { + if ($source_album != "") { + $move_a_request = TRUE; + $destination_album = "trash"; + } else { + $move_f_request = TRUE; + if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $destination_folder = "(select identifier from folder where users = $owner_id and caption = 'Trash')"; + } else { + $destination_folder = $po_user['trash_folder']; } } + } + +/* Redirect a spool request appropriately. */ +if ($spool_request) { + $link_a_request = TRUE; + $destination_album = $po_user['spool_album']; + } + + +/* Doesn't take arguments */ +if ($goto_f_request && ($destination_folder != "")) { site_epilog($database); - header("location: $return_path"); + header("Location: folder.php?folder=$destination_folder"); exit(); } -if ($export_type != "") { - pg_query($database, "delete from photo_spooler where users=$user_id"); - $photos_in_spooler = 0; - - $num_of_photos = $_REQUEST['num_of_checkboxes']; - for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_identifier = $_REQUEST['cb'.$counter]; - - if ($photo_identifier) { - if ($po_user['type'] < $user_type['administrator']) { - /* Ensure mere users don't move/mangle a photo that isn't theirs! */ - $result = pg_query($database, "select identifier from photo where identifier='$photo_identifier' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=1"); - exit(); - } - } - - $photos_in_spooler++; - pg_query($database, "insert into photo_spooler (identifier, users, photo) - values (nextval('photo_spooler_id_sequence'), $user_id, $photo_identifier)"); - } - } +/* Doesn't take arguments */ +if ($goto_a_request && ($destination_album != "")) { site_epilog($database); - - if ($photos_in_spooler == 0) { - header("location: $return_path"); - exit(); - } - - $arguments = "export_type=$export_type"; - if ($source_folder != "") - $arguments = $arguments . "&source_folder=$source_folder"; - if ($source_album != "") - $arguments = $arguments . "&source_album=$source_album"; - if ($source_photo != "") - $arguments = $arguments . "&source_photo=$source_photo"; - header("location: export.php?$arguments"); + header("Location: album.php?album=$destination_album"); exit(); } -if ($print_type != "") { - pg_query($database, "delete from photo_spooler where users=$user_id"); - $photos_in_spooler = 0; - - $num_of_photos = $_REQUEST['num_of_checkboxes']; - for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_identifier = $_REQUEST['cb'.$counter]; - - if ($photo_identifier) { - - if ($po_user['type'] < $user_type['administrator']) { - /* Ensure mere users don't move/mangle a photo that isn't theirs! */ - $result = pg_query($database, "select identifier from photo where identifier='$photo_identifier' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=1"); - exit(); - } - } - - $photos_in_spooler++; - pg_query($database, "insert into photo_spooler (identifier, users, photo) - values (nextval('photo_spooler_id_sequence'), $user_id, $photo_identifier)"); - } - } - - /* check for photos in spooler */ - if ($photos_in_spooler == 0) { - site_epilog($database); - header("location: $return_path"); - exit(); - } - - $arguments = "print_type=$print_type"; - if ($source_folder != "") - $arguments = $arguments . "&source_folder=$source_folder"; - if ($source_album != "") - $arguments = $arguments . "&source_album=$source_album"; - if ($source_photo != "") - $arguments = $arguments . "&source_photo=$source_photo"; +/* Make sure spool request is sane */ +if ($spool_request && ($versions == "")) { site_epilog($database); - header("location: print.php?$arguments"); + header("Location: $return_path"); exit(); } -if ($access_rights != "") { - $num_of_photos = $_REQUEST['num_of_checkboxes']; - for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_identifier = $_REQUEST['cb'.$counter]; +/* Make sure move request is sane */ +if ($move_f_request && (($destination_folder == "") || + ($photos == ""))) { + site_epilog($database); + header("Location: $return_path"); + exit(); + } - if ($photo_identifier) { - if ($po_user['type'] < $user_type['administrator']) { - /* Ensure mere users don't move/mangle a photo that isn't theirs! */ - $result = pg_query($database, "select identifier from photo where identifier='$photo_identifier' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=1"); - exit(); - } - } - - pg_query($database, "update photo set access_rights=$access_rights where identifier=$photo_identifier"); - } +/* Make sure link request is sane */ +if ($link_a_request && (($destination_album == "") || + ($versions == ""))) { + site_epilog($database); + header("Location: $return_path"); + exit(); + } + +/* Bulk update? */ +if ($bulk_update_request) { + if ($photos != "") { + header("Location: my.tools.php?selector=1&type=list&selection=$photos"); + } else if ($source_album != "") { + header("Location: my.tools.php?selector=1&type=album&selection=$source_album"); + } else if ($source_folder != "") { + header("Location: my.tools.php?selector=1&type=folder&selection=$source_folder"); + } else { + header("Location: my.tools.php?selector=1"); } - header("location: $return_path"); exit(); } -$trash_id = pg_fetch_row(pg_query($database, "select identifier from folder where caption='Trash' and users=$user_id")); -$orphanage_id = pg_fetch_row(pg_query($database, "select identifier from folder where caption='Orphanage' and users=$user_id")); - -if ($po_user['type'] < $user_type['administrator']) { - /* ...to an album that isn't theirs! */ - if ($destination_album != "" && $destination_album != "trash") { - $result = pg_query($database, "select identifier from album where identifier='$destination_album' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=2"); - exit(); - } - } - - /* ...to a folder that isn't theirs! */ - if ($destination_folder != "") { +if ($move_f_request && ($destination_folder != "")) { + /* Check ownership on destination folder */ + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from folder where identifier='$destination_folder' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php?reason=3"); + site_push_error($strings['errors']['not_owner']); + header("Location: $return_path"); exit(); } } -} + /* And perform the move */ + pg_query($database, "begin"); + $clause = ""; + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + $clause = " AND users = $po_user[id] "; + } + $result = pg_query($database, "update photo set folder=$destination_folder where identifier in ( $photos ) $clause "); -$num_of_photos = $_REQUEST['num_of_checkboxes']; -for ($counter = 0; $counter < $num_of_photos; $counter++) { - $photo_identifier = $_REQUEST['cb'.$counter]; + if (!$result) { + pg_query($database, "rollback"); + site_push_error($strings['errors']['db_insert_failed']); + } else { + pg_query($database, "commit"); + } - if ($photo_identifier) { - if ($po_user['type'] < $user_type['administrator']) { - /* Ensure mere users don't move/mangle a photo that isn't theirs! */ - $result = pg_query($database, "select identifier from photo where identifier='$photo_identifier' and users = $po_user[id]"); + } elseif (($link_a_request || $move_a_request) && ($destination_album != "")) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + /* ...to an album that isn't theirs! */ + if ($destination_album != "trash") { + $result = pg_query($database, "select identifier from album where identifier='$destination_album' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php?reason=1"); + site_push_error($strings['errors']['not_owner']); + header("Location: $return_path"); exit(); } } - - if ($destination_folder != "") { - if ($destination_folder == $trash_id[0]) { - /* do not remove photos that were involved in a shop transaction */ - /* instead move them into the Orphanage */ - $num_of_transactions = pg_fetch_row(pg_query($database, "select photo_shop_transaction_references($photo_identifier)")); - if ($num_of_transactions[0] > 0) { - pg_query($database, "update photo set folder=$orphanage_id[0] where identifier=$photo_identifier"); - continue; - } + /* From a source album they don't own either ... */ + if ($move_a_request) { + $result = pg_query($database, "select identifier from album where identifier='$source_album' and users = $po_user[id]"); + if (pg_num_rows($result) <= 0) { + site_epilog($database); + site_push_error($strings['errors']['not_owner']); + header("Location: $return_path"); + exit(); } - pg_query($database, "update photo set folder=$destination_folder where identifier=$photo_identifier"); - continue; } + } + pg_query($database, "begin"); - if ($destination_album != "") { - if ($destination_album == "trash") { - /* in case the same photo apperars twice in an album, */ - /* we do the min() hack to remove only one of them */ - pg_query($database, "delete from album_content where identifier=(select min(identifier) from album_content where photo=$photo_identifier)"); - } else { - pg_query($database, "begin"); - if ($source_album != "") { - $result = pg_query($database, "delete from album_content where album=$source_album and identifier=(select min(identifier) from album_content where photo=$photo_identifier)"); - if (!$result) { - pg_query($database, "rollback"); - continue; - } - } - $result = pg_query($database, "insert into album_content (identifier, photo, album) - values (nextval('album_content_id_sequence'), $photo_identifier, $destination_album)"); - if (!$result) { - pg_query($database, "rollback"); - continue; - } - pg_query($database, "commit"); + /* If we're moving the photos to a different album, + delete them from the original album first */ + if ($source_album != "" && $move_a_request) { + $result = pg_query($database, "delete from album_content where album=$source_album and version in ( $versions ) "); + } + + /* Loop through the photos and add them to the destination */ + foreach ($_REQUEST['selection'] as $photo) { + $parts = explode(":", $photo); + $photo_identifier = $parts[0]; + $photo_version = $parts[1]; + // print "$photo_identifier $photo_version -- $owner_id $destination_album\n"; + if ($destination_album != "trash") { + /* Check for duplicates */ + $result = pg_fetch_row(pg_query($database, "select count(*) from album_content where photo = $photo_identifier and version = $photo_version and album = $destination_album")); + if ($result[0] != 0) { + continue; + } + + /* Check that we can read the photo.. */ + $result = pg_fetch_row(pg_query($database, "select can_access_photo($photo_identifier, $po_user[id], '{".$passwords."}');")); + + if ($result[0] == 't') + /* Add to album */ + $result = pg_query($database, "insert into album_content (identifier, photo, version, album) + values (nextval('album_content_id_sequence'), $photo_identifier, $photo_version, $destination_album)"); + // (select v.identifier from photo_version v where v.photo = $photo_identifier and v.master = 't') + + if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + break; } } } -} + pg_query($database, "commit"); +} site_epilog($database); -header("location: $return_path"); +header("Location: $return_path"); ?> diff --git a/src/folder.del.2.php b/src/folder.del.2.php index c199f89..9dd08f8 100644 --- a/src/folder.del.2.php +++ b/src/folder.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,28 +17,23 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $folder_id = pg_escape_string($_REQUEST['folder']); $parent_folder = $_REQUEST['parent']; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -/* Ensure mere users don't erase a folder that isn't theirs! */ -if ($po_user['type'] < $user_type['administrator']) { - $result = pg_query($database, "select identifier from folder where identifier='$album_id' and users = $po_user[id]"); +/* Ensure mere users don't erase an folder that isn't theirs! */ +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + $result = pg_query($database, "select identifier from folder where identifier='$folder_id' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -46,15 +41,15 @@ if ($po_user['type'] < $user_type['administrator']) { if ($folder_id!="") { $result = pg_query($database, "delete from folder where identifier='$folder_id'"); if (!$result) { - // print "Failed to delete folder: $folder_id"; + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); if ($parent_folder == "") { - header("location: my.folder.php"); + header("Location: user.php?user=$po_user[id]"); } else { - header("location: folder.php?folder=$parent_folder"); + header("Location: folder.php?folder=$parent_folder"); } ?> diff --git a/src/folder.del.php b/src/folder.del.php index c023e18..b3ccb40 100644 --- a/src/folder.del.php +++ b/src/folder.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,91 +17,69 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $folder_id = pg_escape_string($_REQUEST['folder']); -$folder_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, value, parent_folder, users from folder, access_type where access_type.identifier=folder.access_rights and folder.identifier='$folder_id'")); +$folder_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, access_rights, parent_folder, users from folder where folder.identifier='$folder_id'")); if (($folder_data[4] != $po_user['id']) && - ($po_user['type'] != $user_type['administrator'])) { + ($po_user['type'] != PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -$photos_in_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder_id)")); -$subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder_id)")); +$folder_stats = pg_fetch_assoc(pg_query($database, "select count_subfolders_by_folder($folder_id, $po_user[id], '{".$passwords."}') as folders, count_photos_by_folder($folder_id, $po_user[id], '{".$passwords."}') as photos")); $path_to_folder = get_path_to_folder($database, $folder_id); -site_header($page_width, "Delete Folder"); +site_header($strings['generic']['delete_folder']); site_navigator(5); -switch ($photos_in_folder[0]) { - case 0: - switch ($subfolders_in_folder[0]) { - case 0: - site_navigator_status("Users : My Folders and Albums$path_to_folder : Delete folder $folder_data[0]?", ""); - break; - case 1: - site_navigator_status("Users : My Folders and Albums$path_to_folder : There is $subfolders_in_folder[0] subfolder in $folder_data[0]. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Folders and Albums$path_to_folder : There are $subfolders_in_folder[0] subfolders in $folder_data[0]. Cannot remove.", ""); - } - break; - case 1: - site_navigator_status("Users : My Folders and Albums$path_to_folder : There is $photos_in_folder[0] photo in $folder_data[0]. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Folders and Albums$path_to_folder : There are $photos_in_folder[0] photos in $folder_data[0]. Cannot remove.", ""); -} +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_folder : $folder_data[0] : " .$strings['generic']['delete_folder'], ""); print " 
    \n"; -print "\n"; + +print "
    \n"; print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['folder_name'], "width=\"28%\""); +print emit_th($strings['generic']['subfolders'], "width=\"5%\""); +print emit_th($strings['generic']['photos'], "width=\"5%\""); +print emit_th($strings['generic']['created'], "width=\"12%\""); +print emit_th($strings['generic']['access'], "width=\"10%\""); print ""; print ""; -print "\n"; -print "\n"; -print "\n"; -print ""; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print ""; +print emit_td($strings['generic'][$access[$folder_data[2]]]); print ""; print "
    Folder NameSubfoldersPhotosCreatedAccess
    $folder_data[0]$subfolders_in_folder[0]$photos_in_folder[0]".generate_date_html($folder_data[1], 'date', 1). "$folder_data[2]$folder_data[0]$folder_stats[folders]$folder_stats[photos]".emit_date_html($folder_data[1], 'date'). "
    "; + print " 
    \n"; print "
    \n"; -if (($photos_in_folder[0] > 0) || ($subfolders_in_folder[0] > 0)) { - print "\"Back\"/\n"; -} -else { +if (($folder_stats['folders'] > 0) || ($folder_stats['photos'] > 0)) { + print $thm_elem['button.cancel']; +} else { print "
    "; print "

    "; print "

    "; - print ""; - print "\"Cancel\"/"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; print "

    "; } print "
    \n"; -print " 
    \n"; + site_footer($database); site_epilog($database); ?> diff --git a/src/folder.edit.2.php b/src/folder.edit.2.php index a2be48e..9e262cc 100644 --- a/src/folder.edit.2.php +++ b/src/folder.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,44 +17,46 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $folder_id = pg_escape_string($_REQUEST['folder']); $folder_name = pg_escape_string($_REQUEST['folder_caption']); $folder_description = pg_escape_string($_REQUEST['folder_description']); $folder_access_rights = pg_escape_string($_REQUEST['folder_access_rights']); $parent_folder = pg_escape_string($_REQUEST['parent']); +$password = pg_escape_string($_REQUEST['password']); -$database = site_prolog(); +$event = pg_escape_string($_REQUEST['event']); +if ($event != "null") $event = "'$event'"; -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); /* Ensure mere users don't edit an folder that isn't theirs! */ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_query($database, "select identifier from folder where identifier='$folder_id' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } if (($folder_id!="") && ($folder_name!="")) { - $result = pg_query($database, "update folder set caption='$folder_name', description='$folder_description', access_rights=$folder_access_rights, parent_folder=$parent_folder where identifier='$folder_id'"); + $result = pg_query($database, "update folder set caption='$folder_name', description='$folder_description', access_rights=$folder_access_rights, parent_folder=$parent_folder, password='$password', event=$event where identifier='$folder_id'"); + if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } } site_epilog($database); if ($parent_folder == "null") { - header("location: my.folder.php"); + header("Location: user.php?user=$po_user[id]"); } else { - header("location: folder.php?folder=$parent_folder"); + header("Location: folder.php?folder=$parent_folder"); } ?> diff --git a/src/folder.edit.php b/src/folder.edit.php index 3986f77..64fa602 100644 --- a/src/folder.edit.php +++ b/src/folder.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,92 +17,96 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; +include_once "include/contacts.php"; +include_once "include/orderby.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $folder_id = pg_escape_string($_REQUEST['folder']); -$folder_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, access_rights, parent_folder, description, users from folder where identifier='$folder_id'")); +$folder_data = pg_fetch_row(pg_query($database, "select caption, date_of_creation, access_rights, parent_folder, description, users, password, event from folder where identifier='$folder_id'")); /* Ensure mere users don't edit an folder that isn't theirs! */ if (($po_user['id'] != $folder_data[5]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -$folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and identifier!=$folder_id and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); +$folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and identifier != $folder_id and identifier != $po_user[trash_folder] and caption != 'Trash' order by date_of_creation desc"); -$photos_in_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder_id)")); - -$subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder_id)")); +$folder_stats = pg_fetch_assoc(pg_query($database, "select count_subfolders_by_folder($folder_id, $po_user[id], '{".$passwords."}') as folders, count_photos_by_folder($folder_id, $po_user[id], '{".$passwords."}') as photos")); $path_to_folder = get_path_to_folder($database, $folder_id); -site_header($page_width, "Edit Folder"); +site_header($strings['generic']['edit_folder']); site_navigator(5); -site_navigator_status("Users : My Folders and Albums$path_to_folder : Edit folder $folder_data[0]", ""); +site_navigator_status(user_disp_string($po_user['id'], $po_user['id'], + "", "")."$path_to_folder : $folder_data[0] : " .$strings['generic']['edit_folder'], ""); + print " 
    \n"; print "
    "; -print "

    "; -print "\n"; +print ""; +print "
    \n"; print ""; -print "\n"; -print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['folder_name'], "width=\"28%\""); +print emit_th($strings['generic']['parent'], "width=\"27%\""); +print emit_th($strings['generic']['subfolders'], "width=\"5%\""); +print emit_th($strings['generic']['photos'], "width=\"5%\""); +print emit_th($strings['generic']['created'], "width=\"12%\""); +print emit_th($strings['generic']['access'], "width=\"10%\""); +print emit_th($strings['generic']['password'], "width=\"13%\""); print ""; print ""; -print ""; -print ""; +print "\n"; -print "\n"; -print "\n"; -print ""; -print "\n"; +print "\n"; +print "\n"; +print ""; +print "\n"; +print ""; print ""; print "
    Folder NameParent folderSubfoldersPhotosCreatedAccess
    "; +print ""; display_folder_combo("parent", $folder_all, $folder_data[3], "null"); print "$subfolders_in_folder[0]$photos_in_folder[0]".generate_date_html($folder_data[1], 'date', 1). ""; display_access_combo("folder_access_rights", $folder_data[2], ""); print "$folder_stats[folders]$folder_stats[photos]".emit_date_html($folder_data[1], 'date'). ""; display_access_combo("folder_access_rights", $folder_data[2], ""); +print "
    "; print " 
    \n"; -print "\n"; +print "
    \n"; print ""; -print ""; +print emit_td($strings['datebook']['event']); +print emit_td(emit_event_combo($database, "event", $po_user['id'], $folder_data[7])); +print ""; +print "
    Description
    "; + +print " 
    \n"; + +print "\n"; +print ""; +print emit_th($strings['generic']['description']); print ""; print ""; -print ""; print ""; print "
    "; -print ""; +print ""; +print ""; print "
    "; print " 
    \n"; -print "

    \n"; -print ""; -print "\"Cancel\"/"; +print "
    \n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; print ""; -print "
    \n"; site_footer($database); site_epilog($database); ?> diff --git a/src/folder.php b/src/folder.php index d43cf69..660c4cf 100644 --- a/src/folder.php +++ b/src/folder.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,172 +17,120 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/orderby.php"; include_once "include/search.2.php"; -include_once "$theme/theme.php"; $folder_id = pg_escape_string($_REQUEST['folder']); -$order_by = pg_escape_string($_REQUEST['order_by']); -$view = $_REQUEST['view']; +$offset = pg_escape_string(isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0); $database = site_prolog(); +$order_by = $po_options['order_by']; -$arguments=""; -$client=FALSE; +$client = FALSE; +$folder = FALSE; -if (!$folder_id) { - header("HTTP/1.1 404 Not found"); - site_header($page_width, "Display Folder"); - site_navigator(5); - site_navigator_status("Users : My Folders and Albums : No folder specified", ""); - site_footer($database); - site_epilog($database); - exit(); -} +if ($folder_id) { + $folder = pg_fetch_row(pg_query($database, "select caption, access_rights, users, description, password, can_access_folder(folder.identifier, $po_user[id], '{".$passwords."}') from folder where identifier='$folder_id'")); + } -$folder = pg_fetch_row(pg_query($database, "select caption, access_rights, users, orderby, description from folder where identifier='$folder_id'")); if (!$folder) { header("HTTP/1.1 404 Not found"); - site_header($page_width, "Display Folder"); - site_navigator(5); - site_navigator_status("Users : My Folders and Albums : No such folder", ""); + site_header($strings['generic']['display_folder']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['no_such_folder'], ""); site_footer($database); site_epilog($database); exit(); } -if ($view != "") { - $arguments = $arguments . "&view=$view"; -} - -$folder_name = $folder[0]; -$owner_id = $folder[2]; - -if (!$order_by) { - /* get the last value from the database */ - $order_by = $folder[3]; -} else if ($po_options['order_by'] != $folder[3]) { - if ($po_user['id'] == $owner_id) { - /* if different, set the database, and use the new value */ - pg_query($database, "update folder set orderby='$order_by' where identifier=$folder_id"); +if ($folder[5] == 'f') { + if ($folder[1] == $access['private']) { + header("HTTP/1.1 403 Forbidden"); + site_header($strings['generic']['display_folder']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['private'], ""); + site_footer($database); + site_epilog($database); + } else { + site_push_error($strings['errors']['protected']); + header("Location: login.php?reason=protected&orig=".urlencode("folder.php?folder=$folder_id")); } -} + exit(); + } + +/* get the last value from the database */ +$folder_name = $folder[0]; +$owner_id = $folder[2]; -$arguments = $arguments . "&order_by=$order_by"; $sql_query_order_by_string = $order_by_string[$order_by][0]; -if (($owner_id != "") && - ($po_user['type'] > $user_type['disabled'])) { +if ($po_user['type'] > PO_USER_TYPE_DISABLED) { $client = pg_fetch_row(pg_query($database, "select identifier from client where users='$owner_id' and client='$po_user[id]' and status=2")); } -if (($po_user['id'] != $owner_id) && - ($folder[1] == $access['private']) && - ($po_user['type'] != $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$user_data = pg_fetch_row(pg_query($database, " + select last_name, first_name, users.identifier + from users + where users.identifier=$owner_id")); -if (($po_user['id'] != $owner_id) && - ($folder[1] == $access['protected']) && - ($client == FALSE) && - ($po_user['type'] != $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} +site_header($folder_name); -$user_data = pg_fetch_row(pg_query($database, "select first_name, last_name, users.identifier, shop_enable from users, preferences where users.preferences=preferences.identifier and users.identifier=$owner_id")); +$user_display_string = user_disp_string($owner_id, $po_user['id'], + $user_data[0], $user_data[1]); -site_header($page_width, "Display Folder"); - -if ($po_user['type'] > $user_type['disabled']) { - $my_data = pg_fetch_row(pg_query($database, "select num_of_rows, num_of_columns, folder_view, num_of_rows_l, popup_enable, popup_delay from users, preferences where preferences.identifier=users.preferences and users.identifier=$po_user[id]")); - $num_of_rows = $my_data[0]; - $num_of_columns = $my_data[1]; - if ($view=="") - $view = $my_data[2]; - $num_of_rows_l = $my_data[3]; - $popup_enable = $my_data[4]; - $popup_delay = $my_data[5]; -} else { - $view = "slide"; - $num_of_rows_l = $default_num_of_rows_in_list_view; - $num_of_rows = $default_num_of_rows_in_slide_view; - $num_of_columns = $default_num_of_columns; - $popup_enable = $default_popup_enable; - $popup_delay = $default_popup_delay; -} - -if ($po_user['id'] == $owner_id) { - site_navigator(5); - $user_display_string="My Folders and Albums"; - $my_data = pg_fetch_row(pg_query($database, "select num_of_rows, num_of_columns, folder_view, num_of_rows_l, popup_enable, popup_delay from users, preferences where preferences.identifier=users.preferences and users.identifier=$po_user[id]")); - $num_of_rows = $my_data[0]; - $num_of_columns = $my_data[1]; - if ($view=="") - $view = $my_data[2]; - $num_of_rows_l = $my_data[3]; - $popup_enable = $my_data[4]; - $popup_delay = $my_data[5]; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[0]); -} - -if (($po_user['id'] == $owner_id) || - ($po_user['type'] == $user_type['administrator'])) { - $sql_query_photo_access_rights_string = ""; -} else { - if ($client == FALSE) { - $sql_query_photo_access_rights_string = "and photo.access_rights = $access[public]"; - } else { - $sql_query_photo_access_rights_string = "and photo.access_rights < $access[private]"; - } -} +$sql_query_photo_access_rights_string = "and can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; $num_of_photos_a = pg_fetch_row(pg_query($database, " select count(photo.identifier) - from photo - where photo.folder = '$folder_id' + from photo, folder + where photo.folder = folder.identifier + and photo.folder = '$folder_id' $sql_query_photo_access_rights_string")); + $num_of_photos = $num_of_photos_a[0]; -$offset = pg_escape_string($_REQUEST['offset']); -if (!$offset) { - $offset = 0; -} - -if ($view == "slide") { - $limit = $num_of_rows * $num_of_columns; +if ($po_options['photo_view'] == "slide") { + $limit = $po_options['photos_per_page']; } else { - $limit = $num_of_rows_l; + $limit = $po_options['rows_list_view']; } +/* Sanity checks */ if ($limit > $num_of_photos) { $limit = $num_of_photos; } +while ($num_of_photos && $offset >= $num_of_photos) { + $offset -= $limit; +} +if ($offset < 0) { + $offset = 0; +} +if (($offset + $limit) > $num_of_photos) { + $items = $num_of_photos - $offset; +} else { + $items = $limit; +} + +$master = "and photo_version.master = 't'"; $folder_photo = pg_query($database, - "select photo.identifier, photo_version.small_image_path, photo.caption, photo.date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + "select photo.identifier, photo.caption, photo.date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, views, - (select is_photo_for_sale(photo.identifier)) as for_sale, - photo.title, photo.author, '' as keyword, - photo_version.original_image_name, photo.users, - view_location.place, view_location.country, view_location.city, view_location.state - from photo, photo_dupe, photo_version, view_location + photo.title, photo.author, + photo_version.original_image_name, photo.users, + view_location.place, view_location.country, view_location.city, view_location.state, + photo_version.identifier as version + from photo, photo_version, view_location, folder where photo.folder = '$folder_id' + and folder.identifier = photo.folder and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_dupe.key = 1 - and photo_version.master = 't' + $master and photo.location = view_location.identifier $sql_query_photo_access_rights_string order by $sql_query_order_by_string @@ -191,194 +139,125 @@ $folder_photo = pg_query($database, $path_to_folder = get_path_to_folder($database, $folder_id); +if ($po_user['id'] == $owner_id) + $edit_folder = "$folder[0]"; + else + $edit_folder = "$folder[0]"; + +site_navigator(5); + if ($num_of_photos == 0) { - site_navigator_status("Users : $user_display_string$path_to_folder : $folder[0] : is empty, or contains no public pictures", ""); + site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_display_string $path_to_folder : $edit_folder", $strings['generic']['is_empty']); - if ($folder[4] != "") { - print " 
    "; - site_navigator_status("$folder[4]", ""); + if ($folder[3] != "") { + site_navigator_status("$folder[3]", ""); + } + + if (($folder_id != $po_user['trash_folder']) && + ($folder_name != 'Trash')) { + display_folders($database, $folder_id, $owner_id, "with_header"); } - - if (($folder[0] != "Trash") && ($folder[0] != "Orphanage")) { - print " 
    "; - display_folders($database, "$folder_id", $po_user['id'], $po_user['type'], $owner_id, "with_header"); - } - print " 
    "; + if (($po_user['id'] == $owner_id) && - ($folder[0]!="Trash") && - ($folder[0]!="Orphanage")) { - print ""; - print "
    "; - print "\"Add\n"; - print "
    "; + ($folder_id != $po_user['trash_folder'])) { + print "
    "; + print "
    "; + print "\n"; + print $thm_elem['button.add.photos']; + print "
    "; + print "
    "; } site_footer($database); site_epilog($database); exit(); -} else { - site_navigator_status("Users : $user_display_string$path_to_folder : $folder[0]", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); + } + +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_display_string $path_to_folder : $edit_folder", $strings['generic']['displaying'] . " " . display_photo_index_status($offset, $limit, $num_of_photos)); + +if ($folder[3] != "") { + site_navigator_status("$folder[3]", ""); } -if ($folder[4] != "") { - site_navigator_status("$folder[4]", ""); +if ($folder_name != 'Trash' || $folder_id != $po_user['trash_folder']) { + display_folders($database, "$folder_id", $owner_id, "with_header"); } -if (($folder[0] != "Trash") && ($folder[0] != "Orphanage")) { - print " 
    "; - display_folders($database, "$folder_id", $po_user['id'], $po_user['type'], $owner_id, "with_header"); -} - -print ""; -print ""; -print " 
    "; print "
    "; print ""; -print ""; -print ""; +print ""; +print ""; print "\n"; -if (($offset + $limit) > $num_of_photos) { - $items = $num_of_photos - $offset; +display_photo_navigator("folder.php?folder=$folder_id", $offset, $limit, $num_of_photos); +if ($po_options['photo_view'] == "slide") { + $checkboxes = display_photo_slides("folder", $folder_id, $folder_photo, 0, $items, true, true); } else { - $items = $limit; + $checkboxes = display_photo_list("folder", $folder_id, $folder_photo, 0, $items); } +display_photo_navigator("folder.php?folder=$folder_id", $offset, $limit, $num_of_photos); -display_photo_navigator("folder", $arguments, $owner_id, $folder_id, $offset, $limit, $num_of_photos); -if ($view=="slide") { - display_photo_slides("folder", $po_user['id'], $po_user['type'], $folder_id, $folder_photo, $items, $num_of_columns, $popup_enable, $popup_delay, $user_data[3], true, $order_by); -} else { - print " 
    \n"; - display_photo_list("folder", $po_user['id'], $po_user['type'], $folder_id, $folder_photo, $items, $user_data[3], $order_by); - print " 
    \n"; -} -display_photo_navigator("folder", $arguments, $owner_id, $folder_id, $offset, $limit, $num_of_photos); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_display_string $path_to_folder : $folder[0]", $strings['generic']['displaying'] . " " . display_photo_index_status($offset, $limit, $num_of_photos)); -print " 
    \n"; -site_navigator_status("Users : $user_display_string$path_to_folder : $folder[0]", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); +print "
    "; -if (($po_user['id'] == $owner_id) || - ($po_user['type'] == $user_type['administrator'])) { - print ""; - print ""; - - print ""; - print ""; - - if (($folder[0]!="Trash") && ($folder[0]!="Orphanage")) { - if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print ""; - print ""; - print ""; - print ""; - } - } - - print ""; - print "
    "; - - print ""; - print ""; - print ""; + + if ($po_options['photo_view'] == 'slide') { + display_photos_per_page_combo('photos_per_page', $po_options['photos_per_page']); + } else { + display_photos_per_page_combo('rows_list_view', $po_options['rows_list_view']); + } + } - switch ($folder[0]) { - case "Trash": - print ""; - print ""; - break; - case "Orphanage": - break; - default: +print "
    "; - if ($order_by != "") { - $order_by_argument = "&order_by=$order_by"; - } else { - $order_by_argument = ""; - } +if ($checkboxes) { display_order_by_combo_with_button($order_by); - print "  "; - print "\"Empty\n"; - print "
    "; - print ""; + print $thm_elem['button.add.photos']; + } + if ($checkboxes) { + print $thm_elem['button.delete_s']; + print $thm_elem['button.bulk.update']; } } + } + +print "
    \n"; + +if ($checkboxes) { + display_list_slide_option($po_options['photo_view'], "folder.php?folder=$folder_id&offset=$offset"); + } + +if ($checkboxes && ($po_user['type'] >= PO_USER_TYPE_CLIENT)) { + display_selectbutton(); + print $thm_elem['button.add.to.spool']; + } + +if (($po_user['id'] == $owner_id) || + ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + + if ($folder_name == 'Trash' || $folder_id == $po_user['trash_folder']) { + if ($checkboxes) + print $thm_elem['button.empty.trash']; + } else { if ($po_user['id'] == $owner_id) { - print "  "; - print "\"Add\n"; - print "
    "; - print "
      "; - - if ($view=="slide") - print "\"List\n"; - else - print "\"Slide\n"; - print "  "; - print "\"\"/\n"; - print "  "; - display_printto(); - print "  "; - display_export(); - print "
    "; - - print ""; - - print ""; - print ""; - - /* if the Orphanage is displayed, skip the Trash folder */ - if ($folder[0] == "Orphanage") - $sql_exclude_trash = " and caption!='Trash'"; - - $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$owner_id and caption!='Orphanage' $sql_exclude_trash order by date_of_creation desc"); - print ""; - print ""; - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$owner_id and type='u' order by date_of_creation desc"); +if (($po_user['id'] == $owner_id) || + ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$owner_id and caption != 'Trash' order by date_of_creation desc"); + $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$owner_id and caption != 'Spool' order by date_of_creation desc"); + display_folder_actions($folder_all, $folder_id); if (pg_num_rows($album_all) > 0) { - print ""; + display_album_actions($album_all, ''); } - - print ""; - print "
    "; - display_moveto_folder($folder_all, $folder_id, "goto"); - print ""; - display_moveto_folder($folder_all, $folder_id, "moveto"); - print "  "; - display_linkto_album($album_all, $album_id); - print "
    "; - print ""; - -} elseif ($po_user['type'] >= $user_type['client'] && - $user_data[3] == 't') { - print ""; - print ""; - - print ""; - - print ""; - - print ""; - - print ""; - - print ""; - print "
      "; - print "\n"; - print "  "; - print "\"View\n"; - print "  "; - print ""; - print "\"\"/\n"; - print "  "; - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and type='c' order by date_of_creation desc"); - if (pg_num_rows($album_all) > 0) { - display_linkto_album($album_all, $album_id); - } - print "
    "; } +if ($po_user['type'] >= PO_USER_TYPE_CLIENT) { + display_spool_actions($database, $po_user['id']); + } + +print "
    "; + print "
    \n"; -print " 
    "; -print ""; site_footer($database); site_epilog($database); ?> diff --git a/src/help.php b/src/help.php index 57d5962..580a51f 100644 --- a/src/help.php +++ b/src/help.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,13 +17,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; + +function display_help_navigator($num_of_pages, $index, $helpfiles) { + global $thm_elem; -function display_help_navigator($num_of_pages, $index, $helpfiles, $theme) { $previous_index = $index - 1; $next_index = $index + 1; if ($previous_index < 0) @@ -39,51 +41,20 @@ function display_help_navigator($num_of_pages, $index, $helpfiles, $theme) { $next_page_title = $helpfiles[$next_index][0]; $last_page_index = $num_of_pages - 1; $last_page_title = $helpfiles[$num_of_pages - 1][0]; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - print ""; - print "\"$first_page_title\"/"; - print "\n"; - print ""; - print "\"$previous_page_title\"/\n"; - print " \n"; - print "\n"; - print "\n"; - $button_counter=0; + + print "
    "; + print sprintf($thm_elem['button.first'], "help.php?help=$first_page_index", $first_page_title); + print sprintf($thm_elem['button.previous'], "help.php?help=$previous_page_index", $previous_page_title, ""); for ($i=0; $i < $num_of_pages; $i++) { $current_page_title = $helpfiles[$i][0]; - - print "
    \n"; - $button_counter++; - if ($button_counter == 25) { - $button_counter=0; - print "\n\n"; - } + print sprintf($thm_elem['button.option'], "help.php?help=$i", $current_page_title); } - print "\n"; - print "
    \n"; - print ""; if ($index == $i) - print "\"*\"\n"; + print sprintf($thm_elem['button.option.a'], "help.php?help=$i", $current_page_title); else - print "\"o\"\n"; - print "
    \n"; - print "
     \n"; - print ""; - print "\"$next_page_title\"/\n"; - print "\n"; - print ""; - print "\"$last_page_title\"/\n"; - print "
    \n"; + print sprintf($thm_elem['button.next'], "help.php?help=$next_page_index", $next_page_title, ""); + print sprintf($thm_elem['button.last'], "help.php?help=$last_page_index", $last_page_title); + print "
    "; } $database = site_prolog(); @@ -103,17 +74,16 @@ $helpfiles = array (array("Content", "content.html"), array("Print", "print.html"), array("Search", "search.html"), array("Settings", "settings.html"), - array("Shop", "shop.html"), array("Tools", "tools.html"), array("Front Page", "front.page.html"), array("Administrator", "admin.html")); -site_header($page_width, "Help"); +site_header("Help"); site_navigator(4); $little_hack = $helpfiles[$help_id][0]; site_navigator_status("Help : $little_hack", ""); print " 
    \n"; -display_help_navigator(14, $help_id, $helpfiles, $theme); +display_help_navigator(13, $help_id, $helpfiles); print "

    Please note that this documentation is outdated.

    Visit the Photo Organizer Wiki for current documentation. This will be fixed in a future release.

    \n"; @@ -125,7 +95,7 @@ readfile("help/$little_hack"); print ""; print ""; print " 
    \n"; -display_help_navigator(14, $help_id, $helpfiles, $theme); +display_help_navigator(13, $help_id, $helpfiles); print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/help/admin.html b/src/help/admin.html index 9b862e2..b85db52 100644 --- a/src/help/admin.html +++ b/src/help/admin.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/content.html b/src/help/content.html index 0e16c0c..6a32045 100644 --- a/src/help/content.html +++ b/src/help/content.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -28,7 +28,6 @@
  • Print
  • Search
  • Settings -
  • Shop
  • Tools
  • Front Page
  • Administrator diff --git a/src/help/datebook.html b/src/help/datebook.html index 183d177..af647cb 100644 --- a/src/help/datebook.html +++ b/src/help/datebook.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/folders.albums.html b/src/help/folders.albums.html index e24ec89..10cb047 100644 --- a/src/help/folders.albums.html +++ b/src/help/folders.albums.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/front.page.html b/src/help/front.page.html index b3b7603..7031484 100644 --- a/src/help/front.page.html +++ b/src/help/front.page.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/login.html b/src/help/login.html index 1fccd75..826af77 100644 --- a/src/help/login.html +++ b/src/help/login.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/photo.html b/src/help/photo.html index 968a1d3..216a8b0 100644 --- a/src/help/photo.html +++ b/src/help/photo.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/print.html b/src/help/print.html index 143850f..60263f7 100644 --- a/src/help/print.html +++ b/src/help/print.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/profile.html b/src/help/profile.html index 676ceed..a45b694 100644 --- a/src/help/profile.html +++ b/src/help/profile.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/registration.html b/src/help/registration.html index 9293e3b..3414c81 100644 --- a/src/help/registration.html +++ b/src/help/registration.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/search.html b/src/help/search.html index 7260180..fb32eb3 100644 --- a/src/help/search.html +++ b/src/help/search.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/settings.html b/src/help/settings.html index ab26d2f..d9b394b 100644 --- a/src/help/settings.html +++ b/src/help/settings.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/help/shop.html b/src/help/shop.html deleted file mode 100644 index aec84e7..0000000 --- a/src/help/shop.html +++ /dev/null @@ -1,74 +0,0 @@ - -

    -

    SHOP

    -

    -The shop module allows Photo Organizer users to sell their photos to registered -clients or other PO users. -

    -To set up a shop, you will have to create Shop Categories and within -these categories Shop Items. For instance typical categories and items would be: -

    -

      -
    • Rights of Use
    • -
        -
      • To be used on a magazine front page
      • -
      • To be used for non profit purposes
      • -
      -
    • Prints
    • -
        -
      • 20"x24" framed
      • -
      • 25"x10" non framed
      • -
      -
    -

    -Once Shop Categories and Shop Items are defined, you will have to -define your Photo Items, by defining for each photo the available -Shop Items with pricing information. You can use the -Shop Item Generator to automatically -generate Photo Items for your folders. -

    -Registered users will be able to select these photos (the desired Shop Item), -put them in their basket and order them via the Photo Organizer Shop interface. -After a client submitted an order, that will appear in Your Date Book (you will be notified -via email). The software does not offer (and there are no plans to offer) any credit -card transaction support, therefore payment arrangement has to be done separately. -

    -When the user receives a new order, he/she can allow it's clients to -download the master version of the original once the order is approved (shipped). -The user should specify how many times and for how long will be the client allowed to download -the master version. Default values are taken from the user's configuration. Once the download -counter reached 0 or the download expriy period elapsed, the client will no longer be -able to download the orignal, however the user can renew the client's access by incrementing -the download counter or by extending the expiry period. -

    -To ease the processing of the orders, a special client status has been introduced. -The user can grant some of it's clients a "trusted" status that gives the clients immediate -access to the master version of the originals upon placing an order. Trusted clients -are bound by the same restrictions regarding the number of downloads. -

    -The shop module has two limitations, the first deals with currencies. -Since Photo Organizer is no currency converter tool, -it will not perform any currency conversion, in case you select different -currencies for your photos. Use a single currency for all of your photos. -The second limitation is administrator related. For obvious reasons the -owner of a photo cannot buy it's own photo. -There are no controls to do this. Since the system administrator "owns" -all photos in the system he/she falls in the same criteria as the ordinary -photo owners. Administrators can't shop, sorry. -

    diff --git a/src/help/tools.html b/src/help/tools.html index 9b7068a..bcc7859 100644 --- a/src/help/tools.html +++ b/src/help/tools.html @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/image.display.php b/src/image.display.php index be41c60..293981c 100644 --- a/src/image.display.php +++ b/src/image.display.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,209 +17,165 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/mime.php"; include_once "include/calendar.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $photo_id = pg_escape_string($_REQUEST['image']); $image_size = pg_escape_string($_REQUEST['size']); $version = pg_escape_string(array_key_exists('ver', $_REQUEST) ? $_REQUEST['ver'] : FALSE); +$photo_sel = ""; + if (!$photo_id) { - header("HTTP/1.1 404 Not found"); - exit(); -} + if ($version) { + $photo_sel = ""; + } else { + header("HTTP/1.1 404 Not found"); + exit(); + } + } else { + $photo_sel = "and photo.identifier = '$photo_id'"; + } + +$compress_pages = FALSE; +ini_set('zlib.output_compression', FALSE); $database = site_prolog(); +$cache_ctrl = FALSE; $version_selector = $version ? "photo_version.identifier=$version" : "photo_version.master='t'"; -$photo_data = pg_fetch_row(pg_query($database, " +$photo_data = pg_fetch_assoc(pg_query($database, " select users, folder, - small_image_path, medium_image_path, large_image_path, - access_rights, hide_original, original_image_name + get_image_path(photo_version.identifier, $image_size) as path, + access_rights, hide_original, original_image_name, + can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') as ok from photo left join photo_version on photo.identifier = photo_version.photo where $version_selector - and photo.identifier = '$photo_id'")); + $photo_sel")); if (!$photo_data) { header("HTTP/1.1 404 Not found"); site_epilog($database); exit(); } -$client = ""; +/* A few defaults */ +$increment_counter = TRUE; +$disposition = "inline"; +$owner_user_id = $photo_data['users']; +$image_path = $photo_data['path']; +$file_name = $image_repository_path . "/" . $image_path; +$image_type = substr(strtolower(strrchr ($image_path, ".")), 1); +$original_image_name = "image_$photo_id.version_$version.size_$image_size.$image_type"; -$owner_user_id = $photo_data[0]; -if (($owner_user_id != $po_user['id']) && - ($po_user['type'] > $user_type['disabled'])) { - $client = pg_fetch_row(pg_query($database, " - select identifier - from client - where users='$owner_user_id' - and client='$po_user[id]' - and status=$client_status[accepted]")); -} - -if ($image_size == 3) { - if ($po_user['type'] == $user_type['disabled']) { - $po_user['id'] = "null"; - } - - $all_photo_items_for_sale = pg_query($database, " - select (select max(download_counter) from shop_order where item=photo_item.identifier and shop_order.client = $po_user[id] and transaction is not null) as counter, - (select max(download_expiry_date) from shop_order where item=photo_item.identifier and shop_order.client = $po_user[id] and transaction is not null) as expiry_date, - (select max(shop_order.identifier) from shop_order, shop_transaction, client where shop_order.transaction=shop_transaction.identifier and shop_order.client = client.client and (client.trusted = 't' or shop_transaction.status = '2')) as purchase_confirmed - from photo_item, shop_item - where photo_item.shop_item = shop_item.identifier - and photo=$photo_id"); - - /* check if the original is hidden or bought */ - - $number_of_photos_for_sale = pg_num_rows($all_photo_items_for_sale); - $photo_on_client_order = false; - for ($i=0; $i < $number_of_photos_for_sale; $i++) { - $photo_for_sale = pg_fetch_row($all_photo_items_for_sale, $i); - - if (!$photo_for_sale[2]) - continue; - - if (($photo_for_sale[0] > 0) && (compare_timestamps(date("Y-m-d H:i:s"), $photo_for_sale[1]) > 0)) { - $photo_on_client_order = true; - - pg_query($database, "update shop_order set download_counter=download_counter-1 where identifier=$photo_for_sale[2]"); - break; - } - } - - if (!$photo_on_client_order && - ($photo_data[6] == "t") && - ($po_user['id'] != $owner_user_id) && - ($po_user['type'] != $user_type['administrator'])) { +if ($photo_data['ok'] != 't') { site_epilog($database); header("HTTP/1.1 403 Permission Denied"); exit(); - } -} - -/* if the photo is private and isn't mine, return */ -if (($photo_data[5] == $access['private']) && - ($po_user['id'] != $owner_user_id) && - ($po_user['type'] != $user_type['administrator'])) { - header("HTTP/1.1 403 Permission Denied"); - site_epilog($database); - exit(); -} - -/* if the photo is protected and I am not a customer or this user, and the photo isn't mine, return */ -if (($photo_data[5] == $access['protected']) && - ($po_user['id'] != $owner_user_id) && - ($po_user['type'] != $user_type['administrator']) && - ($client == "")) { - header("HTTP/1.1 403 Permission Denied"); - site_epilog($database); - exit(); -} + } +/* Special Handling */ switch ($image_size) { - default: - case 1: - $image_path = $photo_data[2]; - $disposition = "inline"; + case 1: /* Thumbnails don't get counters incremented. */ + $increment_counter = FALSE; break; - case 2: - /* Update view counter if it's not viewed by its owner. */ - if ($po_user['id'] != $owner_user_id) { - pg_query($database, "update photo set views=views+1 where identifier=$photo_id"); - } - $image_path = $photo_data[3]; - $disposition = "inline"; - break; - case 3: - /* Update view counter if it's not viewed by its owner. */ - if ($po_user['id'] != $owner_user_id) { - pg_query($database, "update photo set views=views+1 where identifier=$photo_id"); - } - $image_path = $photo_data[4]; + case 3: /* Originals get extra tests and a name change. */ $disposition = "attachment; "; + + if (($photo_data['hide_original'] == "t") && + ($po_user['id'] != $owner_user_id) && + ($po_user['type'] != PO_USER_TYPE_ADMIN)) { + site_epilog($database); + header("HTTP/1.1 403 Permission Denied"); + exit(); + } + if ($photo_data['original_image_name']) { + $original_image_name = $photo_data['original_image_name']; + $image_type = substr(strtolower(strrchr ($original_image_name, ".")), 1); + } + break; + default: + /* Do nothing */ break; } +/* Increment counter as needed */ +if ($increment_counter && + ($po_user['id'] != $owner_user_id) && + ($po_user['type'] != PO_USER_TYPE_ADMIN)) { + pg_query($database, "update photo set views=views+1 where identifier=$photo_id"); + } + site_epilog($database); -$image_type = substr(strtolower(strrchr ($image_path, ".")), 1); -$mime = $mime_type[$image_type]['type']; - -switch ($image_size) { - case 1: - $default_path = "themes/null.photo.small.gif"; - $original_image_name = "file.thumbnail.$photo_id.$image_type"; - break; - default: - case 2: - $default_path = "themes/null.photo.large.gif"; - $original_image_name = "file.preview.$photo_id.$image_type"; - break; - case 3: - $default_path = "themes/null.photo.large.gif"; - if ($photo_data[7]) { - $original_image_name = $photo_data[7]; - $image_type = substr(strtolower(strrchr ($original_image_name, ".")), 1); - } - else - $original_image_name = "file.$photo_id.$image_type"; -} - -$file_name = $default_path; -if (is_file($image_repository_path . "/" . $image_path)) { - $file_name = $image_repository_path . "/" . $image_path; -} - -/* Cache control by THOMAS WENRICH wet@chello.at*/ - -/* We are about to deliver the image. */ -/* It's time to handle the browser caching: */ -/* - Images expire after few seconds. */ -/* - We handle the If-Modified-Since header for compliant browsers. */ - -$time_of_last_modification = time(); -$file_length = 0; -if ($stat = stat($file_name)) { - $time_of_last_modification = $stat[9]; - $file_length = $stat[7]; -} - -$if_modified_time = -1; - -if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { - $if_modified_since = explode(';', $_SERVER['HTTP_IF_MODIFIED_SINCE']); - $if_modified_time = strtotime($if_modified_since[0]); -} - -if (($if_modified_time != -1) && ($time_of_last_modification <= $if_modified_time)) { - header("HTTP/1.1 304 Not modified"); +if (!is_readable($file_name)) { + header("HTTP/1.1 500 Internal Server Error"); exit(0); } -$mod_gmt = gmdate("D, d M Y H:i:s", $time_of_last_modification) ." GMT"; +/* mime types */ +$mime = $mime_type[$image_type]['type']; + +/* If we're given an If-Modified-Since header, use it */ + +$stat = stat($file_name); + +if ($stat === FALSE) { + header("HTTP/1.1 404 Not found"); + exit(); +} + +$time_of_last_modification = $stat[9]; +$file_length = $stat[7]; +$if_modified_since = FALSE; + +$rfc1123 = gmdate("r", $time_of_last_modification) .' GMT'; +$rfc1036 = gmdate('l, d-M-y H:i:s ', $time_of_last_modification) . ' GMT'; +$ctime = gmdate('D M j H:i:s', $time_of_last_modification); + +if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { + $if_modified_since = stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']); + } + +if ($if_modified_since !== FALSE) { + foreach (array($rfc1123, $rfc1036, $ctime) as $d) { + if ($d == $if_modified_since) { + header("HTTP/1.1 304 Not modified"); + exit(0); + } + } + } + +switch ($photo_data['access_rights']) { + case $access['public']: + $cache_ctrl = "public"; + break; + default: + $cache_ctrl = "private"; + break; + } /* with exception of Content-Disposition, this should be the same headers */ /* like the headers of a file from the file system */ header("Content-type: $mime/$image_type"); -header("Content-Disposition: $disposition; filename=$original_image_name; modification-date=\"$mod_gmt\";"); -header("Last-Modified: $mod_gmt"); +header("Content-Disposition: $disposition; filename=$original_image_name; modification-date=\"$rfc1123\";"); +header("Last-Modified: $rfc1123"); -$browser = $_SERVER['HTTP_USER_AGENT']; -if (strpos($browser, "MSIE 5")) { - header("Cache-Control: pre-check=" . $expire); +/* Add an expires: header */ +$expires = gmdate("r", (time() + 604800)) .' GMT'; /* 1 week */ + +header("Expires: $expires"); + +if ($cache_ctrl != FALSE) { + header("Cache-Control: $cache_ctrl"); } -if ($file_length) { - header("Content-Length: $file_length"); -} +header("Content-Length: $file_length"); $file_descriptor = fopen($file_name, 'rb'); if ($file_descriptor === false) { diff --git a/src/include/admin.php b/src/include/admin.php index 46bc2d9..56ea64c 100644 --- a/src/include/admin.php +++ b/src/include/admin.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,29 +17,60 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -$admin_data = array("repository" => array("idx" => 1, "active_img" => "$theme/navigator.ad.image.repository.a.gif", "img" => "$theme/navigator.ad.image.repository.gif", link => "admin.php?selector=1", "alt" => " Image Repository "), - "new_user" => array("idx" => 2, "active_img" => "$theme/navigator.ad.new.user.preferences.a.gif", "img" => "$theme/navigator.ad.new.user.preferences.gif", link => "admin.php?selector=2", "alt" => " New User Preferences "), - "users_n_clients" => array("idx" => 3, "active_img" => "$theme/navigator.ad.users.and.clients.a.gif", "img" => "$theme/navigator.ad.users.and.clients.gif", link => "admin.php?selector=3", "alt" => " Users and Clients "), - "front_page" => array("idx" => 4, "active_img" => "$theme/navigator.ad.frontpage.a.gif", "img" => "$theme/navigator.ad.frontpage.gif", link => "admin.php?selector=4", "alt" => " Front Page ")); +$admin_data = array(); +function admin_i18n_data() { + global $strings; + global $admin_data; -function display_image_repository($image_repository_path, $system_preferences) { - global $color; + $admin_data = array("repository" => array("idx" => 1, 'link' => "admin.php?selector=1", "alt" => $strings['admin']['image_repository']), + "users_n_clients" => array("idx" => 2, 'link' => "admin.php?selector=2", "alt" => $strings['admin']['users_clients']), + "front_page" => array("idx" => 3, 'link' => "admin.php?selector=3", "alt" => $strings['admin']['front_page'])); +} - print "\n"; +$generate_i18n_data[] = "admin_i18n_data"; + +function emit_enable_disable_text($value) { + global $strings; + + if ($value == 't') + return $strings['generic']['enabled']; + else + return $strings['generic']['disabled']; +} + +function emit_user_quota($value, $type) { + global $strings; + + if ($type == 1) { + $value = round($value/1048576, 2); + } + + if ($value == 0) + return $strings['generic']['unlimited']; + else + return "$value" . (($type == 1) ? " MB" : ""); +} + +function display_image_repository($database, $image_repository_path) { + global $strings; + global $po_options_default; + + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['generic']['volume'], 'width="25%"'); + print emit_th($strings['generic']['current'], "width=\"10%\""); + print emit_th($strings['generic']['size'], "width=\"20%\""); + print emit_th($strings['generic']['files'], "width=\"10%\""); + print emit_th($strings['generic']['last_mod'], "width=\"20%\""); + print emit_th("", "width=\"5%\""); print "\n"; $files = array(); $i = 0; + + $curr_volume = readlink($image_repository_path."/current"); + if ($handle = opendir($image_repository_path)) { while (false !== ($file_name = readdir($handle))) { $files[$i++] = $file_name; @@ -50,76 +81,35 @@ function display_image_repository($image_repository_path, $system_preferences) { foreach($files as $file_name) { if ($file_name == "." || $file_name == "..") continue; + if ($file_name == "current") + continue; - $size = dirsize($image_repository_path ."/". $file_name); + $size = dirsize($database, $file_name); $size['size'] = round($size['size']/1048576, 2); $stat = stat($image_repository_path ."/". $file_name); - - $stat[9] = date("F j, Y", $stat[9]); + $max_size = $po_options_default['volume_max_size']; + $stat[9] = strftime($strings['formats']['date'], $stat[9]); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; + print emit_td($file_name); + print emit_td($file_name == $curr_volume ? $strings['generic']['yes'] : ""); + print emit_td("$size[size] / $max_size MB ". sprintf("(%02d%%)", $size['size']/$max_size*100)); + print emit_td($size['files']); + print emit_td($stat[9]); + print emit_td(emit_a("admin.volume.edit.php?volume=$file_name", $strings['generic']['edit'])); + print "\n"; } } print "
    VolumeCurrentMax SizeSizeFilesSubdirectoriesLast Modified
    $file_name"; print $file_name == $system_preferences[4] ? "Yes" : "No"; print ""; - if ($file_name == $system_preferences[4]) - print "
    $system_preferences[5] Mb
    "; - print "
    $size[size] Mb$size[files]$size[directories]$stat[9]"; - print "Edit"; - print "
    \n"; $available = round(disk_free_space($image_repository_path)/1048576, 2); - print " 
    Available disk space: $available Mb
    "; -} - - -function display_new_user_properties($database, $system_preferences) { - global $color; - - $default_label = pg_fetch_row(pg_query($database, " - select manufacturer.name, label.name, paper.name - from label, paper, manufacturer - where label.paper=paper.identifier - and label.manufacturer = manufacturer.identifier - and label.identifier = $system_preferences[3]")); - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    User TypeBulk UploadShopSharedQuota SizeQuota CountDefault PaperDefault Label
    $system_preferences[0]"; display_enable_disable_text($system_preferences[1]); print ""; display_enable_disable_text($system_preferences[6]); print ""; display_yes_no_text($system_preferences[9]); print ""; display_user_quota($system_preferences[7], 1); print ""; display_user_quota($system_preferences[8], 0); print "$system_preferences[2]$default_label[0], $default_label[1], $default_label[2]Edit
    \n"; + print "
    ".$strings['admin']['avail_disk_space'] . ": $available MB
    "; } function display_users_and_clients($database, $my_user_id) { - global $color; - global $theme; + global $thm_elem; + global $strings; + global $po_options_default; $num_of_users = pg_fetch_row(pg_query($database, "select count_users()")); $num_of_photos = pg_fetch_row(pg_query($database, "select count_photos()")); @@ -127,30 +117,33 @@ function display_users_and_clients($database, $my_user_id) { $num_of_photo_versions[0] -= $num_of_photos[0]; $user_list = pg_query($database, " - select users.identifier, last_name, first_name, member_since, value, user_type.identifier, bulk_upload_enable, shop_enable, - quota_size, quota_count, shared, username - from users, user_type, preferences + select users.identifier, last_name, first_name, member_since, + value, user_type.identifier, + get_user_pref(users.identifier, 'bulk_upload_enable'), + get_user_pref(users.identifier, 'last_updated'), + get_user_pref(users.identifier, 'quota_count'), + get_user_pref(users.identifier, 'quota_size'), + username, hide + from users, user_type where users.type=user_type.identifier - and users.preferences=preferences.identifier order by users.member_since desc"); - print "\n"; + print "
    \n"; print "\n"; - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - print "\n"; + print emit_th($strings['generic']['name'], "width=\"13%\" align=\"left\""); + print emit_th($strings['generic']['photos'], "width=\"7%\""); + print emit_th($strings['generic']['space'], "width=\"7%\""); + print emit_th($strings['generic']['type'], "width=\"6%\""); + print emit_th($strings['generic']['hide'], "width=\"6%\""); + print emit_th($strings['generic']['bulk_upload'], "width=\"6%\""); + print emit_th($strings['generic']['quota_count'], "width=\"6%\""); + print emit_th($strings['generic']['quota_size'], "width=\"6%\""); + print emit_th($strings['generic']['member_since'], "width=\"7%\""); + print emit_th($strings['generic']['last_login'], "width=\"7%\""); + print emit_th(emit_a("register.php", $strings['generic']['register']), 'width="8%" colspan="2"'); print "\n"; + $total_storage_space = 0; $user_count = pg_num_rows($user_list); for ($i=0; $i < $user_count; $i++) { $user = pg_fetch_row($user_list, $i); @@ -158,61 +151,72 @@ function display_users_and_clients($database, $my_user_id) { $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($user[0])")); $photo_versions_by_user = pg_fetch_row(pg_query($database, "select count_photo_versions_by_user($user[0])")); $used_storage_space = count_storage_space_by_user($database, $user[0]); + $total_storage_space += $used_storage_space; $used_storage_space = round($used_storage_space/1048576, 2); $photo_versions_by_user[0] -= $photos_by_user[0]; + if (!$user[6]) $user[6] = $po_options_default['bulk_upload_enable']; + if (!$user[8]) $user[8] = $po_options_default['quota_count']; + if (!$user[9]) $user[9] = $po_options_default['quota_size']; + print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_td(emit_a("user.php?user=$user[0]", "$user[1], $user[2]") . "($user[10])", 'align="left"'); + print emit_td($photos_by_user[0] . ($photo_versions_by_user[0] > 0 ? " + $photo_versions_by_user[0]" : "")); + print emit_td("$used_storage_space MB"); + print emit_td($user[4]); + print emit_td(emit_enable_disable_text($user[11])); + print emit_td(emit_enable_disable_text($user[6])); + print emit_td(emit_user_quota($user[8], 0)); + print emit_td(emit_user_quota($user[9], 1)); + print emit_td(emit_date_html($user[3], 'date')); + if (($user[7] == null) || ($user[7] == '')) + print emit_td("--"); + else + print emit_td(emit_date_html(date("Y-m-d H:i", $user[7]), 'date')); - print "\n"; - print "\n"; - - print "\n"; - print "\n"; - if ($user[1] == $my_user_id) { - print "\n"; + print emit_td(emit_a("admin.user.edit.php?user=$user[0]",$strings['generic']['edit'])); + /* Don't let the admin delete themselves */ + if ($my_user_id != $user[0]) { + print emit_td(emit_a("admin.user.del.php?user=$user[0]",$strings['generic']['delete'])); } else { - print "\n"; + print emit_td(""); } print "\n"; } print "
    NamePhotosSpaceTypeBulk UploadShopSharedQuota CountQuota SizeMember Since 
    $user[1], $user[2] ($user[11])$photos_by_user[0]"; - if ($photo_versions_by_user[0] > 0) - print ", $photo_versions_by_user[0]"; - print "$used_storage_space Mb$user[4]"; display_enable_disable_text($user[6]); print""; display_enable_disable_text($user[7]); print""; display_yes_no_text($user[10]); print""; display_user_quota($user[9], 0); print""; display_user_quota($user[8], 1); print"" . generate_date_html($user[3], 'date', $my_user[0] == "" ? 0 : 1) . "EditDelete
    \n"; - print " 
    \n"; - print "$num_of_users[0] members storing $num_of_photos[0] photos"; + $total_storage_space = round($total_storage_space/1048576, 2); + + print "
    \n"; + print "$num_of_users[0] ".$strings['generic']['members_storing']." $num_of_photos[0] ".$strings['generic']['photos']; if ($num_of_photo_versions[0] > 0) { - print " and $num_of_photo_versions[0] versions"; + print " + $num_of_photo_versions[0] ".$strings['generic']['add_versions']; } + print " ".$strings['generic']['in']." $total_storage_space MB"; + print "
    \n"; - print " 
    \n"; - print "
    \"Register\"/
    "; + print "
    \n"; } function display_front_page_editor($file_name) { - global $color; - global $theme; + global $thm_elem; + global $strings; + /* Open the current front page */ $file_descriptor = fopen ($file_name, "r"); $file_content = fread($file_descriptor, filesize($file_name)); $file_content = htmlspecialchars($file_content); fclose($file_descriptor); - print "
    \n"; - print "\n"; + print "

    "; - print " 
    "; + print "\n"; + + print "\n"; + + print $thm_elem['button.save.changes']; - print "\n"; print "
    \n"; } diff --git a/src/include/barcode.php b/src/include/barcode.php index 0878206..51e5848 100644 --- a/src/include/barcode.php +++ b/src/include/barcode.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/include/calendar.php b/src/include/calendar.php index f8a3bbb..08098d4 100644 --- a/src/include/calendar.php +++ b/src/include/calendar.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,35 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -$dayNames = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); -$dayNamesShort = array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); -$monthNames = array(1 => "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); function display_hour_combo($identifier, $value, $display_null) { print "\n"; } function display_minute_combo($identifier, $value) { print "\n"; } @@ -99,7 +89,22 @@ function compare_timestamps($timestamp_1, $timestamp_2) { return 0; } -function display_date_input_form($tag_id, $timestamp) { +function emit_calendar_include() { + global $strings; + + $rval = ""; + $rval .= ""; + $rval .= ""; + $rval .= "\n"; + return $rval; +} + +function emit_date_input_form($tag_id, $timestamp) { + global $strings; + + $rval = emit_calendar_include(); + $disp = 'full_date'; + if ($timestamp) { $year = substr($timestamp, 0, 4); $month = substr($timestamp, 5, 2); @@ -107,28 +112,39 @@ function display_date_input_form($tag_id, $timestamp) { $hour = substr($timestamp, 11, 2); $min = substr($timestamp, 14, 2); $sec = substr($timestamp, 17, 2); + + if (!$hour || !$min || !$sec) { + $hour = 0; + $min = 0; + $sec = 0; + $disp = 'date'; + } + $timestamp = "$year-$month-$day $hour:$min:$sec"; - $display_timestamp = date ("l, F d, Y H:i:s", mktime ($hour, $min, $sec, $month, $day, $year)); - $display_title = "Click to adjust date"; + $display_timestamp = emit_date_html($timestamp, $disp); + $display_title = $strings['datebook']['adjust_date']; } else { $timestamp = "null"; - $display_timestamp = "NOT ENTERED"; - $display_title = "Click to set date"; + $display_timestamp = $strings['datebook']['blank']; + $display_title = $strings['datebook']['set_date']; } - print "$display_timestamp  "; - print ""; - print "\n"; + $rval .= "$display_timestamp"; + $rval .= "[X]"; + $rval .= ""; + $rval .= "\n"; + + return $rval; } function check_date_validity($timestamp) { @@ -148,73 +164,70 @@ function check_date_validity($timestamp) { return "'" . $date . "'"; } -function generate_date_html($timestamp, $format, $link) { - $month_string_short = array('NULL','Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); - $month_string_long = array('NULL','January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); +function emit_date_html($timestamp, $format) { + global $po_user; + global $strings; + if ($po_user['type'] > PO_USER_TYPE_DISABLED) + $link = TRUE; + else + $link = FALSE; + if (!$timestamp) return ""; + $year = substr($timestamp, 0, 4); + $month = substr($timestamp, 5, 2); + $day = substr($timestamp, 8, 2); + $hour = substr($timestamp, 11, 2); + $minute = substr($timestamp, 14, 2); + + $timestamp = strtotime($timestamp); + + $date_format = FALSE; + $time_format = FALSE; + switch ($format) { + case 'full_date': + $date_format = $strings['formats']['full_date']; + break; case 'full': + $date_format = $strings['formats']['date']; + $time_format = $strings['formats']['time']; + break; case 'date': + $date_format = $strings['formats']['date']; + break; case 'short_date': - $year = substr($timestamp, 0, 4); - $month = substr($timestamp, 5, 2); - $day = substr($timestamp, 8, 2); - if ($format=='short_date') - $month_string = $month_string_short; - else - $month_string = $month_string_long; - - for ($counter=0; $counter < $month; $counter++) - next($month_string); - $current_month_string = current($month_string); - - if ($format=='date') - break; + $date_format = $strings['formats']['short_date']; + break; case 'time': - $time = substr($timestamp, 11, 5); + $link = FALSE; + $time_format = $strings['formats']['time']; + break; } $html_string = ""; - switch ($format) { - case 'full': - if ($link) - $html_string .= "$current_month_string $day, $year at $time"; - else - $html_string .= "$current_month_string $day, $year at $time"; - break; - case 'date': - case 'short_date': - if ($link) - $html_string .= "$current_month_string $day, $year"; - else - $html_string .= "$current_month_string $day, $year"; - break; - case 'time': - $html_string .= "$time"; break; + + if ($link) + $html_string = ""; + + if ($date_format) { + $html_string .= strftime($date_format, $timestamp); } + + if ($link) + $html_string .= ""; + + if ($time_format) { + if ($date_format) + $html_string .= " @ "; + $html_string .= strftime($time_format, $timestamp); + } + return $html_string; } - -function display_time($time, $format) { - switch ($format) { - case 'full': - print "$time"; - break; - case 'minute': - $minute = substr($time, 3, 2); - case 'hour': - $hour = substr($time, 0, 2); - print "$hour"; - if ($minute != "") - print ":$minute"; - } -} - - function getDaysInMonth($year, $month) { if ($month < 1 || $month > 12) return 0; @@ -227,9 +240,9 @@ function getDaysInMonth($year, $month) { if ($year%100 == 0) { if ($year%400 == 0) $day = 29; - } - else + } else { $day = 29; + } } } return $day; diff --git a/src/include/color.php b/src/include/color.php index c0bbd64..7567fef 100644 --- a/src/include/color.php +++ b/src/include/color.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,7 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - $im_color_map = array( array("name" => "alice blue", "hex" => "f0f8ff"), array("name" => "antique white", "hex" => "faebd7"), @@ -280,107 +279,56 @@ function display_im_colorspace_combo($identifier, $current_value) { print ""; } function display_im_quality_combo($identifier, $current_value) { + global $strings; + print ""; } function display_im_sharpen_combo($identifier, $current_value) { - print ""; -} - -function display_im_threshold_combo($identifier, $current_value) { print ""; } -function display_im_amount_combo($identifier, $current_value) { - print ""; -} - -function display_im_gamma_combo($identifier, $current_value) { - print ""; -} - function display_im_color_combo($identifier, $current_value) { global $im_color_map; print ""; for ($i=0; $i < 10; $i++) { - if ($i == $current_value) - print ""; - else - print ""; + print emit_option($i, $i, $i == $current_value); } for ($i=10; $i < 60; $i += 10) { - if ($i == $current_value) - print ""; - else - print ""; + print emit_option($i, $i, $i == $current_value); } print ""; } function display_im_watermark_brightness($identifier, $current_value) { + global $strings; + print ""; } function display_im_watermark_mask_location($identifier, $current_value) { - if ($current_value == "northwest") - $northwest_checked = "checked"; - if ($current_value == "west") - $west_checked = "checked"; - if ($current_value == "southwest") - $southwest_checked = "checked"; - if ($current_value == "north") - $north_checked = "checked"; - if ($current_value == "center") - $center_checked = "checked"; - if ($current_value == "south") - $south_checked = "checked"; - if ($current_value == "northeast") - $northeast_checked = "checked"; - if ($current_value == "east") - $east_checked = "checked"; - if ($current_value == "southeast") - $southeast_checked = "checked"; + global $strings; - print "\n"; + $northwest_checked = $northeast_checked = $north_checked = ""; + $southwest_checked = $southeast_checked = $south_checked = ""; + $west_checked = $center_checked = $east_checked = ""; + + if ($current_value == "northwest") + $northwest_checked = "checked=\"checked\""; + if ($current_value == "west") + $west_checked = "checked=\"checked\""; + if ($current_value == "southwest") + $southwest_checked = "checked=\"checked\""; + if ($current_value == "north") + $north_checked = "checked=\"checked\""; + if ($current_value == "center") + $center_checked = "checked=\"checked\""; + if ($current_value == "south") + $south_checked = "checked=\"checked\""; + if ($current_value == "northeast") + $northeast_checked = "checked=\"checked\""; + if ($current_value == "east") + $east_checked = "checked=\"checked\""; + if ($current_value == "southeast") + $southeast_checked = "checked=\"checked\""; + + print "
    \n"; print ""; - print ""; - print ""; - print ""; + print emit_td("
    ".$strings['generic']['northwest']); + print emit_td("
    ".$strings['generic']['north']); + print emit_td("
    ".$strings['generic']['northeast']); print "\n"; print ""; - print ""; - print ""; - print ""; + print emit_td("
    ".$strings['generic']['west']); + print emit_td("
    ".$strings['generic']['center']); + print emit_td("
    ".$strings['generic']['east']); print "\n"; print ""; - print ""; - print ""; - print ""; + print emit_td("
    ".$strings['generic']['southwest']); + print emit_td("
    ".$strings['generic']['south']); + print emit_td("
    ".$strings['generic']['southeast']); print "\n"; print "
    North WestNorthNorth East
    WestCenterEast
    South WestSouthSouth East
    \n"; } -function display_dcraw_float_resolution_combo($identifier, $current_value, $max_value) { - print ""; -} - function display_dcraw_white_balance_combo($identifier, $current_value) { + global $strings; + print ""; } function display_dcraw_bitdepth_combo($identifier, $current_value) { print ""; } diff --git a/src/include/common.php b/src/include/common.php index 801935c..e70fa13 100644 --- a/src/include/common.php +++ b/src/include/common.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -19,10 +19,6 @@ include_once "calendar.php"; -function version() { - return "2.33e"; -} - function xml_to_html($xml_code) { $xml_code = ereg_replace("<", "<", $xml_code); $xml_code = ereg_replace(">", ">", $xml_code); @@ -31,30 +27,72 @@ function xml_to_html($xml_code) { return $xml_code; } +function emit_a($ref, $value, $attrs = "") { + return "$value\n"; +} + +function emit_td($value, $attrs = "") { + return "$value\n"; +} + +function emit_th($value, $attrs = "") { + return "$value\n"; +} + +function emit_option($value, $text, $selected, $disabled = FALSE) { + $sel = ""; + + if ($selected === TRUE) + $sel = ' selected="selected" '; + + if ($disabled === TRUE) + $sel .= ' disabled="disabled" '; + + return "\n"; +} + +function emit_float_combo($identifier, $current_value, + $min_value, $max_value, $step) { + global $strings; + + $rval = ""; + return $rval; +} + function get_path_to_folder($database, $folder_id) { + global $strings; + $stack_size = 0; - if ($folder_id == "") $folder_id = 0; - - $folder_data = pg_fetch_row(pg_query($database, " - select parent_folder, folder.caption + $folder_data = pg_fetch_assoc(pg_query($database, " + select parent_folder, caption from folder - where folder.identifier = '$folder_id'")); - $folder_id = $folder_data[0]; + where identifier = '$folder_id'")); + $folder_id = $folder_data['parent_folder']; if ($folder_id == "") return; do { - $folder_data = pg_fetch_row(pg_query($database, " - select parent_folder, folder.caption + $folder_data = pg_fetch_assoc(pg_query($database, " + select parent_folder, caption from folder - where folder.identifier = '$folder_id'")); - $folder_data[1] = strip_tags($folder_data[1]); - $folder_data[1] = makeZanza($folder_data[1], "No caption"); - $stack[$stack_size] = "$folder_data[1]"; - $folder_id = $folder_data[0]; - $stack_size++; + where identifier = '$folder_id'")); + $folder_data['caption'] = strip_tags($folder_data['caption']); + $folder_data['caption'] = makeZanza($folder_data['caption'], +$strings['photo']['no_title']); + $stack[$stack_size++] = emit_a("folder.php?folder=$folder_id", $folder_data['caption']); + $folder_id = $folder_data['parent_folder']; } while ($folder_id); $path = ""; @@ -65,29 +103,30 @@ function get_path_to_folder($database, $folder_id) { return $path; } -function get_path_to_album($database, $folder_id) { +function get_path_to_album($database, $album_id) { + global $strings; + $stack_size = 0; - $folder_data = pg_fetch_row(pg_query($database, " - select parent_album, album.caption + $album_data = pg_fetch_assoc(pg_query($database, " + select parent_album, caption from album - where album.identifier = '$folder_id'")); - $folder_id = $folder_data[0]; + where identifier = '$album_id'")); + $album_id = $album_data['parent_album']; - if ($folder_id == "") + if ($album_id == "") return; do { - $folder_data = pg_fetch_row(pg_query($database, " - select parent_album, album.caption + $album_data = pg_fetch_assoc(pg_query($database, " + select parent_album, caption from album - where album.identifier = '$folder_id'")); - $folder_data[1] = strip_tags($folder_data[1]); - $folder_data[1] = makeZanza($folder_data[1], "No caption"); - $stack[$stack_size] = "$folder_data[1]"; - $folder_id = $folder_data[0]; - $stack_size++; - } while ($folder_id); + where identifier = '$album_id'")); + $album_data['caption'] = strip_tags($album_data['caption']); + $album_data['caption'] = makeZanza($album_data['caption'], $strings['photo']['no_title']); + $stack[$stack_size++] = "$album_data[caption]"; + $album_id = $album_data['parent_album']; + } while ($album_id); $path = ""; for ($i = $stack_size - 1; $i >= 0; $i--) { @@ -98,256 +137,101 @@ function get_path_to_album($database, $folder_id) { } function get_photo_title($caption, $title) { + global $strings; + $new_title = $title ? $title : $caption; if (!$new_title) - $new_title = "No Title"; + $new_title = $strings['photo']['no_title']; + return $new_title; } -function display_data_decoding_radio() { - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "
     Skip1st2nd3rd
    EXIF
    IPTC
    XMP
    \n"; -} - function display_storage_location_combo($identifier, $current_value) { + global $strings; + print ""; } -function display_folder_view_combo($identifier, $current_value) { - print ""; -} +function display_photos_per_page_combo($identifier, $current_value, $wrapped=TRUE) { + global $thm_elem; + global $strings; -function display_num_of_rows_combo($identifier, $current_value, $max_row) { - print ""; -} - -function display_num_of_columns_combo($identifier, $current_value) { print ""; -} - -function display_image_size($identifier, $current_value) { - $values = array(100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800); - print ""; } function display_print_format_combo($identifier, $current_value) { print ""; } -function display_type_combo($identifier, $current_value) { - print ""; -} +function display_popup_delay_combo($identifier, $popup_delay, $popup_enabled) { + global $strings; -function display_popup_delay_combo($identifier, $popup_delay, $popup_enable) { print ""; } function display_first_day_combo($identifier, $current_value) { + global $dayNames; + print ""; } function display_search_engine_type_combo($identifier, $current_value) { + global $strings; + global $cbir_host; + global $cbir_port; + print ""; } function display_colorspace_combo($identifier, $current_value) { + global $strings; + print ""; } @@ -368,338 +252,227 @@ function display_photo_index_status($offset, $limit, $num_of_items) { return "$first_index-$last_index of $num_of_items"; } -function display_frame_top($width, $height, $border, $bgcolor, $theme) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \"\"\"\"
    \n"; -} +function emit_yes_no_text($value) { + global $strings; -function display_frame_bottom($width, $height, $border, $theme) { - print "
    \"\"\"\"/
    \n"; -} - -function display_yes_no_text($value) { if ($value == 't') - print "Yes"; + return $strings['generic']['yes']; else - print "No"; + return $strings['generic']['no']; } - function display_yes_no_combo($item_name, $value) { - print "\n"; + print emit_yes_no_combo($item_name, $value); } -function display_enable_disable_text($value) { - if ($value == 't') - print "Enabled"; - else - print "Disabled"; +function emit_yes_no_combo($item_name, $value) { + global $strings; + $val = ""; + + $val .= "\n"; + return $val; } -function display_user_quota($value, $type) { - if ($type == 1) { - $value = round($value/1048576, 2); - } +function emit_filetype_combo($item_name, $value) { + global $strings; + $val = ""; - if ($value == 0) - print "Unlimited"; - else { - print "$value"; - if ($type == 1) - print " Mb"; - } + $val .= "\n"; + return $val; } -function display_enable_disable_combo($item_name, $value) { - print "\n"; +function emit_enable_disable_combo($item_name, $value) { + global $strings; + + $val = "\n"; + return $val; } function orientation_to_name($database, $orientation) { - - $orients = pg_query($database, "select name from orientations where identifier = $orientation"); - if (pg_num_rows($orients)) { - $orients = pg_fetch_row($orients); - return $orients[0]; - } - return "Unknown ($orientation)"; + global $strings; + + $orients = pg_query($database, "select name from orientations where identifier = $orientation"); + if (pg_num_rows($orients)) { + $orients = pg_fetch_assoc($orients); + return $orients['name']; + } + return $strings['generic']['unknown']." ($orientation)"; } function orientation_to_xform($database, $orientation) { + global $strings; - $orients = pg_query($database, "select im_transform from orientations where identifier = $orientation"); - if (pg_num_rows($orients)) { - $orients = pg_fetch_row($orients); - return $orients[0]; - } - return ""; + $orients = pg_query($database, "select im_transform from orientations where identifier = $orientation"); + if (pg_num_rows($orients)) { + $orients = pg_fetch_assoc($orients); + return $orients['im_transform']; + } + return ""; } function orientation_id_from_string($database, $name) { $orients = pg_query($database, "select identifier from orientations where name = '$name'"); if (pg_num_rows($orients)) { - $orients = pg_fetch_row($orients); - return $orients[0]; + $orients = pg_fetch_assoc($orients); + return $orients['identifier']; } return "1"; } -function display_icc_profiles_combo($item_name, $value) { - global $icc_profiles; - $num_of_icc_profiles = count($icc_profiles) + 1; - - print "\n"; -} - function display_access_combo($item_name, $value, $kind) { + global $strings; + print "\n"; } function display_hide_original_combo($item_name, $value) { + global $strings; + print "\n"; } function display_download_counter_combo($item_name, $value) { print "\n"; } function display_download_expiry_date_combo($item_name, $value) { + global $strings; + print "\n"; } -function display_photo_navigator($display_type, $arguments, $user_id, $mode, $offset, $limit, $num_of_items) { - global $theme; +function display_photo_navigator($hyperlink, $offset, $limit, $num_of_items) { + global $thm_elem; + global $strings; + global $po_options; - if ($limit < $num_of_items) { - $last_photo_offset = $limit * floor($num_of_items/$limit); + if ($limit <= 0) + $limit = 1; - $previous_photo_offset = $offset - $limit; - $next_photo_offset = $offset + $limit; + if (($offset > 0) || + ($limit < $num_of_items)) { + $last = $limit * floor($num_of_items/$limit); - if ($previous_photo_offset < 0) - $previous_photo_offset = 0; + $previous = $offset - $limit; + $next = $offset + $limit; - if ($next_photo_offset > $last_photo_offset) - $next_photo_offset = $last_photo_offset; + if ($previous < 0) + $previous = 0; - if ($display_type == "folder") { - $hyperlink = "folder.php?folder=$mode$arguments"; - } - else if ($display_type == "search_general") { - $hyperlink = "search.text.general.php?search_string=$mode$arguments"; - } - else if ($display_type == "search_advanced") { - $hyperlink = "search.text.advanced.php?search_string=$mode$arguments"; - } - else if ($display_type == "album") { - $hyperlink = "album.php?album=$mode$arguments"; - } + if ($next > $last) + $next = $last; + + print "
    "; + print sprintf($thm_elem['button.first'], "$hyperlink&offset=0", $strings['generic']['page']); + print sprintf($thm_elem['button.previous'], "$hyperlink&offset=$previous", $strings['generic']['page'], ""); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - print ""; - print "\"First\"/"; - print "\n"; - print ""; - print "\"Previous\"/\n"; - print " \n"; - print "\n"; - print "\n"; - $button_counter=0; for ($i=0; $i < ceil($num_of_items/$limit); $i++) { - print "\n"; - $button_counter++; - if ($button_counter == 35) { - $button_counter=0; - print "\n\n"; - } + print sprintf($thm_elem['button.option'], "$hyperlink&offset=$aux", "$aux1-$aux2"); } - print "\n"; - print "
    \n"; $aux=$i*$limit; - print ""; - if (($aux) == $offset) - print "\"*\"/\n"; + $aux1 = $aux + 1; + $aux2=($i+1)*$limit; + if ($aux2 > $num_of_items) $aux2 = $num_of_items; + + if ($aux == $offset) + print sprintf($thm_elem['button.option.a'], "$hyperlink&offset=$aux", "$aux1-$aux2"); + else - print "\"o\"/\n"; - print "
    \n"; - print "
     \n"; - print ""; - print "\"Next\"/\n"; - print "\n"; - print ""; - print "\"Last\"/\n"; - print "
    \n"; - } + print sprintf($thm_elem['button.next'], "$hyperlink&offset=$next", $strings['generic']['page'], ""); + print sprintf($thm_elem['button.last'], "$hyperlink&offset=$last", $strings['generic']['page']); + print "
    "; + } } -function display_moveto_folder_entry($folder_data, $folder_id, $shift, $parameter) { +function display_moveto_folder_entry($folder_data, $folder_id, $shift, $disabled) { + $zanza = substr($folder_data[1], 0, 25); - print "\n"; + for ($i = 0; $i < $shift; $i++) { + $zanza = "  " . $zanza; + } + + print emit_option($folder_data[0], $zanza, $folder_data[0] == $folder_id, $disabled); } -function display_moveto_recursive($folder_tmp, $folder_data, $folder_id, $shift, $parameter) { +function display_moveto_recursive($folder_tmp, $folder_data, $folder_id, $shift, $disabled) { foreach($folder_tmp as $folder_sub_data) { if ($folder_sub_data[2] == $folder_data[0]) { - display_moveto_folder_entry($folder_sub_data, $folder_id, $shift, $parameter); - display_moveto_recursive($folder_tmp, $folder_sub_data, $folder_id, $shift + 1, $parameter); + display_moveto_folder_entry($folder_sub_data, $folder_id, $shift, $disabled); + display_moveto_recursive($folder_tmp, $folder_sub_data, $folder_id, $shift + 1, $disabled); } } } -function display_moveto_folder($folder_all, $folder_id, $type) { - global $theme; - print "\n"; - print "\n"; + print "\n"; + print ""; + print ""; +} + +function emit_manufacturer_combo($name, $rows, $current_value) { + $rval = "\n"; + + return $rval; +} + +function get_users_folder($database) { + global $po_user; + + return pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and identifier != $po_user[trash_folder] order by date_of_creation desc"); +} + +function get_users_album($database) { + global $po_user; + + return pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and identifier != $po_user[spool_album] order by date_of_creation desc"); } function display_folder_combo($identifier, $all_values, $current_value, $kind) { + global $strings; + $num = pg_num_rows($all_values); print ""; -} - - -function display_album_combo($identifier, $all_values, $current_value, $kind) { - $num = pg_num_rows($all_values); - print ""; +} + +function display_album_combo($identifier, $all_values, $current_value, $kind) { + global $strings; + + $num = pg_num_rows($all_values); + print ""; + $rval .= ""; + $rval .= ""; + return $rval; +} + +function display_icc_profiles_combo($item_name, $value) { + global $icc_profiles; + global $strings; + + $num_of_icc_profiles = count($icc_profiles); + + print "\n"; } function display_lens_combo($identifier, $all_values, $current_value, $with_comas, $no_null) { + global $strings; + $num = pg_num_rows($all_values); print ""; } - function display_currency_combo($identifier, $all_values, $current_value, $no_null) { + global $strings; + $num = pg_num_rows($all_values); print ""; } function display_users($database, $user_list, $viewer_user_id) { - global $color; global $access; - global $user_type; + global $strings; - $client = FALSE; - - $viewer_user_data = FALSE; + $viewer_user_data = FALSE; if ($viewer_user_id) - $viewer_user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name, member_since, type from users where users.type>$user_type[client] and identifier=$viewer_user_id")); - - print "
    \n"; +function display_folder_actions($folder_all, $folder_id) { + global $thm_elem; + global $po_user; + + print "
    "; + print "\n"; + print "\n\n\n\n
    \n"; print "\n"; - switch ($type) { - case "moveto": - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + + print "
    \n"; } -function display_linkto_album($album_all, $album_id) { - global $theme; +function display_album_actions($album_all, $album_id) { + global $strings; + global $thm_elem; - print "\n"; - print "\n\n'; + $name = htmlentities($name, ENT_COMPAT, "UTF-8"); + $value = htmlentities($value, ENT_COMPAT, "UTF-8"); + return ""; } -function display_photo_slides($display_type, $my_user_id, $my_user_type, $container_id, $photo_data, $num_of_items, $num_of_rows, $popup_enable, $popup_delay, $shop_enable, $framed, $order) { - global $cell_size; - global $color; - global $theme; - global $user_type; +function display_photo_slides($display_type, $container_id, $photo_data, $offset, $num_of_items, $framed, $checks = FALSE) { + global $po_options; + global $po_user; + global $strings; + global $access; + global $tooltip_width; - $option = ""; + $my_user_id = $po_user['id']; + $my_user_type = $po_user['type']; + + if ($my_user_type < PO_USER_TYPE_CLIENT) + $checks = FALSE; if ($display_type == "album") { - $option .= "&album=$container_id"; - } - if ($order) { - $option .= "&order_by=$order"; + $option = "&album=$container_id"; + } else { + $option = ""; } - print "
    \n"; - print "\n"; - print "\n"; - print "\n"; + print "
    "; + print "\n"; + print "\n\n\n
    \n"; + if (isset($album_id) && $album_id != '') { + print $thm_elem['button.move.to.a']; + } + print $thm_elem['button.link.to.a']; + print $thm_elem['button.go.to.a']; + + print ""; + print "\n"; print "\n"; print "
    \n"; } -function display_moveto_album($album_all, $album_id) { - global $theme; +function display_list_slide_option($type, $url) { + global $thm_elem; - print "\n"; - print "\n\n\n\n
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; +} + +function photos_in_spool($database) { + global $po_user; + + $photos_in_spooler = pg_fetch_row(pg_query($database, "select count(distinct(version)) from album_content where album = $po_user[spool_album]")); + $num_photos = $photos_in_spooler[0]; + + return $num_photos; +} + +function display_spool_actions($database, $userid) { + global $po_user; + global $strings; + + $num_photos = photos_in_spool($database); + + if ($num_photos <= 0) return; + + print "
    "; + print ""; + print "
    ".$strings['spool']['photos_in'].": $num_photos ".$strings['spool']['view']." | ".$strings['spool']['empty']." | ".$strings['generic']['bulk_update'].""; + display_printto(); + print ""; + display_export(); + print "
    "; } function display_printto() { - global $theme; + global $strings; + global $thm_elem; print "\n"; print "\n\n\n\n
    \n"; - print "\n"; + print $thm_elem['button.print']; print "\n"; print "\n"; print "
    \n"; } function display_export() { - global $theme; + global $thm_elem; + global $strings; print "\n"; print "\n\n\n\n
    \n"; - print "\n"; + print $thm_elem['button.export']; print "\n"; print "\n"; print "
    \n"; } function display_transform($photo_id) { - global $theme; + global $strings; + global $thm_elem; print "\n"; print "\n\n\n\n
    \n"; - print "\n"; + print $thm_elem['button.rotate']; print "\n"; print "\n"; print "
    \n"; } @@ -817,221 +611,271 @@ function tooltip_row($name, $value) { if ($value == "") { return ""; } - return '
    ' .$name. ''.$value.'
    $name :$value
    \n"; - $rows = 0; + print "
    \n"; + $checkboxes = 0; - $round_down = floor($num_of_items/$num_of_rows); - $round_up = ceil($num_of_items/$num_of_rows); - $num_of_cells = $round_up == $round_down ? $num_of_items : ($round_down+1)*$num_of_rows; + for ($cell_counter = 0; $cell_counter < $num_of_items; $cell_counter++) { - for ($cell_counter = 0; $cell_counter < $num_of_cells; $cell_counter++) { - if ($rows == 0) { - print "
    \n"; + $photo = pg_fetch_assoc($photo_data, $offset + $cell_counter); + if ($photo == FALSE) break; + + $photo['date_of_exposure'] = substr($photo['date_of_exposure'], 0, 10); + $photo['date_added'] = substr($photo['date_added'], 0, 10); + if ($photo['place'] != "" && ($photo['city'] != "" || $photo['state'] != "" || $photo['country'] != "")) { $photo['place'] .= ","; } + if ($photo['city'] != "" && ($photo['state'] != "" || $photo['country'] != "")) { $photo['city'] .= ","; } + if ($photo['state'] != "" && ($photo['country'] != "")) { $photo['state'] .= ","; } + + if ($photo['place'] == 'Unknown') { + $photo['location'] = ""; + } else { + $photo['location'] = "$photo[place] $photo[city] $photo[state] $photo[country]"; } - print "\n"; - $rows = $rows + 1; - if ($rows == $num_of_rows) { - print "\n"; - $rows = 0; } } - print "
    \n"; - print "\n"; - print "\n"; - if (($cell_counter < $num_of_items) && (($my_user_type == $user_type['administrator']) || - ($my_user_id == $photo[13]) || - (($photo[8]>0) && ($my_user_type >= $user_type['client']) && ($shop_enable=='t')))) { + print "\"#\n"; + + if ($framed) { + display_frame_bottom($cell_counter, "$photo[identifier]:$photo[version]", $checks); + } + + if ($checks) { $checkboxes++; - print "\n"; - } - print "
    \n"; - if ($cell_counter < $num_of_items) { - if ($framed) - display_frame_top($cell_size, $cell_size, 10, "#E7E7E7", $theme); - $photo = pg_fetch_row($photo_data, $cell_counter); - $photo[3] = substr($photo[3], 0, 10); - $photo[4] = substr($photo[4], 0, 10); - $photo[2] = ereg_replace("\"", """, $photo[2]); - $photo[2] = ereg_replace("'", "\'", $photo[2]); - $photo[2] = ereg_replace("\n", "", $photo[2]); - $photo[2] = ereg_replace("\r", "", $photo[2]); - if ($photo[14] != "" && ($photo[15] != "" || $photo[16] != "" || $phot0[17] != "")) { $photo[14] .= ","; } - if ($photo[15] != "" && ($photo[16] != "" || $photo[17] != "")) { $photo[15] .= ","; } - if ($photo[16] != "" && ($photo[17] != "")) { $photo[16] .= ","; } - $location = "$photo[14] $photo[15] $photo[16] $photo[17]"; - if ($popup_enable == 't') { - $tt_id = "tt_img_$photo[0]"; - echo '
    ', - ''; - print tooltip_row('Title:', $photo[9]); - print tooltip_row('Author:', $photo[10]); - print tooltip_row('Caption:', $photo[2]); - print tooltip_row('Location:', $location); - -// print tooltip_row('Keywords:', $photo[11]); - print tooltip_row('Exposed:', $photo[3]); -// print tooltip_row('Created:', $photo[4]); - if ($my_user_id != "" ) { - print tooltip_row('Access:', $photo[5]); - } - if ($photo[6] > 0) - print tooltip_row('Rating:', round(11 - $photo[6], 3)); - print tooltip_row('Views:', $photo[7]); - echo '
    ', "\n", - '
    ', "\n"; - } - - print "\"Image\n"; - if ($framed) - display_frame_bottom($cell_size, $cell_size, 10, $theme); + if ($framed) { + display_slide_top($cell_counter, $checks); + } + + if ($po_options['popup_enable'] == 't') { + $tt_id = "tt_img_$photo[identifier]_$photo[version]"; + print "
    "; + print tooltip_row($strings['generic']['title'], $photo['title']); + print tooltip_row($strings['generic']['author'], $photo['author']); + if ($photo['caption']) { + print tooltip_row($strings['generic']['caption'], $photo['caption']); + } + if ($photo['location']) { + print tooltip_row($strings['generic']['location'], $photo['location']); + } + if ($photo['date_of_exposure'] != "") + print tooltip_row($strings['generic']['exposed'], $photo['date_of_exposure']); + else + print tooltip_row($strings['generic']['created'], $photo['date_added']); + if ($my_user_id != FALSE ) { + print tooltip_row($strings['generic']['access'], $strings['generic'][$access[$photo['access_rights']]]); + } + if ($photo['rating'] > 0) + print tooltip_row($strings['generic']['rating'], round(11 - $photo['rating'], 3)); + print tooltip_row($strings['generic']['views'], $photo['views']); + print "
    \n"; } - print "
    \n"; - print "\n"; - print "
    \n"; - - print "
    \n"; - print ""; + + print " \n"; + return $checkboxes; } -function display_photo_list($display_type, $my_user_id, $my_user_type, $container_id, $photo_data, $num_of_items, $shop_enable, $order) { - global $color; - global $theme; - global $user_type; +function display_photo_list($display_type, $container_id, $photo_data, $offset, $num_of_items) { + global $po_options; + global $po_user; + global $strings; + global $access; + + $checkboxes = 0; + + $my_user_id = $po_user['id']; + $my_user_type = $po_user['type']; $option = ""; if ($display_type == "album") { $option = "&album=$container_id"; - } - if ($order) { - $option = "$option&order_by=$order"; - } + } - print "\n"; - print "\n"; + print "
    Photos
    \n"; + print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + if ($my_user_id != FALSE ) { + print "\n"; + } + print "\n"; + print "\n"; + if ($my_user_id != FALSE ) { + print "\n"; + } + print "\n"; print "\n"; for ($photo_counter = 0; $photo_counter < $num_of_items; $photo_counter++) { - $photo = pg_fetch_row($photo_data, $photo_counter); + $photo = pg_fetch_assoc($photo_data, $offset + $photo_counter); + if ($photo == FALSE) break; print ""; - print "\n"; - $photo[2] = makeZanza($photo[2], "No caption"); - if ($photo[8] == 1) { - print "\n"; - } else { - $on_mouse_over ="t_w=10; ttWidth=10; return escape('')"; - print "\n"; + if ($my_user_id != FALSE ) { + print "\n"; + $checkboxes++; } + $photo['caption'] = makeZanza($photo['caption'], $strings['photo']['no_title']); - $photo[6] = round($photo[6], 0); - if ($photo[6] > 0) - $photo[6] = 11 - $photo[6]; + print "\n"; + + $photo['rating'] = round($photo['rating'], 0); + if ($photo['rating'] > 0) + $photo['rating'] = 11 - $photo['rating']; else - $photo[6] = ""; - print "\n"; - print "\n"; - print "\n"; + $photo['rating'] = ""; + print "\n"; + if ($my_user_id != FALSE ) { + print emit_td($strings['generic'][$access[$photo['access_rights']]]); + } + if ($photo['date_of_exposure'] != "") + print emit_td(emit_date_html($photo['date_of_exposure'], 'date')); + else + print "\n"; print "\n"; } print "
    Photos
    CaptionRatingAccessExposure Date".$strings['generic']['caption']."".$strings['generic']['rating']."".$strings['generic']['access']."".$strings['generic']['exposed']."
    \n"; - if (($my_user_type == $user_type['administrator']) || - ($my_user_id == $photo[13]) || - (($photo[8]>0) && ($my_user_type >= $user_type['client']) && ($shop_enable=='t'))) { - print "\n"; - } - print "$photo[2]$photo[2]\n"; + print "\n"; + print ""; + + if ($po_options['popup_enable'] == 't') { + $tt_id = "tt_img_$photo[identifier]_$photo[version]"; + print "
    "; + print "\"#"; + print "
    \n"; + $onmouseover = "onmouseover=\"TagToTip('$tt_id', DELAY, $po_options[popup_delay], COPYCONTENT, false, BORDERWIDTH, 0, PADDING, 0);\""; + } else { + $onmouseover = ""; + } + + print "$photo[caption]
    $photo[6]$photo[5]".generate_date_html($photo[3], 'date', $my_user_id == "" ? 0 : 1)."$photo[rating]".emit_date_html($photo['date_added'], 'date')."
    \n"; - print ""; + return $checkboxes; } -function display_lens_string($min_aperture, $max_aperture, $min_focal, $max_focal) { +function emit_lens_string($min_aperture, $max_aperture, $min_focal, $max_focal) { + $rval = ""; if (!$min_aperture) - return; + return $rval; if ($min_aperture == $max_aperture) - print "$min_aperture"; + $rval .= "$min_aperture"; else - print "$min_aperture-$max_aperture"; + $rval .= "$min_aperture-$max_aperture"; if ($min_focal == $max_focal) - print "/$min_focal"; + $rval .= "/$min_focal"; else - print "/$min_focal-$max_focal"; + $rval .= "/$min_focal-$max_focal"; + return $rval; +} + +function emit_manuf_add_needed($type) { + global $thm_elem; + global $strings; + + $rval = "
    "; + $rval .= sprintf($strings['profile']['must_add_manufacturers'], $strings['generic'][$type]); + $rval .= "
    "; + $rval .= $thm_elem['button.add.manufacturer']; + $rval .= "
    \n"; + + return $rval; +} + +function emit_profile_manuf_combo($url, $type, $span, $rows, $filter) { + global $strings; + + print "
    \n"; + print $strings['generic'][$type]." ".$strings['generic']['types']."\n"; + print "
    \n"; + $viewer_user_data = pg_fetch_assoc(pg_query($database, " + select identifier, last_name, first_name, member_since, type + from users + where users.type>".PO_USER_TYPE_CLIENT." + and identifier=$viewer_user_id")); + + print "
    "; + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; if ($viewer_user_data != FALSE) { - $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($viewer_user_data[0])")); - $folders_by_user = pg_fetch_row(pg_query($database, "select count_folders_by_user($viewer_user_data[0])")); - $albums_by_user = pg_fetch_row(pg_query($database, "select count_albums_by_user($viewer_user_data[0])")); - $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($viewer_user_data[0])")); + $user_stats = pg_fetch_assoc(pg_query($database, " + select count_photos_by_user($viewer_user_data[identifier]) as photos, + count_folders_by_user($viewer_user_data[identifier]) -1 as folders, + count_albums_by_user($viewer_user_data[identifier]) -1 as albums, + count_equipment_by_user($viewer_user_data[identifier]) as equipment")); + print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; print ""; } $user_count = pg_num_rows($user_list); for ($i=0; $i < $user_count; $i++) { - $user = pg_fetch_row($user_list, $i); - if ($user[0] != $viewer_user_data[0]) { - if ($user[0] != "" && $viewer_user_data[0] != "") { - $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$user[0]' and client='$viewer_user_data[0]' and status=2")); + $user = pg_fetch_assoc($user_list, $i); + if ($user['identifier'] != $viewer_user_data['identifier']) { + $client = FALSE; + if ($user['identifier'] != "" && $viewer_user_data['identifier'] != "") { + $client = pg_fetch_assoc(pg_query ($database, "select identifier from client where users='$user[identifier]' and client='$viewer_user_data[identifier]' and status=2")); } - if ($viewer_user_data[4] == $user_type['administrator']) { - $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($user[0])")); - $folders_by_user = pg_fetch_row(pg_query($database, "select count_folders_by_user($user[0])")); - $albums_by_user = pg_fetch_row(pg_query($database, "select count_albums_by_user($user[0])")); - $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($user[0])")); + if ($viewer_user_data['type'] == PO_USER_TYPE_ADMIN) { + $user_stats = pg_fetch_assoc(pg_query($database, " + select count_photos_by_user($user[identifier]) as photos, + count_folders_by_user($user[identifier]) -1 as folders, + count_albums_by_user($user[identifier]) - 1 as albums, + count_equipment_by_user($user[identifier]) as equipment")); + } else if ($client != FALSE) { + $user_stats = pg_fetch_assoc(pg_query($database, " + select count_photos_by_user($user[identifier], $access[protected]) as photos, + count_folders_by_user($user[identifier], $access[protected]) as folders, + count_albums_by_user($user[identifier], $access[protected]) as albums, + count_equipment_by_user($user[identifier], $access[protected]) as equipment")); + } else { + $user_stats = pg_fetch_assoc(pg_query($database, " + select count_photos_by_user($user[identifier], $access[public]) as photos, + count_folders_by_user($user[identifier], $access[public]) as folders, + count_albums_by_user($user[identifier], $access[public]) as albums, + count_equipment_by_user($user[identifier], $access[public]) as equipment")); } - else if ($client != FALSE) { - $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($user[0], $access[protected])")); - $folders_by_user = pg_fetch_row(pg_query($database, "select count_folders_by_user($user[0], $access[protected])")); - $albums_by_user = pg_fetch_row(pg_query($database, "select count_albums_by_user($user[0], $access[protected])")); - $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($user[0], $access[protected])")); + + /* Don't list users with no photos unless we're an admin! */ + if (($viewer_user_data['type'] < PO_USER_TYPE_ADMIN) && + ($user_stats['photos'] == 0)) { + continue; } - else { - $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($user[0], $access[public])")); - $folders_by_user = pg_fetch_row(pg_query($database, "select count_folders_by_user($user[0], $access[public])")); - $albums_by_user = pg_fetch_row(pg_query($database, "select count_albums_by_user($user[0], $access[public])")); - $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($user[0], $access[public])")); + + /* Hide users that request it, unless we're an admin! */ + if (($viewer_user_data['type'] < PO_USER_TYPE_ADMIN) && + $user['hide'] == 't') { + continue; } print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; print ""; } } print "
    NamePhotosFoldersAlbumsEquipmentMember Since".$strings['generic']['name']."".$strings['generic']['photos']."".$strings['generic']['folders']."".$strings['generic']['albums']."".$strings['generic']['equipment']."".$strings['generic']['member_since']."
    $viewer_user_data[1], $viewer_user_data[2]$photos_by_user[0]$folders_by_user[0]$albums_by_user[0]$equipment_by_user[0]".generate_date_html($viewer_user_data[3], 'date', 1)."$viewer_user_data[last_name], $viewer_user_data[first_name]$user_stats[photos]$user_stats[folders]$user_stats[albums]$user_stats[equipment]".emit_date_html($viewer_user_data['member_since'], 'date')."
    $user[1], $user[2]$photos_by_user[0]$folders_by_user[0]$albums_by_user[0]$equipment_by_user[0]".generate_date_html($user[3], 'date', $viewer_user_data[0] == "" ? 0 : 1)."$user[last_name], $user[first_name]$user_stats[photos]$user_stats[folders]$user_stats[albums]$user_stats[equipment]".emit_date_html($user['member_since'], 'date')."
    \n"; + print "
    "; } -function display_albums($database, $album_id, $viewer_user_id, $viewer_user_type, $owner_user_id, $owner_user_type, $display_header) { - global $color; +function display_albums($database, $album_id, $owner_user_id, $owner_user_type, $display_header, $event = FALSE) { global $access; - global $user_type; + global $po_user; + global $strings; + global $passwords; - $client = FALSE; + $viewer_user_id = $po_user['id']; + $viewer_user_type = $po_user['type']; + $photos_in_spool = 0; - if ($album_id == FALSE) { + if ($album_id == "") { $selector = "parent_album is null"; + $display_special_albums = TRUE; } else { $selector = "parent_album=$album_id"; + $display_special_albums = FALSE; } - $album_type = $owner_user_type > $user_type['client'] ? "u" : "c"; - - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - $sql_query_album_access_rights_string = ""; - } - else { - if ($owner_user_id != "" && $viewer_user_id != "") { - $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_user_id' and client='$viewer_user_id' and status=2")); - } - if ($client == FALSE) - $sql_query_album_access_rights_string = "and access_rights = $access[public]"; - else - $sql_query_album_access_rights_string = "and access_rights < $access[private]"; - } - - $all_albums = pg_query($database, " - select album.identifier, caption, date_of_creation, value - from album, access_type + if ($event === FALSE) + $all_albums = pg_query($database, " + select album.identifier, caption, date_of_creation, access_rights, date_changed + from album where users=$owner_user_id - and access_type.identifier = album.access_rights - and album.type = '$album_type' and $selector - $sql_query_album_access_rights_string + and can_access_album(album.identifier, $viewer_user_id, '{".$passwords."}') + order by date_of_creation desc"); + else + $all_albums = pg_query($database, " + select album.identifier, caption, date_of_creation, access_rights, date_changed + from album + where event = $event + and can_access_album(album.identifier, $viewer_user_id, '{".$passwords."}') order by date_of_creation desc"); $num_of_albums = pg_num_rows($all_albums); @@ -1254,77 +1163,85 @@ function display_albums($database, $album_id, $viewer_user_id, $viewer_user_type if (($viewer_user_id != $owner_user_id) && ($num_of_albums == 0)) return; - print "\n"; + print "
    "; + print "
    \n"; if ($display_header == "with_header") { - print "\n"; - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) - $colspan = 7; + print "\n"; + if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == PO_USER_TYPE_ADMIN)) + $colspan = 8; else - $colspan = 5; - print "\n"; + $colspan = 6; + print "\n"; print "\n"; } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($album_type == "u") { - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + if ($viewer_user_id != FALSE) { + print "\n"; } if ($viewer_user_id == $owner_user_id) { - print "\n"; - } - else if ($viewer_user_type == $user_type['administrator']) { - print ""; + print "\n"; + } else if ($viewer_user_type == PO_USER_TYPE_ADMIN) { + print ""; } print "\n"; for ($i = 0; $i < $num_of_albums; $i++) { - $album = pg_fetch_row($all_albums, $i); - print "\n"; - print "\n"; - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - $photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album[0])")); - $subalbums_in_album = pg_fetch_row(pg_query($database, "select count_subalbums_by_album($album[0])")); - print "\n"; - print "\n"; + $album = pg_fetch_assoc($all_albums, $i); + if (($album['caption'] == 'Spool' || + $album['identifier'] == $po_user['spool_album']) && + $display_special_albums) { + $photos_in_spool = photos_in_spool($database); + $spool = $album; } else { - if ($client == FALSE) { - $public_photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album[0], $access[public])")); - $public_subalbums_in_album = pg_fetch_row(pg_query($database, "select count_subalbums_by_album($album[0], $access[public])")); - print "\n"; - print "\n"; + $album_stats = pg_fetch_assoc(pg_query($database, "select count_subalbums_by_album($album[identifier], $viewer_user_id, '{".$passwords."}') as albums, count_photos_by_album($album[identifier], $viewer_user_id, '{".$passwords."}') as photos")); + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + + print ""; + print ""; + if ($viewer_user_id != FALSE) { + print emit_td($strings['generic'][$access[$album['access_rights']]]); } - else { - $protected_photos_in_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album[0], $access[protected])")); - $protected_subalbums_in_album = pg_fetch_row(pg_query($database, "select count_subalbums_by_album($album[0], $access[protected])")); - print "\n"; - print "\n"; + if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == PO_USER_TYPE_ADMIN)) { + print "\n"; + print "\n"; } + print "\n"; } - print ""; - if ($album_type == "u") { - print "\n"; - } - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - print "\n"; - print "\n"; - } - print "\n"; + } + if ((($viewer_user_id == $owner_user_id) || + ($viewer_user_type == PO_USER_TYPE_ADMIN)) && + $display_special_albums && ($photos_in_spool > 0)) { + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; } print "
    Albums".$strings['generic']['albums']."
    Album NameSubalbumsSizeCreatedAccess".$strings['generic']['album_name']."".$strings['generic']['subalbums']."".$strings['generic']['photos']."".$strings['generic']['created']."".$strings['generic']['changed']."".$strings['generic']['access']."\n"; - print "Add Album"; - print "\n"; + print "".$strings['generic']['add_album'].""; + print "
    $album[1]$subalbums_in_album[0]$photos_in_album[0]$public_subalbums_in_album[0]$public_photos_in_album[0]
    $album[caption]$album_stats[albums]$album_stats[photos]".emit_date_html($album['date_of_creation'], 'date'). "".emit_date_html($album['date_changed'], 'date'). "$protected_subalbums_in_album[0]$protected_photos_in_album[0]".$strings['generic']['edit']."".$strings['generic']['delete']."
    ".generate_date_html($album[2], 'date', $viewer_user_id == "" ? 0 : 1). "$album[3]EditDelete
    $spool[caption]$photos_in_spool".$strings['generic']['print']." ".$strings['generic']['label']." / ".$strings['generic']['brochure']." | ".$strings['generic']['export']." ".$strings['generic']['plain']." / XML | ".$strings['generic']['bulk_update']." | ".$strings['generic']['empty']."
    \n"; + print "\n"; } -function display_folders($database, $folder_id, $viewer_user_id, $viewer_user_type, $owner_user_id, $display_header) { - global $color; +function display_folders($database, $folder_id, $owner_user_id, $display_header, $event = FALSE) { global $access; - global $user_type; + global $po_user; + global $strings; + global $passwords; - $client=FALSE; + $viewer_user_id = $po_user['id']; + $viewer_user_type = $po_user['type']; + $photos_in_trash = 0; if ($folder_id == "") { $folder_selector = "parent_folder is null"; @@ -1334,217 +1251,202 @@ function display_folders($database, $folder_id, $viewer_user_id, $viewer_user_ty $display_special_folders = FALSE; } - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - $all_folders = pg_query($database, "select folder.identifier, caption, date_of_creation, value from folder, access_type where users=$owner_user_id and access_type.identifier=folder.access_rights and $folder_selector order by date_of_creation desc"); - } else { - if ($owner_user_id != "" && $viewer_user_id != "") { - $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_user_id' and client='$viewer_user_id' and status=2")); - } - if ($client == FALSE) - $all_folders = pg_query($database, "select folder.identifier, caption, date_of_creation, value from folder, access_type where users=$owner_user_id and access_type.identifier=folder.access_rights and folder.access_rights=$access[public] and $folder_selector order by date_of_creation desc"); - else - $all_folders = pg_query($database, "select folder.identifier, caption, date_of_creation, value from folder, access_type where users=$owner_user_id and access_type.identifier=folder.access_rights and folder.access_rights<$access[private] and $folder_selector order by date_of_creation desc"); - } + if ($event === FALSE) + $all_folders = pg_query($database, "select folder.identifier, caption, date_of_creation, access_rights, date_changed from folder where users = $owner_user_id and $folder_selector and can_access_folder(folder.identifier, $viewer_user_id, '{".$passwords."}') order by date_of_creation desc"); + else + $all_folders = pg_query($database, "select folder.identifier, caption, date_of_creation, access_rights, date_changed from folder where event = $event and can_access_folder(folder.identifier, $viewer_user_id, '{".$passwords."}') order by date_of_creation desc"); $num_of_folders = pg_num_rows($all_folders); if (($viewer_user_id != $owner_user_id) && ($num_of_folders == 0)) return; - print "\n"; + print "
    "; + print "
    \n"; if ($display_header == "with_header") { - print "\n"; - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) - $colspan = 7; + print "\n"; + if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == PO_USER_TYPE_ADMIN)) + $colspan = 8; else - $colspan = 5; - print "\n"; + $colspan = 6; + if ($folder_id == "") + print "\n"; + else + print "\n"; print "\n"; } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($viewer_user_id == $owner_user_id) { - print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + if ($viewer_user_id != FALSE) { + print "\n"; } - else if ($viewer_user_type == $user_type['administrator']) { - print ""; + if ($viewer_user_id == $owner_user_id) { + print ""; + } else if ($viewer_user_type == PO_USER_TYPE_ADMIN) { + print ""; } print "\n"; /* trash is not a user folder */ for ($i = 0; $i < $num_of_folders; $i++) { - $folder = pg_fetch_row($all_folders, $i); - if ($folder[1] == "Trash" && $display_special_folders) { - $photos_in_trash = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[0])")); + $folder = pg_fetch_assoc($all_folders, $i); + if (($folder['caption'] == 'Trash' || $folder['identifier'] == $po_user['trash_folder']) && $display_special_folders) { + $photos_in_trash = pg_fetch_assoc(pg_query($database, "select count_photos_by_folder($folder[identifier], $viewer_user_id, '{".$passwords."}') as photos")); $trash = $folder; - } - else if ($folder[1] == "Orphanage" && $display_special_folders) { - $photos_in_orphanage = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[0])")); - $orphanage = $folder; - } - else { + } else { print "\n"; - print "\n"; - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - $subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder[0])")); - print "\n"; - $photos_in_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[0])")); - print "\n"; - } else { - if ($client == FALSE) { - $public_subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder[0], $access[public])")); - print "\n"; - $public_photos_in_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[0], $access[public])")); - print "\n"; - } else { - $protected_subfolders_in_folder = pg_fetch_row(pg_query($database, "select count_subfolders_by_folder($folder[0], $access[protected])")); - print "\n"; - $protected_photos_in_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[0], $access[protected])")); - print "\n"; - } + print "\n"; + $folder_stats = pg_fetch_assoc(pg_query($database, "select count_subfolders_by_folder($folder[identifier], $viewer_user_id, '{".$passwords."}') as folders, count_photos_by_folder($folder[identifier], $viewer_user_id, '{".$passwords."}') as photos")); + + print "\n"; + print "\n"; + + print ""; + print ""; + if ($viewer_user_id != FALSE) { + print emit_td($strings['generic'][$access[$folder['access_rights']]]); } - print ""; - print "\n"; - if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) { - print "\n"; - print "\n"; + if (($viewer_user_id == $owner_user_id) || ($viewer_user_type == PO_USER_TYPE_ADMIN)) { + print "\n"; + print "\n"; } print "\n"; } } - if ((($viewer_user_id == $owner_user_id) || ($viewer_user_type == $user_type['administrator'])) && $display_special_folders) { - if ($photos_in_orphanage[0] > 0) { + if ((($viewer_user_id == $owner_user_id) || ($viewer_user_type == PO_USER_TYPE_ADMIN)) && $display_special_folders) { + if ($photos_in_trash["photos"] > 0) { print "\n"; - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - if ($photos_in_trash[0] > 0) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print ""; + print ""; + print "\n"; + print "\n"; print "\n"; } } print "
    Folders".$strings['generic']['folders']."".$strings['generic']['subfolders']."
    Folder NameSubfoldersPhotosCreatedAccess\n"; - print "Add Folder\n"; - print "".$strings['generic']['folder_name']."".$strings['generic']['subfolders']."".$strings['generic']['photos']."".$strings['generic']['created']."".$strings['generic']['changed']."".$strings['generic']['access']."\n"; + print "".$strings['generic']['add_folder']."\n"; + print "
    $folder[1]$subfolders_in_folder[0]$photos_in_folder[0]$public_subfolders_in_folder[0]$public_photos_in_folder[0]$protected_subfolders_in_folder[0]$protected_photos_in_folder[0]$folder[caption]$folder_stats[folders]$folder_stats[photos]".emit_date_html($folder['date_of_creation'], 'date'). "".emit_date_html($folder['date_changed'], 'date'). "".generate_date_html($folder[2], 'date', $viewer_user_id == "" ? 0 : 1). "$folder[3]EditDelete".$strings['generic']['edit']."".$strings['generic']['delete']."
    $orphanage[1]$photos_in_orphanage[0]".generate_date_html($orphanage[2], 'date', $viewer_user_id == "" ? 0 : 1). "Private
    $trash[1]$photos_in_trash[0]".generate_date_html($trash[2], 'date', $viewer_user_id == "" ? 0 : 1). "PrivateEmpty Trash".$strings['generic']['trash']."$photos_in_trash[photos]".$strings['generic']['private']."".$strings['generic']['empty_trash']."
    \n"; + print ""; } function display_folder_with_users($database, $my_user_id, $folder_list) { - global $color; + global $strings; + + print "
    "; + print "\n"; - print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; $user_count = pg_num_rows($folder_list); for ($i=0; $i < $user_count; $i++) { - $folder = pg_fetch_row($folder_list, $i); - $photos_by_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[1])")); + $folder = pg_fetch_assoc($folder_list, $i); print "\n"; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + print ""; print "\n"; } print "
    FolderSizeCreatedUser".$strings['generic']['folder']."".$strings['generic']['size']."".$strings['generic']['subfolders']."".$strings['generic']['created']."".$strings['generic']['user']."
    $folder[0]$photos_by_folder[0]".generate_date_html($folder[2], 'date', $my_user_id == "" ? 0 : 1). "$folder[3] $folder[4]$folder[caption]$folder[photos]$folder[subs]".emit_date_html($folder['date_of_creation'], 'date'). "$folder[first_name] $folder[last_name]
    \n"; + print "
    \n"; } function display_album_with_users($database, $my_user_id, $album_list) { - global $color; + global $strings; + + print "
    "; + print "\n"; - print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; $user_count = pg_num_rows($album_list); for ($i=0; $i < $user_count; $i++) { - $album = pg_fetch_row($album_list, $i); - $photos_by_album = pg_fetch_row(pg_query($database, "select count_photos_by_album($album[1])")); + $album = pg_fetch_assoc($album_list, $i); print "\n"; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + print ""; print "\n"; } print "
    AlbumSizeCreatedUser".$strings['generic']['album']."".$strings['generic']['size']."".$strings['generic']['subalbums']."".$strings['generic']['created']."".$strings['generic']['user']."
    $album[0]$photos_by_album[0]".generate_date_html($album[2], 'date', $my_user_id == "" ? 0 : 1). "$album[3] $album[4]$album[caption]$album[photos]$album[subs]".emit_date_html($album['date_of_creation'], 'date'). "$album[first_name] $album[last_name]
    \n"; + print "
    \n"; } -function display_contact_info($database, $my_user_id, $user_id, $display_header) { - global $color; - $user_info = pg_fetch_row(pg_query($database, "select first_name, last_name, company, contact, member_since from users where identifier=$user_id")); +function display_contact_info($database, $user_id) { + global $strings; + + $user_info = pg_fetch_assoc(pg_query($database, "select first_name, last_name, company, contact, member_since from users where identifier=$user_id")); if (!$user_info) return; - $contact_info = pg_fetch_row(pg_query($database, "select address1, address2, city, zipcode, state, country, phone, email, url + $contact_info = pg_fetch_assoc(pg_query($database, "select address1, address2, city, zipcode, state, country, phone, email, url from view_contact_info - where identifier=$user_info[3]")); + where identifier=$user_info[contact]")); - print "\n"; - print "\n\n"; - if ($user_info[0] != "") - print "\n\n \n\n"; - if ($user_info[1] != "") - print "\n\n \n\n"; - if ($user_info[2] != "") - print "\n\n \n\n"; - if ($contact_info[0] != "" || $contact_info[1] != "") - print "\n\n \n\n"; - if ($contact_info[2] != "") - print "\n\n \n\n"; - if ($contact_info[3] != "") - print "\n\n \n\n"; - if ($contact_info[4] != "") - print "\n\n \n\n"; - if ($contact_info[5] != "") - print "\n\n \n\n"; - if ($contact_info[7] != "") - print "\n\n \n\n"; - if ($contact_info[8] != "") - print "\n\n \n\n"; - if ($contact_info[6] != "") - print "\n\n \n\n"; - if ($user_info[4] != "") - print "\n\n\n\n"; + print "
    Contact Information
    First name$user_info[0]
    Last name$user_info[1]
    Company$user_info[2]
    Address$contact_info[0]
    $contact_info[1]
    City$contact_info[2]
    Zipcode$contact_info[3]
    State$contact_info[4]
    Country$contact_info[5]
    Email$contact_info[7]
    Website$contact_info[8]
    Phone$contact_info[6]
    Member since".generate_date_html($user_info[4], "date", $my_user_id == "" ? 0 : 1). "
    \n"; + print "\n"; + if ($user_info['first_name'] != "") + print "\n"; + if ($user_info['last_name'] != "") + print "\n"; + if ($user_info['company'] != "") + print "\n"; + if ($contact_info['address1'] != "" || $contact_info['address2'] != "") + print "\n"; + if ($contact_info['city'] != "") + print "\n"; + if ($contact_info['zipcode'] != "") + print "\n"; + if ($contact_info['state'] != "") + print "\n"; + if ($contact_info['country'] != "") + print "\n"; + if ($contact_info['email'] != "") + print "\n"; + if ($contact_info['url'] != "") + print "\n"; + if ($contact_info['phone'] != "") + print "\n"; + if ($user_info['member_since'] != "") + print "\n"; print "
    Contact Information
    ".$strings['user']['first_name']."$user_info[first_name]
    ".$strings['user']['last_name']."$user_info[last_name]
    ".$strings['user']['company']."$user_info[company]
    ".$strings['user']['address']."$contact_info[address1]
    $contact_info[address2]
    ".$strings['user']['city']."$contact_info[city]
    ".$strings['user']['post_code']."$contact_info[zipcode]
    ".$strings['user']['state']."$contact_info[state]
    ".$strings['user']['country']."$contact_info[country]
    ".$strings['user']['email']."$contact_info[email]
    ".$strings['user']['web']."$contact_info[url]
    ".$strings['user']['phone']."$contact_info[phone]
    ".$strings['generic']['member_since']."".emit_date_html($user_info['member_since'], "date"). "
    \n"; } - function display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_space, $y_space, $columns, $rows, $show_leading_blanks) { + global $strings; + print "\n"; print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; print "\n"; @@ -1569,42 +1471,42 @@ function display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_sp print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print ""; print "\n"; print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print ""; print "\n"; print "\n"; print "\n"; - print "\n"; + print "\n"; + print ""; print "\n"; print "\n"; @@ -1617,10 +1519,7 @@ function display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_sp print " 
    \n"; print "\n"; print "\n"; @@ -1633,7 +1532,7 @@ function display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_sp print "\n"; print "\n"; - print "\n"; + print "\n"; print "\n"; print "\n"; @@ -1645,98 +1544,16 @@ function makeZanza($string, $default) { if (strlen($string) > 40) { $zanza = substr($string, 0, 40); $zanza = $zanza . "..."; - } - else { + } else { $zanza = $string; } - } - else { + } else { $zanza = $default; } return $zanza; } -function display_shaded_photo($photo_url, $link_url, $original_file) { - global $theme; - - if (is_file($original_file)) { - $image_size = getimagesize($original_file); - } - else { - $image_size = getimagesize("themes/null.photo.large.gif"); - } - - print "
    "; if ($show_leading_blanks) print "Leading blanks"; print "MarginWidthSpace".$strings['label']['margin']."".$strings['label']['width']."".$strings['label']['space']."
    \"\"\"\"\"\"\"\"\"\"
    Margin  ".$strings['label']['margin']."  \"\"
    Height  ".$strings['label']['height']."  \"\" "; print " Rows\n"; + print " ".$strings['label']['rows']."\n"; print "
    Space  ".$strings['label']['space']."  \"\"
    \"\"
    Columns".$strings['label']['columns']."
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \"\"/\"\"/\"\"/
    \"\"/"; - if ($link_url == "") - print "\"\"/"; - else - print "\"\"/"; - print "\"\"/
    \"\"/\"\"/\"\"/
    \n"; -} - -function display_navigator_box_top($index, $data, $width) { - global $theme; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \"\"/"; - - print "\n\n"; - print "\n"; - - $current_index = 1; - foreach ($data as $item) { - print "\n"; - $current_index++; - } - print "\n"; - print "
    \"\"/\"".$item['alt']."\"\"\"/
    \n"; - - print "
    \"\"/
    \n"; -} - -function display_navigator_box_bottom($width) { - global $theme; - - print "\n
    \"\"/\"\"/\"\"/
    \n"; -} - -function grant_access_to_original($is_original_present, $is_mine, $is_admin, $is_original_public, $is_it_bought) { +function grant_access_to_original($is_original_present, $is_mine, $is_admin, $is_original_public) { if (!$is_original_present) return false; @@ -1749,43 +1566,9 @@ function grant_access_to_original($is_original_present, $is_mine, $is_admin, $is if ($is_original_public) return true; - if ($is_it_bought) - return true; - return false; } -function get_im_composite_options($database, $userid) { - return pg_fetch_row(pg_query($database, " - select gravity, watermark, photo, large_image_path - from imagemagick_composite_options, users, photo_version - where imagemagick_composite_options.identifier=users.imagemagick_composite_options - and photo_version.identifier = imagemagick_composite_options.photo_version - and users.identifier = $userid")); -} - -function get_im_options($database, $userid) { - return pg_fetch_row(pg_query($database, " - select preview_quality, preview_colorspace, preview_gamma, - preview_sharpen_radius, preview_sharpen_sigma, - preview_border_width, preview_border_height, preview_border_color, - thumb_quality, thumb_colorspace, thumb_gamma, - thumb_sharpen_radius, thumb_sharpen_sigma, - thumb_border_width, thumb_border_height, thumb_border_color, - preview_sharpen_amount, preview_sharpen_threshold, - thumb_sharpen_amount, thumb_sharpen_threshold - from imagemagick_options, users - where imagemagick_options.identifier=users.imagemagick_options - and users.identifier=$userid")); -} -function get_dcraw_options($database, $userid) { - return pg_fetch_row(pg_query($database, " - select gamma, brightness, white_balance, bitdepth - from dcraw_options, users - where users.dcraw_options = dcraw_options.identifier - and users.identifier = $userid")); -} - // See http://sylvana.net/jpegcrop/exif_orientation.html for an explanation of these numbers function map_transform($orientation, $transform) { @@ -1901,29 +1684,444 @@ function map_transform($orientation, $transform) { return $orientation; } + /* Add a folder to the database */ -function add_folder($database, $userid, $parent, $access_rights, $name, $descr, $order_by) +function add_folder($database, $userid, $parent, $access_rights, $name, $descr, $password, $event) { + global $strings; + $name = pg_escape_string($name); $descr = pg_escape_string($descr); + $password = pg_escape_string($password); + $access_rights = pg_escape_string($access_rights); + $event = pg_escape_string($event); - if (($name != "") && - ($name != "Trash") && - ($name != "Orphanage")) { + if ($event != "null") $client = "'$event'"; - $string = "insert into folder (identifier, parent_folder, users, caption, description, date_of_creation, access_rights, orderby) - values (nextval('folder_id_sequence'), $parent, -$userid, '$name', '$descr', now(), $access_rights, $order_by)"; - -# print("
    $string
    \n"); - $result = pg_query($database, $string); - - return ($result != FALSE); - } else { + if (($name == 'Trash') || ($name == '')) { + site_push_error($strings['errors']['illegal_name']); return FALSE; + } else { + $string = "insert into folder (identifier, parent_folder, users, caption, description, access_rights, password, event) + values (nextval('folder_id_sequence'), $parent, +$userid, '$name', '$descr', $access_rights, '$password', $event)"; + + pg_query($database, "begin"); + $result = pg_query($database, $string); + if ($result) { + pg_query($database, "commit"); + return TRUE; + } else { + site_push_error($strings['errors']['db_insert_failed']); + return FALSE; + } } } +function photos_between_dates($database, $userid, $from, $to) +{ + $from = date("Y-m-d H:i", $from); + $to = date("Y-m-d H:i", $to); + + $result = pg_fetch_row(pg_query($database, "SELECT count(identifier) FROM photo WHERE users = $userid AND date_of_exposure BETWEEN '$from' AND '$to'")); + return $result[0]; +} + +function display_iptc_form($database, $bulk_update, + $title, $author, $keywords, $headline, + $caption_writer, $caption, $category, + $supp_category, $credit, $copyright, + $web_statement, $instructions, $source, + $trans_ref, $exp_date, $location, + $access, $hide_original, $store_url, $comments) { + global $strings; + global $po_user; + + /* Retrieve location info */ + if ($po_user['type'] != PO_USER_TYPE_ADMIN) + $location_mod = " where private is false or users=$po_user[id] "; + else + $location_mod = ""; + + $users_location = pg_query($database, "select identifier, country, state, city, place from view_location $location_mod order by country, state, city, place"); + + /* And now for the form */ + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['title'] . ""); + else + print emit_td($strings['generic']['title']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['author'] . ""); + else + print emit_td($strings['generic']['author']); + print emit_td(""); + print "\n"; + + if ($bulk_update) { + print ""; + print emit_td($strings['generic']['set_keywords'] .""); + print emit_td(""); + print "\n"; + + print ""; + print emit_td($strings['generic']['clear_keywords'].""); + print emit_td(""); + print "\n"; + } else { + print ""; + print emit_td($strings['generic']['keywords']); + print emit_td(""); + print "\n"; + } + + print ""; + if ($bulk_update) { + print emit_td($strings['generic']['headline']. ""); + } else { + print emit_td($strings['generic']['headline']); + } + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['caption_writer'] . ""); + else + print emit_td($strings['generic']['caption_writer']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['caption'] .""); + else + print emit_td($strings['generic']['caption']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['category'].""); + else + print emit_td($strings['generic']['category']); + + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['supp_category']. ""); + else + print emit_td($strings['generic']['supp_category']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['credit'].""); + else + print emit_td($strings['generic']['credit']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['copyright']. ""); + else + print emit_td($strings['generic']['copyright']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['web_statement'].""); + else + print emit_td($strings['generic']['web_statement']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['instructions'].""); + else + print emit_td($strings['generic']['instructions']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['source'].""); + else + print emit_td($strings['generic']['source']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['trans_ref'].""); + else + print emit_td($strings['generic']['trans_ref']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['exposed'].""); + else + print emit_td($strings['generic']['exposed']); + print emit_td(emit_date_input_form("exposure_timestamp", $exp_date)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['location'].""); + else + print emit_td($strings['generic']['location']); + print emit_td(emit_combo("location", $users_location, $location, ", ", 1)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['access'].""); + else + print emit_td($strings['generic']['access']); + print ""; + display_access_combo("access_rights", $access, ""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['high_res_orig'] .""); + else + print emit_td($strings['generic']['high_res_orig']); + print ""; + display_hide_original_combo("hide_original", $hide_original); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['photo']['store'] .""); + else + print emit_td($strings['photo']['store']); + print emit_td(""); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['remark'] . ""); + else + print emit_td($strings['generic']['remark']); + print emit_td(""); + print "\n"; + +} + +function display_photo_tech_form($database, $bulk_update, + $camera, $metering, $program, $lens, + $focal_length, $filter, $film, $iso, + $aperture, $shutter, $exp_comp, $ev_diff, + $flash, $flash_mode, $flash_comp, $scanner, + $scan_res, $scan_bit, $scan_multi, $support, + $latitude, $longitude, $altitude, $direction) { + global $strings; + global $po_user; + + /* First we need to retrieve all sorts of crap from the database */ + $users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$po_user[id]"); + $users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens where users=$po_user[id]"); + $users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$po_user[id]"); + $users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$po_user[id]"); + $users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$po_user[id]"); + $users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$po_user[id]"); + $users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$po_user[id]"); + + $apertures = pg_query($database, "select identifier, value from aperture order by value"); + $focal_lengths = pg_query($database, "select identifier, value from focal_length order by value"); + $shutters = pg_query($database, "select identifier, value from shutter"); + $ev_comps = pg_query($database, "select identifier, value from ev_comp"); + $camera_metering = pg_query($database, "select identifier, value from camera_metering"); + $camera_program = pg_query($database, "select identifier, value from camera_program"); + $flash_modes = pg_query($database, "select identifier, value from flash_mode"); + $scan_resolutions= pg_query($database, "select identifier, value from scan_resolution"); + $scan_bitdepths = pg_query($database, "select identifier, value from scan_bitdepth"); + $scan_multiscans = pg_query($database, "select identifier, value from scan_multiscan"); + $iso_overrides = pg_query($database, "select identifier, value from film_iso order by value"); + + /* Now for the actual form */ + print ""; + if ($bulk_update) + print emit_td($strings['generic']['camera'] .""); + else + print emit_td($strings['generic']['camera']); + print emit_td(emit_combo("camera", $users_camera, $camera, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['camera_metering'].""); + else + print emit_td($strings['generic']['camera_metering']); + print emit_td(emit_combo("camera_metering", $camera_metering, $metering, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['camera_program'].""); + else + print emit_td($strings['generic']['camera_program']); + print emit_td(emit_combo("camera_program", $camera_program, $program, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['lens'].""); + else + print emit_td($strings['generic']['lens']); + print ""; + display_lens_combo("lens", $users_lens, $lens, 0, 0); + print ""; + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['focal_length'].""); + else + print emit_td($strings['generic']['focal_length']); + print emit_td(emit_combo("focal_length", $focal_lengths, $focal_length, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['filter'].""); + else + print emit_td($strings['generic']['filter']); + print emit_td(emit_combo("filter", $users_filter, $filter, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['film'].""); + else + print emit_td($strings['generic']['film']); + print emit_td(emit_combo("film", $users_film, $film, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['iso_override'].""); + else + print emit_td($strings['generic']['iso_override']); + print emit_td(emit_combo("iso_override", $iso_overrides, $iso, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['aperture'].""); + else + print emit_td($strings['generic']['aperture']); + print emit_td(emit_combo("aperture", $apertures, $aperture, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['shutter_speed'].""); + else + print emit_td($strings['generic']['shutter_speed']); + print emit_td(emit_combo("shutter", $shutters, $shutter, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['exp_comp'].""); + else + print emit_td($strings['generic']['exp_comp']); + print emit_td(emit_combo("exp_comp", $ev_comps, $exp_comp, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['exp_diff'].""); + else + print emit_td($strings['generic']['exp_diff']); + print emit_td(emit_combo("exp_diff", $ev_comps, $ev_diff, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['flash'].""); + else + print emit_td($strings['generic']['flash']); + print emit_td(emit_combo("flash", $users_flash, $flash, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['flash_mode'].""); + else + print emit_td($strings['generic']['flash_mode']); + print emit_td(emit_combo("flash_mode", $flash_modes, $flash_mode, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['flash_comp'].""); + else + print emit_td($strings['generic']['flash_comp']); + print emit_td(emit_combo("flash_comp", $ev_comps, $flash_comp, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['support'].""); + else + print emit_td($strings['generic']['support']); + print emit_td(emit_combo("support", $users_support, $support, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['photo']['geo-location']. " "); + else + print emit_td($strings['photo']['geo-location']); + + $latitude = htmlentities(latitude_dms($latitude, "latitude")); + $longitude = htmlentities(latitude_dms($longitude, "longitude")); + print emit_td($strings['photo']['latitude'].":
    " . + $strings['photo']['longitude'].":
    " . + $strings['photo']['altitude'].":
    " . + $strings['photo']['direction'].": "); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['scanner'].""); + else + print emit_td($strings['generic']['scanner']); + print emit_td(emit_combo("scanner", $users_scanner, $scanner, "", 0)); + print "\n"; + + print ""; + if ($bulk_update) + print emit_td($strings['generic']['scan_parameters'].""); + else + print emit_td($strings['generic']['scan_parameters']); + + print ""; + print emit_combo("scan_resolution", $scan_resolutions, $scan_res, "", 0); + print $strings['generic']['dpi'] ."  "; + print emit_combo("scan_bitdepth", $scan_bitdepths, 0, $scan_bit, 0); + print $strings['generic']['bits'] ."  "; + print emit_combo("scan_multiscan", $scan_multiscans, 0, $scan_multi, 0); + print $strings['generic']['passes'] ."  "; + print "\n"; +} + function semi_string_to_array($str){ $expr="/;(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/"; $results=preg_split($expr,trim($str)); @@ -1944,7 +2142,7 @@ function po_get_image_size($file) { $width = FALSE; $height = FALSE; - $handle = popen("$sys_exiftool -ImageWidth -ImageHeight $file", "r"); + $handle = popen("$sys_exiftool -ImageWidth -ImageHeight -Rows -Columns $file", "r"); if ($handle) { while (!feof($handle)) { $line = fgets($handle); @@ -1954,16 +2152,249 @@ function po_get_image_size($file) { $parts[1] = trim($parts[1]); if ($parts[0] == "Image Width") $width = $parts[1]; if ($parts[0] == "Image Height") $height = $parts[1]; - print "\n"; + if ($parts[0] == "Rows") $height = $parts[1]; + if ($parts[0] == "Columns") $width = $parts[1]; + // print "\n"; } pclose($handle); + } else { + // print "\n"; } if (!$width || !$height) return getimagesize($file); return array($width,$height); - } +function store_user_pref($dbh, $userid, $key, $value) { + global $po_options_default; + global $strings; + + $key2 = pg_escape_string($key); + $value2 = pg_escape_string($value); + + pg_query($dbh, "begin"); + $result = pg_query($dbh, "DELETE FROM user_preferences WHERE owner = $userid AND key = '$key2'"); + if ($result && ($po_options_default[$key] != $value)) { + $result = pg_query($dbh, "INSERT INTO user_preferences (owner, key, value) VALUES($userid, '$key2', '$value2')"); + } + + if ($result) { + pg_query($dbh, "commit"); + return TRUE; + } else { + site_push_error($strings['errors']['db_insert_failed']); + return FALSE; + } +} + +function refresh_user_prefs($database) { + global $po_options; + global $po_user; + + if (!$po_user['id']) { + $po_user['id'] = 0; + return; + } + + $user_data = pg_fetch_row(pg_query($database, "select username, password, first_name, last_name, company, contact, type from users where identifier='$po_user[id]'")); + + $po_user['username'] = $user_data[0]; + // ignore password... + $po_user['first_name'] = $user_data[2]; + $po_user['last_name'] = $user_data[3]; + $po_user['company'] = $user_data[4]; + + $po_user['contact_id'] = $user_data[5]; + $po_user['type'] = $user_data[6]; + + /* Look up spool album id */ + $users_spool = pg_query($database, "select album.identifier from album where caption = 'Spool' and users = $po_user[id]"); + $spool_album = pg_fetch_row($users_spool); + $po_user['spool_album'] = $spool_album[0]; + + /* Look up trash folder IDs */ + $query = pg_query($database, "select folder.identifier from folder where caption = 'Trash' and users = $po_user[id]"); + $folder = pg_fetch_row($query); + $po_user['trash_folder'] = $folder[0]; + + /* Contact information */ + $contact_info = pg_fetch_row(pg_query($database, "select address1, address2, city, zipcode, state, country, phone, email, url from contact_info where identifier='$po_user[contact_id]'")); + + $po_user['address1'] = $contact_info[0]; + $po_user['address2'] = $contact_info[1]; + $po_user['city'] = $contact_info[2]; + $po_user['zipcode'] = $contact_info[3]; + $po_user['state'] = $contact_info[4]; + $po_user['country'] = $contact_info[5]; + $po_user['phone'] = $contact_info[6]; + $po_user['email'] = $contact_info[7]; + $po_user['url'] = $contact_info[8]; + + /* Slurp up all user preferences */ + $user_prefs = pg_query($database, "SELECT key, value FROM user_preferences WHERE owner = $po_user[id]"); + + if ($user_prefs) { + while (($row = pg_fetch_assoc($user_prefs)) !== FALSE) { + /* We want to skip a couple of prefs */ + if ($row['key'] == "lang") continue; + + if ($row['key'] == 'passwords') + $po_options[$row['key']] = unserialize($row['value']); + else + $po_options[$row['key']] = $row['value']; + } + } + + /* Update Session state */ + $po_user['last_updated'] = time(); + store_user_pref($database, $po_user['id'], 'last_updated', $po_user['last_updated']); +} + +function emit_language_combo($lang) { + global $strings; + global $po_options; + + $rval = ""; + $i = 0; + + $rval .= ""; + $rval .= emit_td($strings['generic']['language']); + $rval .= ""; + if ($none) { + $html_string .= emit_option("null", $strings['generic']['none'], FALSE); + } + if ($all) { + $html_string .= emit_option("all", $strings['generic']['all_users'], FALSE); + } + for ($i=0; $i < pg_num_rows($user_list); $i++) { + $user = pg_fetch_row($user_list, $i); + if (($user[0] != $po_user['id']) && + ($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($user[3] == 't') && + ($user[0] != $default_user_id)) { + continue; + } + + $html_string .= emit_option($user[0], "$user[1], $user[2]", $user[0] == $default_user_id); + } + $html_string .= ""; + return $html_string; +} + +function generate_html_clients_combo($identifier, $database, $owner_user_id, $current) { + global $strings; + + $user_list = pg_query($database, "select users.identifier, last_name, first_name from users, client where users.identifier = client.client and client.users = $owner_user_id and client.trusted = 't' order by last_name, first_name"); + + $html_string = ""; + return $html_string; +} + + ?> diff --git a/src/include/config.php b/src/include/config.php index 948a12c..9a91313 100644 --- a/src/include/config.php +++ b/src/include/config.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -25,6 +25,9 @@ src/include/config_site.php */ + /* Do not remove this line */ +include_once "vars.php"; + // The PO site url $site_url = "http://localhost/po"; // This appears in the titlebar on every page. @@ -32,8 +35,8 @@ $site_title = "My Photo Organizer"; $ad_script = FALSE; -// Default sorting order -$default_order_by = 7; +// A URL to the bug tracker or whatnot for this site +$bug_url = "http://bugs.shaftnet.org/"; /* Database connection details */ @@ -44,7 +47,7 @@ $db_dsn = "dbname=po_db user=po_user password=po_password"; // $db_dsn = "host=127.0.0.1 port=5432 dbname=po_db user=po_user password=po_password"; // Use an external database via IP -// $db_dsn = "host=218.61.15.251 port=5432 dbname=po_db user=po_user password=po_password"; +// $db_dsn = "host=128.61.15.251 port=5432 dbname=po_db user=po_user password=po_password"; /* End Database details */ @@ -62,6 +65,11 @@ $local_bulk_upload = false; // is used to store all your image files $image_repository_path = "/export/po_dev_image_repository"; +// absolute path to where photo organizer should store sessions +// leave blank to use system default. +$po_session_lifetime = 60*60*24*30; /* One month */ +$po_session_path = ""; + // absolute path to your temporary directory which // is used to store printed files while they are converted // and to perform bulk uploads @@ -69,18 +77,27 @@ $tmp_volume_path = "/tmp"; // ImageMagick convert tool $sys_convert = "/usr/bin/convert"; - // ImageMagick composite tool $sys_composite = "/usr/bin/composite"; +/* Alternatively, if you want to use GraphicsMagick: */ +// $sys_convert = "/usr/bin/gm convert"; +// $sys_composite = "/usr/bin/gm composite"; + // Dave Coffin's raw image decoder $sys_dcraw = "/usr/local/bin/dcraw"; // exiftool utility $sys_exiftool = "/usr/bin/exiftool"; +// UFRaw batch decoder +$sys_ufraw = "/usr/local/bin/ufraw-batch"; + /* Raw decoders, in order of prescedence */ -$raw_decoder = "dcraw,exiftool"; +$raw_decoder = "dcraw,ufraw,exiftool"; + +// dcm2pnm tool from the dcmtk suite +$sys_dcm2pnm = "/usr/local/dicom/bin/dcm2pnm"; // PS2PDF - converts PS documents into PDF ones $sys_ps2pdf = "/usr/bin/ps2pdf"; @@ -94,70 +111,73 @@ $sys_unzip = "/usr/bin/unzip"; // The path to the current theme - relative to the PO installation directory $theme = "themes/aqua"; -// The name of the cookie which stores the user's session id -$po_cookie = "po_session_id"; +/* Default options */ +$po_options = array( + "lang" => "en_US", /* See lang/ for your options */ -// The size of the medium sized image -$image_max_size = 700; + "order_by" => 7, + "photos_per_page" => 20, + "rows_list_view" => 20, + "photo_view" => "slide", // or 'list' + + "preview_format" => 'jpeg', # or 'png' + "preview_quality" => 85, + "preview_color_space" => "RGB", + "preview_gamma" => 1, + "preview_sharpen_radius" => 0.5, + "preview_sharpen_sigma" => 0.5, + "preview_sharpen_amount" => 1.4, + "preview_sharpen_threshold" => 0.05, + "preview_border_width" => 0, + "preview_border_height" => 0, + "preview_border_color" => "000000", -// Thumbnail image size, smaller than the cell size -$thumb_max_size = 170; + "thumb_format" => 'jpeg', # or 'png' + "thumb_quality" => 85, + "thumb_color_space" => "RGB", + "thumb_gamma" => 1, + "thumb_sharpen_radius" => 0.5, + "thumb_sharpen_sigma" => 0.5, + "thumb_sharpen_amount" => 2.2, + "thumb_sharpen_threshold" => 0.00, + "thumb_border_width" => 0, + "thumb_border_height" => 0, + "thumb_border_color" => "000000", -// The size of the slide cell -$cell_size = 200; + "watermark_brightness" => 0, + "watermark_location" => "center", -// Page width -$page_width = "92%"; + "preview_copy_metadata" => 't', + "colorspace" => 1, //from vars.php -// Default paper and label -$default_paper = 13; -$default_label = 17; + "ufraw_gamma" => 0.45, + "ufraw_gamma_linearity" => 0.10, + "dcraw_brightness" => 1.0, + "raw_white_balance" => "camera", + "raw_bitdepth" => 24, + "jpgfromraw" => 't', -// Default number of columns -$default_num_of_columns = 4; -$default_num_of_rows_in_slide_view = 4; -$default_num_of_rows_in_list_view = 20; -$maximum_num_of_rows_in_slide_view = 20; -$maximum_num_of_rows_in_list_view = 100; + "print_out" => "pdf", // "ps" or "pdf" + "start_hour" => 8, + "end_hour" => 20, + "start_day" => 1, + "paper" => 13, + "label" => 17, + "popup_enable" => 't', + "popup_delay" => 100, + "search_enable_stemming" => 'f', + "search_engine_type" => 1 -// Default popup tooltip parameters -$default_popup_enable = "f"; -$default_popup_delay = 100; -$default_enable_stemming = "f"; + ); -// Default ImageMagick options -$default_im_preview_quality = 85; -$default_im_preview_color_space = "RGB"; -$default_im_preview_gamma = 1; -$default_im_preview_sharpen_radius = 0.5; -$default_im_preview_sharpen_sigma = 0.5; -$default_im_preview_sharpen_amount = 1.4; -$default_im_preview_sharpen_threshold = 0.05; -$default_im_preview_border_width = 0; -$default_im_preview_border_height = 0; -$default_im_preview_border_color = "000000"; +/* We need this to track changes */ +$po_options_default = array(); -$default_im_thumb_quality = 85; -$default_im_thumb_color_space = "RGB"; -$default_im_thumb_gamma = 1; -$default_im_thumb_sharpen_radius = 0.5; -$default_im_thumb_sharpen_sigma = 0.5; -$default_im_thumb_sharpen_amount = 2.2; -$default_im_thumb_sharpen_threshold = 0.00; -$default_im_thumb_border_width = 0; -$default_im_thumb_border_height = 0; -$default_im_thumb_border_color = "000000"; - - -// Default ImageMagick composite options -$default_im_watermark_brightness = 0; -$default_im_watermark_location = "center"; - -// Default DCRAW options -$default_dcraw_gamma = 0.6; -$default_dcraw_brightness = 1.0; -$default_dcraw_white_balanace = "camera"; -$default_dcraw_bitdepth = 24; +$po_options_default['new_user_type'] = PO_USER_TYPE_USER; +$po_options_default['volume_max_size'] = 640; // MB +$po_options_default['bulk_upload_enable'] = 't'; +$po_options_default['quota_size'] = 0; // in bytes +$po_options_default['quota_count'] = 0; // in files // You might want to add more forbidden keywords $forbidden_keywords = array("a", "b", "c", "d", "e", "f", "g", "h", @@ -168,8 +188,29 @@ $forbidden_keywords = array("a", "b", "c", "d", "e", "f", "g", "h", /* Default error reporting level */ error_reporting(E_ALL ^ E_NOTICE); -/* Do NOT remove the below lines */ +/* Default credentials expiration time */ +$default_cred_timeout = 60 * 10; // 10 minutes + +$po_version = "2.34"; + +/* Do NOT modify anything below this line unless you know what you're doing */ $install_enabled=0; -include_once "config_site.php" +include_once "config_site.php"; + +$po_options['last_updated'] = ''; +$po_options['watermark_photo'] = 0; +$po_options['watermark_path'] = ''; +$po_options['passwords'] = array(); + +foreach ($po_options as $key => $value) { + $po_options_default[$key] = $value; +} + +$po_options['bulk_upload_enable'] = $po_options_default['bulk_upload_enable']; +$po_options['quota_size'] = $po_options_default['quota_size']; +$po_options['quota_count'] = $po_options_default['quota_count']; + +include_once "lang/en_US.php"; +include_once "$theme/theme.php"; ?> diff --git a/src/include/config_site.php.dist b/src/include/config_site.php.dist index e269e59..1c5d50b 100644 --- a/src/include/config_site.php.dist +++ b/src/include/config_site.php.dist @@ -4,15 +4,22 @@ instead of modifying config.php */ -$site_url = "http://localhost/po"; // This site's url -$site_title = "My Photo Organizer"; // Appears in the titlebar on every page. - // For additional database configuration examples, see config.php // Use a local database via UNIX socket (fast and secure, default) $db_dsn = "dbname=po_db user=po_user password=po_password"; +$site_url = "http://localhost/po"; // This site's url +$site_title = "My Photo Organizer"; // Appears in the titlebar on every page. + $image_repository_path = "/export/po_dev_image_repository"; +/* The default language -- see src/lang/* for your options */ +$po_options['lang'] = "en_US"; + +/* You can specify other options here; see config.php for full list */ +// $po_options['preview_quality'] = 90; +// $po_options['thumb_quality'] = 90; + // set this to 0 once your installation is finished. $install_enabled = 1; diff --git a/src/include/contacts.php b/src/include/contacts.php index 5bbbc9b..860527d 100644 --- a/src/include/contacts.php +++ b/src/include/contacts.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,67 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -function display_clients($database, $my_user_id) { - global $user_type; - global $color; - global $style; +function emit_event_combo($database, $identifier, $owner, $selected) { + global $strings; - print "\n"; - print "\n"; - print "\n"; + $rval = "\n"; + + return $rval; +} + +function emit_events_for_user($database, $owner, $client) { + $rval = ""; + + $query = pg_query($database, "select identifier, start_date, end_date, remark from calendar where users = $owner and client = $client"); + + if (!$query) + return $rval; + + for ($i = 0 ; $i < pg_num_rows($query) ; $i++) { + $data = pg_fetch_assoc($query, $i); + $rval .= ""; + $rval .= emit_td(emit_date_html($data['start_date'], "date")); + $rval .= emit_td(emit_date_html($data['start_date'], "time") ." - ". emit_date_html($data['end_date'], "time")); + $rval .= emit_td($data['remark']); + $rval .= ""; + } + if ($i > 0) { + $rval = "
    My Clients
    $rval
    "; + } + + return $rval; +} + +function display_clients($database, $my_user_id) { + global $strings; + global $po_user; + global $client_status; + + print "\n"; + print "\n"; + print emit_td($strings['datebook']['my_contacts'], 'colspan="6"'); print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['generic']['client_name'], 'width="50%"'); + print emit_th($strings['generic']['status'], 'width="15%"'); + print emit_th($strings['generic']['trusted'], 'width="10%"'); + print emit_th($strings['generic']['reg_date'], 'width="15%"'); + if ($po_user['type'] >= PO_USER_TYPE_USER) { + print emit_th(emit_a("register.php", $strings['generic']['register']), 'width="10%" colspan="2"'); + } else { + print emit_th('', 'width="10%" colspan="2"'); + } print "\n"; $all_clients = pg_query($database, "select identifier, client, last_name, first_name, date_of_creation, value, type, trusted @@ -46,34 +92,37 @@ function display_clients($database, $my_user_id) { } print "\n"; - if ($client[6] > $user_type['client']) - print "\n"; + if ($client[6] > PO_USER_TYPE_CLIENT) + print emit_td(emit_a("user.php?user=$client[1]", "$client[2] $client[3]")); else - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_td("$client[2] $client[3]"); + print emit_td($strings['generic'][$client_status[$client[5]]]); + print emit_td(emit_yes_no_text($client[7])); + print emit_td(emit_date_html($client[4], 'date')); + print emit_td(emit_a("client.edit.php?client=$client[0]", $strings['generic']['edit'])); + print emit_td(emit_a("client.del.php?client=$client[0]", $strings['generic']['delete'])); print "\n"; + print ""; } print "
    Client NameStatusTrustedRegistration Date 
    $client[2] $client[3]$client[2] $client[3]$client[5]"; display_yes_no_text($client[7]); print "".generate_date_html($client[4], 'date', 1). "EditDelete
    "; + print emit_events_for_user($database, $my_user_id, $client[1]); + print "
    \n"; } function display_protected_photographers($database, $my_user_id) { - global $color; - global $style; + global $strings; + global $client_status; - print "\n"; - print "\n"; - print "\n"; + print "
    I am the client of the following users
    \n"; + print "\n"; + print emit_td($strings['datebook']['i_am_client_of'], 'colspan="4"'); print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['generic']['user'], 'width="50%"'); + print emit_th($strings['generic']['status'], 'width="20%"'); + print emit_th($strings['generic']['reg_date'], 'width="20%"'); + print emit_th('', 'width="10%"'); print "\n"; $all_subscribed_users = pg_query($database, " select identifier, users, last_name, first_name, date_of_creation, value from view_users_subscribed_to where client='$my_user_id' and status!='4'"); @@ -85,11 +134,14 @@ function display_protected_photographers($database, $my_user_id) { $subscribed_user[2] = sprintf("%s,", $subscribed_user[2]); } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_td(emit_a("user.php?user=$subscribed_user[1]", "$subscribed_user[2] $subscribed_user[3]")); + print emit_td($strings['generic'][$client_status[$subscribed_user[5]]]); + print emit_td(emit_date_html($subscribed_user[4], 'date')); + print emit_td(emit_a("subscription.del.php?client=$subscribed_user[0]", $strings['generic']['delete'])); print "\n"; + print ""; } print "
    UserStatusRegistration Date 
    $subscribed_user[2] $subscribed_user[3]$subscribed_user[5]".generate_date_html($subscribed_user[4], 'date', 1). "Delete
    "; + print emit_events_for_user($database, $subscribed_user[1], $my_user_id); + print "
    \n"; } diff --git a/src/include/database.php b/src/include/database.php index 17f55ea..d310418 100644 --- a/src/include/database.php +++ b/src/include/database.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -33,8 +33,12 @@ function po_dbconnect() { } } -// return pg_connect($db_dsn); /* Normal */ - return pg_pconnect($db_dsn); /* Persistent */ + // $dbh = pg_connect($db_dsn); /* Normal */ + $dbh = pg_pconnect($db_dsn); /* Persistent */ + if ($dbh) + pg_set_client_encoding($dbh, 'UTF-8'); + + return $dbh; } ?> diff --git a/src/include/datebook.php b/src/include/datebook.php index 82c1d8f..0b052c2 100644 --- a/src/include/datebook.php +++ b/src/include/datebook.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,172 +17,40 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -$datebook_data = array("clients" => array("idx" => 1, "active_img" => "$theme/navigator.db.clients.a.gif", "img" => "$theme/navigator.db.clients.gif", link => "my.datebook.php?selector=1", "alt" => " Clients "), - "orders" => array("idx" => 2, "active_img" => "$theme/navigator.db.pending.orders.a.gif", "img" => "$theme/navigator.db.pending.orders.gif", link => "my.datebook.php?selector=2", "alt" => " Pending Orders "), - "shipments" => array("idx" => 3, "active_img" => "$theme/navigator.db.shipments.a.gif", "img" => "$theme/navigator.db.shipments.gif", link => "my.datebook.php?selector=3", "alt" => " Shipments ")); - - -function displayMerchandiserTransaction($database, $user_id, $transaction_status) { - global $style; - global $color; - - $all_pending_transactions = pg_query($database, " - select distinct on (shop_transaction.identifier) - shop_transaction.identifier, - (select sum(shop_order.pieces*photo_item.price) from shop_order, photo_item where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier) as total_price, - (select sum(pieces) from shop_order where shop_order.transaction=shop_transaction.identifier) as items, - (select alpha_code from shop_order, photo_item, currency where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier and photo_item.currency=currency.identifier limit 1) as total_price, - client, first_name, last_name, - shop_transaction.remark - from shop_transaction, shop_order, users, photo_item, photo - where shop_order.client=users.identifier - and shop_order.item=photo_item.identifier - and photo_item.photo=photo.identifier - and photo.users=$user_id - and shop_transaction.status=$transaction_status - and shop_transaction.identifier=shop_order.transaction - order by shop_transaction.identifier desc"); - - if (pg_num_rows($all_pending_transactions) == 0) { - if ($transaction_status) - print "
    There are no pending merchandiser transactions.
    "; - return; - } - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - - for ($item = 0; $item < pg_num_rows($all_pending_transactions); $item++) { - $transaction = pg_fetch_row($all_pending_transactions, $item); - $display_transaction_id = str_pad($transaction[0], 6, "0", STR_PAD_LEFT); - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } - - print "
    OrderValuePiecesClientClient's Remark
    $display_transaction_id$transaction[3] $transaction[1]$transaction[2]$transaction[6], $transaction[5]$transaction[7]
    "; - print "

    "; -} - - -function displayClientTransaction($database, $user_id, $transaction_status) { - global $style; - global $color; - - $all_pending_transactions = pg_query($database, " - select distinct on (shop_transaction.identifier) - shop_transaction.identifier, - (select sum(shop_order.pieces*photo_item.price) from shop_order, photo_item where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier) as total_price, - (select sum(pieces) from shop_order where shop_order.transaction=shop_transaction.identifier) as items, - (select alpha_code from shop_order, photo_item, currency where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier and photo_item.currency=currency.identifier limit 1) as total_price, - client, first_name, last_name, - shop_transaction.remark - from shop_transaction, shop_order, users, photo_item, photo - where shop_order.client=users.identifier - and shop_order.item=photo_item.identifier - and photo_item.photo=photo.identifier - and shop_order.client=$user_id - and shop_transaction.status=$transaction_status - and shop_transaction.identifier=shop_order.transaction - order by shop_transaction.identifier desc"); - - if (pg_num_rows($all_pending_transactions) == 0) { - if ($transaction_status) - print "
    There are no pending client transactions.
    "; - return; - } - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - - for ($item = 0; $item < pg_num_rows($all_pending_transactions); $item++) { - $transaction = pg_fetch_row($all_pending_transactions, $item); - $display_transaction_id = str_pad($transaction[0], 6, "0", STR_PAD_LEFT); - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } - - print "
    OrderValuePiecesClientClient's Remark
    $display_transaction_id$transaction[3] $transaction[1]$transaction[2]$transaction[6], $transaction[5]$transaction[7]
    "; - print "

    "; -} - - -function displayDayEventHTML($event_id, $event_description, $start_date, $end_date, $view, $bgcolor) { - global $color; - global $style; - +function emit_DayEventHTML($event_id, $event_description, $start_date, $end_date, $view) { if (strlen($event_description) > 30) $event_description = sprintf("%0.30s", $event_description); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    "; + $rval = "\n"; + $rval .= "\n"; + $rval .= emit_td(emit_date_html($start_date, "time")); + $rval .= emit_td(emit_a("event.php?event=$event_id&view=$view", $event_description)); + $rval .= emit_td(emit_date_html($end_date, "time"));; + $rval .= "\n"; + $rval .= "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    ".generate_date_html($start_date, "time", 1).""; - print "$event_description
    \n"; - - print "
    ".generate_date_html($end_date, "time", 1)."
    \n"; + return $rval; } -function displayWeekEventHTML($event_id, $event_description, $start_date, $end_date, $view, $bgcolor) { - global $color; - global $style; - +function emit_WeekEventHTML($event_id, $event_description, $start_date, $end_date, $view) { if (strlen($event_description) > 15) $event_description = sprintf("%0.15s", $event_description); + + $rval = emit_date_html($start_date, "time")." - ".emit_date_html($end_date, "time"); - print "\n"; - print ""; - - print "\n"; - print "\n"; - print "\n"; - print "
    ".generate_date_html($start_date, "time", 1)."-".generate_date_html($end_date, "time", 1).print "
    "; - print "$event_description
    \n"; + $rval .= "
    "; + $rval .= emit_a("event.php?event=$event_id&view=$view", $event_description); + return $rval; } -function displayMonthEventHTML($event_id, $start_date, $end_date, $view, $bgcolor) { - global $color; - global $style; - - print "\n"; - print ""; - print "
    \n" .generate_date_html($start_date, "time", 1). "-".generate_date_html($end_date, "time", 1); - print "
    \n"; +function emit_MonthEventHTML($event_id, $start_date, $end_date, $view) { + return emit_a("event.php?event=$event_id&view=$view", emit_date_html($start_date, "time"). " - ".emit_date_html($end_date, "time")); } -function displayDayHTML($database, $user_id, $year, $month, $day, $cal_start_hour, $cal_end_hour, $dayNames, $startDay, $view) { - global $color; - global $style; - +function displayDayHTML($database, $user_id, $year, $month, $day, $cal_start_hour, $cal_end_hour, $view, $showcounts) { + global $strings; + $date = sprintf("%04d-%02d-%02d", $year, $month, $day); $result = pg_query($database, "select identifier, start_date, end_date, remark from calendar where users=$user_id and (start_date ~* '$date' or end_date ~* '$date') order by start_date"); @@ -200,13 +68,16 @@ function displayDayHTML($database, $user_id, $year, $month, $day, $cal_start_hou $cells = $cal_end_hour - $cal_start_hour + 1; - print "\n"; + print "
    "; + print "
    \n"; print "\n"; $cell_width=floor(90/($cal_end_hour - $cal_start_hour + 1)); - for ($i = $cal_start_hour; $i <= $cal_end_hour; $i ++) - print "\n"; - print "\n"; + for ($i = $cal_start_hour; $i <= $cal_end_hour; $i ++) { + print emit_th("$i", "width=\"$cell_width%\""); + } + print emit_th(emit_a("event.add.php?year=$year&month=$month&day=$day", + $strings['generic']['add']), "width=\"10%\" colspan=\"2\""); + print "\n"; for ($event = 0; $event < $num_of_events; $event++) { @@ -216,89 +87,96 @@ function displayDayHTML($database, $user_id, $year, $month, $day, $cal_start_hou $end_minute = substr($event_data[2], 14, 2); print "\n"; for ($i = $cal_start_hour; $i < $start_hour; $i ++) - print "\n"; + print emit_td(" "); $event_cells = $end_hour - $start_hour; if ($end_minute != 0) $event_cells++; - print "\n"; + print emit_td(emit_DayEventHTML($event_data[0], $event_data[3], $event_data[1], $event_data[2], $view), "class=\"selected\" colspan=\"$event_cells\""); for ($i = $end_hour; $i < $cal_end_hour; $i ++) - print "\n"; + print emit_td(" "); if (($end_hour != $start_hour) && ($end_minute == 0)) - print "\n"; + print emit_td(" "); - print "\n"; - print "\n"; + print emit_td(emit_a("event.edit.php?event=$event_data[0]", $strings['generic']['edit'])); + print emit_td(emit_a("event.del.php?event=$event_data[0]", $strings['generic']['delete'])); print ""; } - print "\n"; - $cells += 2; - if ($num_of_events == 0) - $message="No events for this day"; - else - $message=" "; - print "\n"; - print ""; + + if ($num_of_events == 0) { + print "\n"; + $cells += 2; + $message=$strings['datebook']['no_events']; + print emit_th($message, "colspan=\"$cells\""); + print ""; + } print "
    $i"; - print "Add
     "; - displayDayEventHTML($event_data[0], $event_data[3], $event_data[1], $event_data[2], $view, $color[selected]); - print "  EditDelete
    $message
    \n"; + print ""; } -function displayWeekHTML($database, $user_id, $year, $week, $dayNames, $startDay, $view) { - global $color; - global $style; +function displayWeekHTML($database, $user_id, $year, $week, $dayNames, $startDay, $view, $showcounts) { $firstDayOfWeek = getFirstDayOfWeek($year, $week, $startDay); - print "\n"; + print "
    "; + print "
    \n"; print "\n"; for ($dayIncrement = 0; $dayIncrement < 7; $dayIncrement++) { $curDate = adjustDay($firstDayOfWeek[0], $firstDayOfWeek[1], $firstDayOfWeek[2] + $dayIncrement); - print "\n"; + print emit_th(emit_a("my.datebook.php?view=1&year=$curDate[0]&month=$curDate[1]&day=$curDate[2]\"", "" . $dayNames[($startDay+$dayIncrement)%7] . ", $curDate[2]"), 'width="14%"'); } print ""; print "\n"; for ($dayIncrement = 0; $dayIncrement < 7; $dayIncrement++) { + $num_photos = 0; $curDate = adjustDay($firstDayOfWeek[0], $firstDayOfWeek[1], $firstDayOfWeek[2] + $dayIncrement); + if ($showcounts) { + $num_photos = photos_between_dates($database, $user_id, + mktime(0,0,0,$curDate[1],$curDate[2],$curDate[0]), + mktime(0,0,0,$curDate[1],$curDate[2]+1,$curDate[0])); + } + $today = getdate(time()); if ($curDate[0] == $today["year"] && $curDate[1] == $today["mon"] && $curDate[2] == $today["mday"]) - $bgcolor = $color[selected]; + $bgcolor = "class=\"selected\""; else - $bgcolor = $color[highlight]; + $bgcolor = ""; - print "\n"; + print emit_td($string, $bgcolor); } + print "\n"; - print "\n"; - print "\n"; - print ""; print "
    " . $dayNames[($startDay+$dayIncrement)%7] . ", $curDate[2]
    "; + $string = ""; + if ($showcounts && $num_photos > 0) { + $string .= "[$num_photos]
    "; + } $date = sprintf("%04d-%02d-%02d", $curDate[0], $curDate[1], $curDate[2]); $result = pg_query($database, "select identifier, start_date, end_date, remark from calendar where users=$user_id and (start_date ~* '$date' or end_date ~* '$date') order by start_date"); $num_of_events = pg_num_rows($result); for ($event = 0; $event < $num_of_events; $event++) { $event_data = pg_fetch_row($result, $event); - displayWeekEventHTML($event_data[0], $event_data[3], $event_data[1], $event_data[2], $view, $bgcolor); + $string .= emit_WeekEventHTML($event_data[0], $event_data[3], $event_data[1], $event_data[2], $view); } + $string .= " "; - print "
     
    \n"; + print ""; } -function displayMonthHTML($database, $user_id, $year, $month, $dayNames, $startDay, $view) { - global $color; - global $style; +function displayMonthHTML($database, $user_id, $year, $month, $dayNames, $startDay, $view, $showcounts) { + global $strings; - print "\n"; + print "
    "; + print "
    \n"; print "\n"; - print "\n"; + print emit_th($strings['generic']['week'], "width=\"2%\""); for ($dayIncrement = 0; $dayIncrement < 7; $dayIncrement++) - print "\n"; + print emit_th("".$dayNames[($startDay + $dayIncrement) % 7]."", "width=\"14%\""); print "\n"; - // get timestamp of first day of month at noon $timestamp = mktime(12, 0, 0, $month, 1, $year); // get first day index 0 Sunday @@ -315,37 +193,49 @@ function displayMonthHTML($database, $user_id, $year, $month, $dayNames, $startD print "\n"; $curDate = adjustDay($year, $month, $day); $weekNumber=getWeekNumber($curDate[0], $curDate[1], $curDate[2], $startDay); - print "\n"; + print emit_td(emit_a("my.datebook.php?view=2&year=$year&month=$curDate[1]&day=$curDate[2]", "$weekNumber")); for ($i = 0; $i < 7; $i++) { $curDate = adjustDay($year, $month, $day); - $bgcolor = $color[highlight]; + $num_photos = 0; + if ($showcounts) { + $num_photos = photos_between_dates($database, $user_id, + mktime(0,0,0,$curDate[1],$curDate[2],$curDate[0]), + mktime(0,0,0,$curDate[1],$curDate[2]+1,$curDate[0])); + } + + $bgcolor = ""; if ($curDate[2]!=$day) - $bgcolor = $color[table_body]; - if ($year == $today["year"] && $month == $today["mon"] && $day == $today["mday"]) - $bgcolor = $color[selected]; - print "\n"; + print emit_td($string, $bgcolor); $day++; } print "\n"; } - print "\n"; - print "\n"; - print ""; + print "
    Week" . $dayNames[($startDay + $dayIncrement) % 7] . "
    "; - print "$weekNumber"; - print "
    "; - print "$curDate[2] "; - print ""; + $bgcolor = "class=\"inactive\""; + + if (($year == $today["year"]) && + ($month == $today["mon"]) && + ($day == $today["mday"])) + $bgcolor = "class=\"selected\""; + + $string = ""; + + $bgcolor .= " align=\"left\" "; + + $string .= emit_a("my.datebook.php?view=1&year=$curDate[0]&month=$curDate[1]&day=$curDate[2]", "$curDate[2]"); + if ($showcounts && $num_photos > 0) { + $string .= "  [$num_photos]"; + } + $string .= "
    "; $date = sprintf("%04d-%02d-%02d", $curDate[0], $curDate[1], $curDate[2]); $result = pg_query($database, "select identifier, start_date, end_date from calendar where users=$user_id and (start_date ~* '$date' or end_date ~* '$date') order by start_date"); $num_of_events = pg_num_rows($result); for ($event = 0; $event < $num_of_events; $event++) { $event_data = pg_fetch_row($result, $event); - displayMonthEventHTML($event_data[0], $event_data[1], $event_data[2], $view, $bgcolor); + $string .= emit_MonthEventHTML($event_data[0], $event_data[1], $event_data[2], $view); } - print "
    "; - - print "
     
    \n"; + print ""; } ?> diff --git a/src/include/exif.php b/src/include/exif.php index 3d959a1..f5c3194 100644 --- a/src/include/exif.php +++ b/src/include/exif.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,35 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "exifer/exif.php"; - -function validate_exif_string($exif_string) { - $string_length = strlen($exif_string); - $newstring = ""; - $j = 0; - - /* Remove non displayable ASCII characters */ - for ($i=0; $i < $string_length; $i++) { - $ascii_num = ord($exif_string[$i]); - - if ($ascii_num == 0x27) - continue; - - if ((0xff > $ascii_num) && ($ascii_num > 0x1F)) { - $newstring = $newstring . $exif_string[$i]; - $j++; - } - } - - return pg_escape_string($newstring); -} - - -function replace_resolution_unit($string, $resolution_unit) { - $trans = array("ResolutionUnit" => $resolution_unit); - return strtr($string, $trans); -} - function convert_exif2sql_timestamp($timestamp) { if (!$timestamp) return ""; @@ -67,17 +38,6 @@ function convert_exif2sql_timestamp($timestamp) { return $sql_timestamp; } -/* Convert EXIF ratios (eg 60/10, 640/32) into a real number */ -function convert_exif_ratio($ratio) { - $pos = strpos($ratio, "/"); - if ($pos != false) { - $value = substr($ratio, 0, $pos); - $value /= substr($ratio, $pos + 1); - $ratio = $value; - } - return $ratio; -} - function convert_exif_aperture($database, $aperture) { $aperture_id = "null"; $minimum_distance = 10000; @@ -137,6 +97,10 @@ function convert_exif_ev_comp($database, $ev_comp) { $ev_comp_id = "null"; $minimum_distance = 10000; + $foo = explode('/', $ev_comp); + if (count($foo) == 2) + $ev_comp = $foo[0] / $foo[1]; + $all_ev_comps = pg_query($database, "select identifier, value from ev_comp"); for ($item = 0; $item < pg_num_rows($all_ev_comps); $item++) { $current = pg_fetch_row($all_ev_comps, $item); @@ -170,29 +134,21 @@ function convert_exif_focal_length($database, $focal_length) { return $focal_length_id; } -function convert_exif_iso_film($database, $user_id, $iso) { - $all_digital_films = pg_query($database, " - select film.identifier, film_iso.value - from film, film_type, film_format, film_iso - where film.users = $user_id - and film.type = film_type.identifier - and film_type.format = film_format.identifier - and film_format.value = 'Digital' - and film_type.iso = film_iso.identifier"); +function convert_exif_iso($database, $iso) { + $row = pg_fetch_row(pg_query($database, " + select identifier + from film_iso + where value = $iso")); - /* unlike elsewhere w look for exact matches */ - for ($item = 0; $item < pg_num_rows($all_digital_films); $item++) { - $current = pg_fetch_row($all_digital_films, $item); - if ($current[1] == $iso) - return $current[0]; - } - - return "null"; + if ($row === FALSE) + return "null"; + else + return $row[0]; } -function convert_exif_camera($database, $user_id, $camera_make, $camera_model) { +function convert_exif_camera($database, $user_id, &$image_data, $camera_make, $camera_model) { $camera = pg_query($database, " - select camera.identifier + select camera.identifier, camera_type.raw_icc_profile, camera.ignore_comment from camera, camera_type, manufacturer where '$camera_make' ~* manufacturer.name and '$camera_model' ~* camera_type.model @@ -201,296 +157,210 @@ function convert_exif_camera($database, $user_id, $camera_make, $camera_model) { and camera.users = $user_id"); if (!$camera) - return "null"; + return FALSE; if (pg_num_rows($camera) > 0) { $this_camera = pg_fetch_row($camera, 0); - return $this_camera[0]; + $image_data['camera'] = $this_camera[0]; + $image_data['camera_input_profile'] = $this_camera[1]; + if ($this_camera[2]) + $image_data['IgnoreExifUserComment'] = TRUE; + + return TRUE; } - return "null"; + return FALSE; } -function convert_exif_camera_profile($database, $user_id, $camera_make, $camera_model) { - $camera = pg_query($database, " - select camera_type.raw_icc_profile - from camera, camera_type, manufacturer - where '$camera_make' ~* manufacturer.name - and '$camera_model' ~* camera_type.model - and camera_type.identifier = camera.type - and camera_type.manufacturer = manufacturer.identifier - and camera.users = $user_id"); +function convert_exif_lens($database, $user_id, &$image_data, $lens_id) { + $lens_id = pg_escape_string($lens_id); - if (!$camera) - return "null"; + $lens = pg_query($database, "select lens.identifier + from lens_type, lens + where lens_type.identifier = lens.type + and exiftool_lens_id = '$lens_id' + and lens.users = $user_id"); - if (pg_num_rows($camera) > 0) { - $this_camera = pg_fetch_row($camera, 0); - return $this_camera[0]; + if (!$lens) + return FALSE; + + if (pg_num_rows($lens) > 0) { + $my_lens = pg_fetch_row($lens, 0); + $image_data['lens'] = $my_lens[0]; + return TRUE; } - return "null"; + return FALSE; } -function exif_string_helper(&$image_data, $exif_data, $image_key, $exif_key) -{ +function exif_string_helper(&$image_data, $exif_data, $image_key, $exif_key) { $tmp = pg_escape_string($exif_data[$exif_key]); if (strlen($tmp)) { $image_data[$image_key] = $tmp; } } +function photo_parse_exif_orientation_colorspace($database, $index, $user_id, $image_data, $tag) { + $exif_data = $image_data["exiftool_data_$tag"]; + + /* Orientation -- Map the new to the old */ + switch ($exif_data["Orientation"]) { + case 'Mirror horizontal': /* 2 */ + $image_data["orientation"] = "Mirrored"; + break; + case 'Rotate 180': /* 3 */ + $image_data["orientation"] = "Upsidedown"; + break; + case 'Mirror vertical': /* 4 */ + $image_data["orientation"] = "Upsidedown Mirrored"; + break; + case 'Mirror horizontal and rotate 270 CW': /* 5 */ + $image_data["orientation"] = "90 deg CW Mirrored"; + break; + case 'Rotate 90 CW': /* 6 */ + $image_data["orientation"] = "90 deg CW"; + break; + case 'Mirror horizontal and rotate 90 CW': /* 7 */ + $image_data["orientation"] = "90 deg CCW Mirrored"; + break; + case 'Rotate 270 CW': /* 8 */ + $image_data["orientation"] = "90 deg CCW"; + break; + case 'Horizontal (normal)': /* 1 */ + $image_data["orientation"] = "Normal (0 deg)"; + break; + } + + $image_data["orientation_orig"] = $image_data["orientation"]; + + /* So are Color Spaces */ + if (isset($exif_data["ICC Profile"])) + $image_data["colorspace"] = 99; /* Embedded Profile */ + else if (isset($exif_data["Profile Class"])) + $image_data["colorspace"] = 99; /* Embedded Profile */ + else if (substr_compare($image_data['file'][$index]['original_name'], "_", 0, 1) === 0) + $image_data["colorspace"] = 2; /* Adobe RGB */ + else if (isset($exif_data["Color Space"])) { + $image_data["colorspace"] = 1; /* Default to sRGB */ + if ($exif_data["Color Space"] == "Adobe RGB") + $image_data["colorspace"] = 2; /* Adobe RGB */ + else if ($exif_data["Color Space"] != "sRGB") + $image_data["colorspace"] = 1; /* Anything other than 'sRGB' is undefined, but we have to use it anway... */ + } + + if (isset($exif_data["Camera Model Name"]) || + isset($exif_data["Make"])) { + convert_exif_camera($database, $user_id, $image_data, $exif_data["Make"], $exif_data["Camera Model Name"]); + } + + return $image_data; +} + function photo_parse_exif($database, $index, $user_id, $image_data) { - global $sys_exiftool; + global $strings; + global $po_options; - /* Try to use exiftool first */ - if (is_executable($sys_exiftool)) { - $handle = popen("$sys_exiftool " . $image_data['file'][$index]['name_tmp'], "r"); - if ($handle) { - $image_data["exif"] = ""; - while (!feof($handle)) { - $line = fgets($handle); - $parts = explode(":", $line, 2); - $parts[0] = trim($parts[0]); - if (!isset($parts[1])) continue; - $parts[1] = trim($parts[1]); - if ($parts[0] == "File Name") continue; - if ($parts[0] == "Directory") continue; - if (substr($parts[1], 2, 6) == "Binary") continue; - // print "
  • key: $parts[0] value: $parts[1]"; - // $image_data["exif"] = $image_data["exif"] . "$line"; - $image_data["exif"] .= "$parts[0]$parts[1]"; - $exif_data[$parts[0]] = $parts[1]; - } - pclose($handle); - $image_data["exif"] = pg_escape_string($image_data["exif"]); - $image_data["exif"] = ""; // XXX don't store exif data. - - /* Now we parse the data */ - if (isset($exif_data["Artist"])) - exif_string_helper($image_data, $exif_data, "author", "Artist"); - - if (isset($exif_data["Copyright"])) - exif_string_helper($image_data, $exif_data, "copyright", "Copyright"); - - if (!$image_data['IgnoreExifUserComment']) - exif_string_helper($image_data, $exif_data, "title", "User Comment"); - - if (isset($exif_data["Date/Time Original"])) - $image_data["date_of_exposure"] = convert_exif2sql_timestamp($exif_data["Date/Time Original"]); - - if (isset($exif_data["Create Date"])) - if ($image_data["date_of_exposure"] == "") - $image_data["date_of_exposure"] = convert_exif2sql_timestamp($exif_data["Create Date"]); - - if (isset($exif_data["Camera Model Name"])) { - $image_data["camera"] = convert_exif_camera($database, $user_id, validate_exif_string($exif_data["Make"]), validate_exif_string($exif_data["Camera Model Name"])); - $image_data["camera_input_profile"] = convert_exif_camera_profile($database, $user_id, validate_exif_string($exif_data["Make"]), validate_exif_string($exif_data["Camera Model Name"])); - } - - if (isset($exif_data["ISO"])) - $image_data["film"] = convert_exif_iso_film($database, $user_id, $exif_data["ISO"]); - - if (isset($exif_data["Flash Exposure Compensation"])) - $image_data["flash_comp"] = convert_exif_ev_comp($database, $exif_data["Flash Exposure Compensation"]); - - $tmp = $exif_data["Focal Length"]; - $tmp = substr($tmp, 0, strpos($tmp, 'mm')); - - if ($exif_data["Scale Factor To 35mm Equivalent"] > 2) { - if ($exif_data["Focal Length In 35mm Format"]) { - $tmp = $exif_data["Focal Length In 35mm Format"]; - $tmp = substr($tmp, 0, strpos($tmp, 'mm')); - } else { - $tmp = $tmp * $exif_data["Scale Factor To 35mm Equivalent"]; - } - } - - if (isset($exif_data["Focal Length"])) - $image_data["focal_length"] = convert_exif_focal_length($database, $tmp); - - if (isset($exif_data["Exposure Compensation"])) - $image_data["exp_comp"] = convert_exif_ev_comp($database, $exif_data["Exposure Compensation"]); - - if (isset($exif_data["Exposure Difference"])) - $image_data["exp_diff"] = convert_exif_ev_comp($database, $exif_data["Exposure Difference"]); - - if (isset($exif_data["F Number"])) - $image_data["aperture"] = convert_exif_aperture($database, $exif_data["F Number"]); - - if (isset($exif_data["Shutter Speed"])) - $image_data["shutter"] = convert_exif_shutter($database, $exif_data["Shutter Speed"]); - - /* Color Spaces! */ - if (isset($exif_data["ICC Profile"])) - $image_data["colorspace"] = 99; /* Embedded Profile */ - else if (isset($exif_data["Profile Class"])) - $image_data["colorspace"] = 99; /* Embedded Profile */ - else if (substr_compare($image_data['file'][$index]['original_name'], "_", 0, 1) == 0) - $image_data["colorspace"]; /* Adobe RGB */ - else if (isset($exif_data["Color Space"])) { - $image_data["colorspace"] = 1; /* Default to sRGB */ - if ($exif_data["Color Space"] == "Adobe RGB") - $image_data["colorspace"] = 2; /* Adobe RGB */ - else if ($exif_data["Color Space"] != "sRGB") - $image_data["colorspace"] = 1; /* Anything other than 'sRGB' is undefined, but we have to use it anway... */ - } - - /* Orientation -- Map the new to the old */ - switch ($exif_data["Orientation"]) { - case 'Mirror horizontal': /* 2 */ - $image_data["orientation"] = "Mirrored"; - break; - case 'Rotate 180': /* 3 */ - $image_data["orientation"] = "Upsidedown"; - break; - case 'Mirror vertical': /* 4 */ - $image_data["orientation"] = "Upsidedown Mirrored"; - break; - case 'Mirror horizontal and rotate 270 CW': /* 5 */ - $image_data["orientation"] = "90 deg CW Mirrored"; - break; - case 'Rotate 90 CW': /* 6 */ - $image_data["orientation"] = "90 deg CW"; - break; - case 'Mirror horizontal and rotate 90 CW': /* 7 */ - $image_data["orientation"] = "90 deg CCW Mirrored"; - break; - case 'Rotate 270 CW': /* 8 */ - $image_data["orientation"] = "90 deg CCW"; - break; - case 'Horizontal (normal)': /* 1 */ - default: - $image_data["orientation"] = "Normal (0 deg)"; - break; - } - - // New: "metering" "program" "flash" and "flash mode" - - return $image_data; - } - } - - /* Fall back on internal EXIFER code */ - - $exif = @read_exif_data_raw($image_data['file'][$index]['name_tmp'], 0); - - if ($exif === FALSE) - return $image_data; - - print "
  • Extracting EXIF data ... "; - - /* first go through all text fields and remove undisplayable characters */ - - if (strlen(validate_exif_string($exif["IFD0"]["Artist"]))) { - $image_data["author"] = validate_exif_string($exif["IFD0"]["Artist"]); - } - - $title = validate_exif_string($exif["SubIFD"]["UserComment"]); - if ($title == "") - $title = validate_exif_string($exif["IFD0"]["UserCommentOld"]); - if ($title == "") - $title = validate_exif_string($exif["SubIFD"]["UserCommentOld"]); - - if(strlen($title) && !$image_data['IgnoreExifUserComment']) - $image_data["title"] = $title; - - - if (strlen(validate_exif_string($exif["IFD0"]["Copyright"]))) { - $image_data["copyright"] = validate_exif_string($exif["IFD0"]["Copyright"]); - } - - $image_data["date_of_exposure"] = ""; - $image_data["date_of_exposure"] = convert_exif2sql_timestamp($exif["SubIFD"]["DateTimeOriginal"]); - if ($image_data["date_of_exposure"] == "") - $image_data["date_of_exposure"] = convert_exif2sql_timestamp($exif["SubIFD"]["DateTimedigitized"]); - if ($image_data["date_of_exposure"] == "") - $image_data["date_of_exposure"] = convert_exif2sql_timestamp($exif["IFD0"]["DateTime"]); - - $image_data["camera"] = convert_exif_camera($database, $user_id, validate_exif_string($exif["IFD0"]["Make"]), validate_exif_string($exif["IFD0"]["Model"])); - $image_data["camera_input_profile"] = convert_exif_camera_profile($database, $user_id, validate_exif_string($exif["IFD0"]["Make"]), validate_exif_string($exif["IFD0"]["Model"])); - - $image_data["film"] = convert_exif_iso_film($database, $user_id, $exif["SubIFD"]["ISOSpeedRatings"]); - - if ($image_data["film"] == "null") - $image_data["film"] = convert_exif_iso_film($database, $user_id, $exif["SubIFD"]["MakerNote"]["Settings 1"]["ISO"]); - if ($image_data["film"] == "null") - $image_data["film"] = convert_exif_iso_film($database, $user_id, $exif["SubIFD"]["MakerNote"]["ISOSetting"]); - - // $image_data["iso_override"] = convert_exif_iso_film($database, $user_id, $exif["SubIFD"]["MakerNote"]["Settings 1"]["ISO"]); - // $image_data["film"] = convert_exif_iso_film($database, $user_id, $exif["SubIFD"]["MakerNote"]["ISOSetting"]); - - $flash_compensation = $exif["SubIFD"]["MakerNote"]["FlashExposureComp"]; - if (!$flash_compensation) - $flash_compensation = $exif["SubIFD"]["MakerNote"]["Settings 4"]["FlashBias"]; - if ($flash_compensation) { - $flash_compensation = substr($flash_compensation, 0, strpos($flash_compensation, "EV")); - $image_data["flash_comp"] = convert_exif_ev_comp($database, convert_exif_ratio($flash_compensation)); - } - - $fov_mult = ""; - - if (eregi("2.2",$exif["SubIFD"]["ExifVersion"]) || $exif["SubIFD"]["FocalLength_35mm"]) { - $image_data["focal_length"] = convert_exif_focal_length($database, convert_exif_ratio($exif["SubIFD"]["FocalLength_35mm"])); - } else { - if (convert_exif_ratio($exif["SubIFD"]["FocalPlaneXResolution"])) { - $fov_mult = $exif["IFD1"]["ImageWidth"] / - convert_exif_ratio($exif["SubIFD"]["FocalPlaneXResolution"]); - if ($exif["SubIFD"]["FocalPlaneResolutionUnit"] == 2) { - $fov_mult *= 25; // inches - } else { - $fov_mult *= 10; // cm - } - } - - if ($exif["IFD0"]["Model"] = "E775") - $fov_mult = 6; - - if (!$fov_mult) - $fov_mult = 35; - - $fov_mult = 35 / $fov_mult; - $image_data["focal_length"] = convert_exif_focal_length($database, $exif["SubIFD"]["FocalLength"] * $fov_mult); - } - - $image_data["aperture"] = convert_exif_aperture($database, substr($exif["SubIFD"]["FNumber"], 2)); - if ($image_data["aperture"] == "null") - $image_data["aperture"] = convert_exif_aperture($database, substr($exif["SubIFD"]["ApertureValue"], 2)); - - $image_data["shutter"] = convert_exif_shutter($database, convert_exif_ratio($exif["SubIFD"]["ExposureTime"])); - if ($image_data["shutter"] == "null") - $image_data["shutter"] = convert_exif_shutter($database, convert_exif_ratio($exif["SubIFD"]["ShutterSpeedValue"])); - - $rawdata = $exif["SubIFD"]["ExposureBiasValue"]; - $rawdata = substr($rawdata, 0, strpos($rawdata, "EV")); - $image_data["exp_comp"] = convert_exif_ev_comp($database, convert_exif_ratio($rawdata)); - - $rawdata = $exif["SubIFD"]["MakerNote"]["ExposureDifference"]; - $rawdata = substr($rawdata, 0, strpos($rawdata, "EV")); - $image_data["exp_diff"] = convert_exif_ev_comp($database, convert_exif_ratio($rawdata)); - - $image_data["orientation"] = $exif["IFD0"]["Orientation"]; - if ($image_data["orientation"] == "") - $image_data["orientation"] = $exif["IFD1"]["Orientation"]; + $image_data = extract_exiftool_metadata($image_data, $index, "EXIF"); $image_data["exif"] = ""; + $exif_data = $image_data['exiftool_data_EXIF']; - if (($exif_string = validate_exif_string($exif["SubIFD"]["ColorSpace"]))) { - $image_data['colorspace'] = 1; // default to sRGB + /* Process the raw data */ + foreach ($exif_data as $key => $value) { + if ($key == 'Minolta Camera Settings 2') continue; + + $image_data["exif"] .= "$key$value"; + + switch ($key) { + case "Artist": + exif_string_helper($image_data, $exif_data, "author", $key); + break; + case "Copyright": + exif_string_helper($image_data, $exif_data, "copyright", $key); + break; + case "Date/Time Original": + $image_data["date_of_exposure"] = convert_exif2sql_timestamp($value); + break; + case "Create Date": + if ($image_data["date_of_exposure"] == "") + $image_data["date_of_exposure"] = convert_exif2sql_timestamp($value); + break; + case "Flash Exposure Compensation": + $image_data["flash_comp"] = convert_exif_ev_comp($database, $value); + break; + case "Exposure Compensation": + $image_data["exp_comp"] = convert_exif_ev_comp($database, $value); + break; + case "Exposure Difference": + $image_data["exp_diff"] = convert_exif_ev_comp($database, $value); + break; + case "F Number": + $image_data["aperture"] = convert_exif_aperture($database, $value); + break; + case "ISO": + $image_data["iso_override"] = convert_exif_iso($database, $value); + break; + case "Shutter Speed": + $image_data["shutter"] = convert_exif_shutter($database, $value); + break; + case "Lens ID": + convert_exif_lens($database, $user_id, $image_data, $value); + break; + case "GPS Latitude": + $image_data['latitude'] = parse_latitude($value); + break; + case "GPS Longitude": + $image_data['longitude'] = parse_latitude($value); + break; + case "GPS Altitude": + $regexp = "/((?=\d|\.\d)\d*(?:\.\d*)?)/"; + $res = array(); + + if (preg_match($regexp, $value, $res)) { + $image_data['altitude'] = $res[1]; + if ($exif_data['GPS Altitude Ref'] != 'Above Sea Level') + $image_data['altitude'] = - $image_data['altitude']; + } + break; + case "GPS Img Direction": + $image_data['direction'] = $value; + break; + case "Jpg From Raw": + if ($po_options['jpgfromraw'] == 't') + $image_data['jpgfromraw'] = TRUE; + break; + } + } + + /* Pull in orientation and colorspace data */ + $image_data = photo_parse_exif_orientation_colorspace($database, $index, $user_id, $image_data, "EXIF"); - if ($exif["InterColorProfile"] == 1) { - $image_data['colorspace'] = 99; // If there's an embedded profile.. - } else if ($exif["ValidICCData"] == 1) { - $image_data['colorspace'] = 99; // If there's an embedded profile.. - } else if (substr_compare($image_data['file'][$index]['original_name'], "_", 0, 1) == 0) { - $image_data['colorspace'] = 2; // AdobeRGB - } else if ($exif_string != "sRGB") { // raw value is 1 - $image_data['colorspace'] = 1; // anything other than '1' is "undefined" - // but we have to treat it as sRGB for consistency's sake. - } + /* Image Comment */ + if (isset($exif_data["User Comment"]) && !$image_data['IgnoreExifUserComment']) { + exif_string_helper($image_data, $exif_data, "title", "User Comment"); } - print "done
  • "; + /* Focal length is special */ + $tmp = $exif_data["Focal Length"]; + $tmp = substr($tmp, 0, strpos($tmp, 'mm')); + + if ($exif_data["Scale Factor To 35mm Equivalent"] > 2) { + if ($exif_data["Focal Length In 35mm Format"]) { + $tmp = $exif_data["Focal Length In 35mm Format"]; + $tmp = substr($tmp, 0, strpos($tmp, 'mm')); + } else { + $tmp = $tmp * $exif_data["Scale Factor To 35mm Equivalent"]; + } + } + + if (isset($exif_data["Focal Length"])) + $image_data["focal_length"] = convert_exif_focal_length($database, $tmp); + + // New: "metering" "program" "flash" and "flash mode" + + /* Escape it for database sanity */ + $image_data["exif"] = pg_escape_string($image_data["exif"]); + return $image_data; } diff --git a/src/include/exifer/canon.tags b/src/include/exifer/canon.tags deleted file mode 100644 index 3b43884..0000000 --- a/src/include/exifer/canon.tags +++ /dev/null @@ -1,93 +0,0 @@ - [IFD0] = Array - ( - [Make] = Canon - [Model] = Canon PowerShot G2 - [Orientation] = Normal (O deg) - [xResolution] = 180 dots per ResolutionUnit - [yResolution] = 180 dots per ResolutionUnit - [ResolutionUnit] = Inch - [DateTime] = 2003:01:09 19:07:57 - [YCbCrPositioning] = Center of Pixel Array - [ExifOffset] = 196 - ) - - [SubIFD] = Array - ( - [ExposureTime] = 1/640 sec - [FNumber] = f 4 - [ExifVersion] = version 2.2 - [DateTimeOriginal] = 2003:01:09 19:07:57 - [DateTimedigitized] = 2003:01:09 19:07:57 - [ComponentsConfiguration] = YCbCr - [CompressedBitsPerPixel] = 5 - [ShutterSpeedValue] = 1/635 sec - [ApertureValue] = f 4 - [ExposureBiasValue] = 0 EV - [MaxApertureValue] = f 2 - [MeteringMode] = Center Weighted Average - [Flash] = No Flash - [FocalLength] = 21 mm - [MakerNote] = Array - ( - [MakerNoteNumTags] = 12 - [Settings 1] = Array - ( - [Bytes] = 80 - [Macro] = Normal - [SelfTimer] = Off - [Quality] = 4 - [Flash] = Off - [DriveMode] = Single/Timer - [FocusMode] = 0 - [ImageSize] = Large - [EasyShooting] = Manual - [DigitalZoom] = No Digital Zoom - [Contrast] = Normal - [Saturation] = Normal - [Sharpness] = Normal - [ISO] = 50 - [MeteringMode] = Center-weighted - [FocusType] = Auto - [AFPointSelected] = Center - [ExposureMode] = Program - [LongFocalLength] = 672 - [ShortFocalLength] = 224 - [FocalUnits] = 32 - [FlashActivity] = Flash Did Not Fire - [FlashDetails] = - ) - - [Settings 4] = Array - ( - [Bytes] = 54 - [WhiteBalance] = Auto - [SequenceNumber] = 0 - [AFPointUsed] = 12290 - [FlashBias] = 0EV - [SubjectDistance] = 7416 - ) - - [ImageType] = CRW:High definition CCD image - [FirmwareVersion] = Firmware Version 1.10 - [ImageNumber] = 1010-129 - [OwnerName] = Alistair Dickie - - ) - - [KnownMaker] = 1 - [UserCommentOld] = - [FlashPixVersion] = version 1 - [ColorSpace] = sRGB - [ExifImageWidth] = 480 pixels - [ExifImageHeight] = 640 pixels - [ExifInteroperabilityOffset] = 1416 - [FocalPlaneXResolution] = 8114.2857142857 - [FocalPlaneYResolution] = 8114.2857142857 - [FocalPlaneResolutionUnit] = Inch - [FileSource] = Digital Still Camera - [CustomerRender] = 0 - [ExposureMode] = 0 - [WhiteBalance] = 0 - [DigitalZoomRatio] = 1 - [SceneCaptureMode] = 0 - ) diff --git a/src/include/exifer/exif.php b/src/include/exifer/exif.php deleted file mode 100755 index 70c8d5e..0000000 --- a/src/include/exifer/exif.php +++ /dev/null @@ -1,1033 +0,0 @@ -2147483647) $top = $top - 4294967296; //this makes the number signed instead of unsigned - if($bottom!=0) $data=$top/$bottom; - else if($top==0) $data = 0; - else $data=$top."/".$bottom; - - if(($tag=="011a" || $tag=="011b") && $bottom==1) { //XResolution YResolution - $data=$top." dots per ResolutionUnit"; - } else if($tag=="829a") { //Exposure Time - if($top/10 == 1) $data="1/".round($bottom/10, 0)." sec"; - else $data=$top."/".$bottom." sec"; - } else if($tag=="829d") { //FNumber - $data="f ".$data; - } else if($tag=="9204") { //ExposureBiasValue - $data=$data." EV"; - } else if($tag=="9205" || $tag=="9202") { //ApertureValue and MaxApertureValue - //ApertureValue is given in the APEX Mode. Many thanks to Matthieu Froment for this code - //The formula is : Aperture = 2*log2(FNumber) <=> FNumber = e((Aperture.ln(2))/2) - $data = exp(($data*log(2))/2); - $data = round($data, 1);//Focal is given with a precision of 1 digit. - $data="f ".$data; - } else if($tag=="920a") { //FocalLength - $data=$data." mm"; - } else if($tag=="9201") { //ShutterSpeedValue - // The ShutterSpeedValue is given in the APEX mode. Many thanks to Matthieu Froment for this code - // The formula is : Shutter = - log2(exposureTime) (Appendix C of EXIF spec.) - // Where shutter is in APEX, log2(exposure) = ln(exposure)/ln(2) - // So final formula is : exposure = exp(-ln(2).shutter) - // The formula can be developed : exposure = 1/(exp(ln(2).shutter)) - $data = exp($data * log(2)); - if ($data > 1) $data = floor($data); //Drop the decimal. - if ($data > 0) { - $data = 1/$data; //Final calculation. We now have a floating number. Transform it in a pretty number - $n=0;$d=0; - ConvertToFraction($data, $n, $d); - if ($n>=1 && $d==1) $data = $n." sec"; //To avoid exposure times style 3/1 sec. - else $data = $n."/".$d." sec"; - } else { - $data = "Bulb"; - } - } - - } else if($type=="USHORT" || $type=="SSHORT" || $type=="ULONG" || $type=="SLONG" || $type=="FLOAT" || $type=="DOUBLE") { - $data = bin2hex($data); - if($type=="USHORT" || $type=="SSHORT") $data = substr($data,0,4); - if($intel==1) $data = intel2Moto($data); - $data=hexdec($data); - - if($type=="SSHORT" && $data>32767) $data = $data - 65536; //this makes the number signed instead of unsigned - if($type=="SLONG" && $data>2147483647) $data = $data - 4294967296; //this makes the number signed instead of unsigned - - if($tag=="0112") { //Orientation - if($data==1) $data = "Normal (O deg)"; - if($data==2) $data = "Mirrored"; - if($data==3) $data = "Upsidedown"; - if($data==4) $data = "Upsidedown Mirrored"; - if($data==5) $data = "90 deg CW Mirrored"; - if($data==6) $data = "90 deg CW"; - if($data==7) $data = "90 deg CCW Mirrored"; - if($data==8) $data = "90 deg CCW"; - } else if($tag=="0128" || $tag=="a210" || $tag=="0128") { //ResolutionUnit and FocalPlaneResolutionUnit and ThumbnailResolutionUnit - if($data==1) $data = "No Unit"; - if($data==2) $data = "Inch"; - if($data==3) $data = "Centimeter"; - } else if($tag=="0213") { //YCbCrPositioning - if($data==1) $data = "Center of Pixel Array"; - if($data==2) $data = "Datum Point"; - } else if($tag=="8822") { //ExposureProgram - if($data==1) $data = "Manual"; - else if($data==2) $data = "Program"; - else if($data==3) $data = "Aperture Priority"; - else if($data==4) $data = "Shutter Priority"; - else if($data==5) $data = "Program Creative"; - else if($data==6) $data = "Program Action"; - else if($data==7) $data = "Portrat"; - else if($data==8) $data = "Landscape"; - else $data = "Unknown: ".$data; - } else if($tag=="9207") { //MeteringMode - if($data==0) $data = "Unknown"; - else if($data==1) $data = "Average"; - else if($data==2) $data = "Center Weighted Average"; - else if($data==3) $data = "Spot"; - else if($data==4) $data = "Multi-Spot"; - else if($data==5) $data = "Multi-Segment"; - else if($data==6) $data = "Partial"; - else if($data==255) $data = "Other"; - else $data = "Unknown: ".$data; - } else if($tag=="9208") { //LightSource - if($data==0) $data = "Unknown or Auto"; - else if($data==1) $data = "Daylight"; - else if($data==2) $data = "Flourescent"; - else if($data==3) $data = "Tungsten"; - else if($data==4) $data = "Flash"; - else if($data==9) $data = "Fine Weather"; - else if($data==10) $data = "Cloudy Weather"; - else if($data==11) $data = "Shade"; - else if($data==12) $data = "Daylight Flourescent (D 5700-5100K)"; - else if($data==13) $data = "Day White Flourescent (N 4600-5400K)"; - else if($data==14) $data = "Cool White Flourescent (W 3900-4500K)"; - else if($data==15) $data = "White Flourescent (WW 3200-3700K)"; - else if($data==17) $data = "Standard Light A"; - else if($data==18) $data = "Standard Light B"; - else if($data==19) $data = "Standard Light C"; - else if($data==20) $data = "D55"; - else if($data==21) $data = "D65"; - else if($data==22) $data = "D75"; - else if($data==23) $data = "D50"; - else if($data==24) $data = "ISO Studio Tungsten"; - else if($data==255) $data = "Other"; - else $data = "Unknown: ".$data; - } else if($tag=="9209") { //Flash - if($data==0) $data = "No Flash"; - else if($data==1) $data = "Flash"; - else if($data==5) $data = "Flash, strobe return light not detected"; - else if($data==7) $data = "Flash, strobe return light detected"; - else if($data==9) $data = "Compulsory Flash"; - else if($data==13) $data = "Compulsory Flash, Return light not detected"; - else if($data==15) $data = "Compulsory Flash, Return light detected"; - else if($data==16) $data = "No Flash"; - else if($data==24) $data = "No Flash"; - else if($data==25) $data = "Flash, Auto-Mode"; - else if($data==29) $data = "Flash, Auto-Mode, Return light not detected"; - else if($data==31) $data = "Flash, Auto-Mode, Return light detected"; - else if($data==32) $data = "No Flash"; - else if($data==65) $data = "Red Eye"; - else if($data==69) $data = "Red Eye, Return light not detected"; - else if($data==71) $data = "Red Eye, Return light detected"; - else if($data==73) $data = "Red Eye, Compulsory Flash"; - else if($data==77) $data = "Red Eye, Compulsory Flash, Return light not detected"; - else if($data==79) $data = "Red Eye, Compulsory Flash, Return light detected"; - else if($data==89) $data = "Red Eye, Auto-Mode"; - else if($data==93) $data = "Red Eye, Auto-Mode, Return light not detected"; - else if($data==95) $data = "Red Eye, Auto-Mode, Return light detected"; - else $data = "Unknown: ".$data; - } else if($tag=="a001") { //ColorSpace - if($data==1) $data = "sRGB"; - else $data = "Uncalibrated $data"; - } else if($tag=="a002" || $tag=="a003") { //ExifImageWidth/Height - $data = $data. " pixels"; - } else if($tag=="0103") { //Compression - if($data==1) $data = "No Compression"; - else if($data==6) $data = "Jpeg Compression"; - else $data = "Unknown: ".$data; - } else if($tag=="a217") { //SensingMethod - if($data==1) $data = "Not defined"; - if($data==2) $data = "One Chip Color Area Sensor"; - if($data==3) $data = "Two Chip Color Area Sensor"; - if($data==4) $data = "Three Chip Color Area Sensor"; - if($data==5) $data = "Color Sequential Area Sensor"; - if($data==7) $data = "Trilinear Sensor"; - if($data==8) $data = "Color Sequential Linear Sensor"; - else $data = "Unknown: ".$data; - } else if($tag=="0106") { //PhotometricInterpretation - if($data==1) $data = "Monochrome"; - else if($data==2) $data = "RGB"; - else if($data==6) $data = "YCbCr"; - else $data = "Unknown: ".$data; - } - - } else if($type=="UNDEFINED") { - if ($tag == "9286") { // UserComment - $encoding=rtrim(substr($data,0,8)); - $data=rtrim(substr($data,8)); - } - if($tag=="9000" || $tag=="a000" || $tag=="0002") { //ExifVersion,FlashPixVersion,InteroperabilityVersion - $data="version ".$data/100; - } - if($tag=="a300") { //FileSource - $data = bin2hex($data); - $data = str_replace("00","",$data); - $data = str_replace("03","Digital Still Camera",$data); - } - if($tag=="a301") { //SceneType - $data = bin2hex($data); - $data = str_replace("00","",$data); - $data = str_replace("01","Directly Photographed",$data); - } - if($tag=="9101") { //ComponentsConfiguration - $data = bin2hex($data); - $data = str_replace("01","Y",$data); - $data = str_replace("02","Cb",$data); - $data = str_replace("03","Cr",$data); - $data = str_replace("04","R",$data); - $data = str_replace("05","G",$data); - $data = str_replace("06","B",$data); - $data = str_replace("00","",$data); - } - if($tag=="9206") { //UserComment - $data = rtrim($data); - } - } else { - $data = bin2hex($data); - if($intel==1) $data = intel2Moto($data); - } - - return $data; -} - -//================================================================================================ -//================================================================================================ -// Reads one standard IFD entry -//================================================================================================ -//================================================================================================ -function read_entry(&$result,$in,$seek,$intel,$ifd_name,$globalOffset) { - - if(feof($in)) { //test to make sure we can still read. - $result['Error'][$result['Errors']++] = "EOF Reached ($globalOffset)"; - return; - } - - //2 byte tag - $tag = bin2hex(fread( $in, 2 )); - if($intel==1) $tag = intel2Moto($tag); - $tag_name = lookup_tag($tag); - - //2 byte datatype - $type = bin2hex(fread( $in, 2 )); - if($intel==1) $type = intel2Moto($type); - - switch($type) { - case "0001": $type = "UBYTE";$size=1;break; - case "0002": $type = "ASCII";$size=1;break; - case "0003": $type = "USHORT";$size=2;break; - case "0004": $type = "ULONG";$size=4;break; - case "0005": $type = "URATIONAL";$size=8;break; - case "0006": $type = "SBYTE";$size=1;break; - case "0007": $type = "UNDEFINED";$size=1;break; - case "0008": $type = "SSHORT";$size=2;break; - case "0009": $type = "SLONG";$size=4;break; - case "000a": $type = "SRATIONAL";$size=8;break; - case "000b": $type = "FLOAT";$size=4;break; - case "000c": $type = "DOUBLE";$size=8;break; - case "000d": $type = "IFD";$size=4;break; // == LONG. - - default: - $type = "error:".$type; - $size=0; - break; - } - - //4 byte number of elements - $count = bin2hex(fread( $in, 4 )); - if($intel==1) $count = intel2Moto($count); - $bytesofdata = $size * hexdec($count); - - //4 byte value or pointer to value if larger than 4 bytes - $value = fread( $in, 4 ); - - if($bytesofdata<=4) { //if datatype is 4 bytes or less this is the value - $data = $value; - } else { // otherwise its a pointer to the value, so go get it! - $value = bin2hex($value); - if($intel==1) $value = intel2Moto($value); - - // error_log("READ $tag_name $bytesofdata ($type; $size * $count) offset $globalOffset + $value)"); - if ($bytesofdata > 1000000) { - $result['Error'][$result['Errors']++] = "$tagname -- $bytesofdata too large to read! at offset $globalOffset+hexdec($value)"; - return; - } else { - $v = fseek($seek,$globalOffset+hexdec($value)); //offsets are from TIFF header which is 12 bytes from the start of the file - if($v==0) { - $data = fread($seek, $bytesofdata); - } else if($v==-1) { - $result['Error'][$result['Errors']++] = "Couldn't read $bytesofdata of data at offset $globalOffset+hexdec($value)"; - return; - } - } - } - - if($tag_name=="MakerNote") { //if its a maker tag, we need to parse this specially - $make = $result['IFD0']['Make']; - - if($result['VerboseOutput']==1) { - $result[$ifd_name]['MakerNote']['RawData'] = $data; - } - if(eregi("NIKON",$make)) { - require_once('makers/nikon.php'); - parseNikon($data,$result); - $result[$ifd_name]['KnownMaker'] = 1; - } else if(eregi("OLYMPUS",$make)) { - require_once('makers/olympus.php'); - parseOlympus($data,$result,$seek,$globalOffset); - $result[$ifd_name]['KnownMaker'] = 1; - } else if(eregi("Canon",$make)) { - require_once('makers/canon.php'); - parseCanon($data,$result,$seek,$globalOffset); - $result[$ifd_name]['KnownMaker'] = 1; - } else if(eregi("FUJIFILM",$make)) { - require_once('makers/fujifilm.php'); - parseFujifilm($data,$result); - $result[$ifd_name]['KnownMaker'] = 1; - } else if(eregi("SANYO",$make)) { - require_once('makers/sanyo.php'); - parseSanyo($data,$result,$seek,$globalOffset); - $result[$ifd_name]['KnownMaker'] = 1; - } else { - $result[$ifd_name]['KnownMaker'] = 0; - } - } else if($tag_name=="GPSInfoOffset") { - require_once('makers/gps.php'); - $formated_data = formatData($type,$tag,$intel,$data); - $result[$ifd_name]['GPSInfo'] = $formated_data; - parseGPS($data,$result,$formated_data,$seek,$globalOffset); - } else { - //Format the data depending on the type and tag - $formated_data = formatData($type,$tag,$intel,$data); - - $result[$ifd_name][$tag_name] = $formated_data; - - if($result['VerboseOutput']==1) { - if($type=="URATIONAL" || $type=="SRATIONAL" || $type=="USHORT" || $type=="SSHORT" || $type=="ULONG" || $type=="SLONG" || $type=="FLOAT" || $type=="DOUBLE") { - $data = bin2hex($data); - if($intel==1) $data = intel2Moto($data); - } - $result[$ifd_name][$tag_name."_Verbose"]['RawData'] = $data; - $result[$ifd_name][$tag_name."_Verbose"]['Type'] = $type; - $result[$ifd_name][$tag_name."_Verbose"]['Bytes'] = $bytesofdata; - } - } -} - -//================================================================================================ -//================================================================================================ -// Pass in a file and this reads the EXIF data -// -// Usefull resources -// http://www.ba.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html -// http://www.w3.org/Graphics/JPEG/jfif.txt -// http://exif.org/ -// http://www.ozhiker.com/electronics/pjmt/library/list_contents.php4 -// http://www.ozhiker.com/electronics/pjmt/jpeg_info/makernotes.html -// http://pel.sourceforge.net/ -// http://us2.php.net/manual/en/function.exif-read-data.php -//================================================================================================ -//================================================================================================ -function read_exif_data_raw($path,$verbose) { - - if($path=='' || $path=='none') return; - - $in = @fopen($path, "rb"); //the b is for windows machines to open in binary mode - $seek = @fopen($path, "rb"); //There may be an elegant way to do this with one file handle. - - if(!isset($verbose)) $verbose=0; - - $result['VerboseOutput'] = $verbose; - $result['Errors'] = 0; - $result['Error'][$result['Errors']] = "All Okay."; - - if(!$in || !$seek) { //if the path was invalid, this error will catch it - $result['Error'][$result['Errors']++] = "The file could not be found."; - return $result; - } - - //First 2 bytes of JPEG are 0xFFD8 - $data = bin2hex(fread( $in, 2 )); - if($data=="ffd8") { - $result['ValidJpeg'] = 1; - $result['ValidTIFF'] = 0; - } else if ($data=="4d4d") { - $result['Endian'] = "Motorola"; - $result['ValidTIFF'] = 1; - $result['ValidJpeg'] = 0; - } else if ($data=="4949") { - $result['Endian'] = "Intel"; - $result['ValidTIFF'] = 1; - $result['ValidJpeg'] = 0; - } else { - $result['ValidTIFF'] = 0; - $result['ValidJpeg'] = 0; - fclose($in); - fclose($seek); - return $result; - } - - $result['ValidIPTCData'] = 0; - $result['ValidJFIFData'] = 0; - $result['ValidEXIFData'] = 0; - $result['ValidICCData'] = 0; - $result['ValidCOMData'] = 0; - - if ($result['ValidJpeg'] != 0) { - // Next 2 bytes are MARKER tag (0xFFE#) - - $data = bin2hex(fread( $in, 2 )); - $size = bin2hex(fread( $in, 2 )); - - /* Loop through file markers */ - $EXIF_OFFSET = 0; - - while(!feof($in) && $data!="ffc0" && $data!="ffd9") { - if ($data=="ffe0") { //JFIF Marker - $result['ValidJFIFData'] = 1; - $result['JFIF']['Size'] = hexdec($size)-2; - - if (hexdec($size)-2 > 0) { - $data = fread( $in, hexdec($size)-2); - $result['JFIF']['Data'] = $data; - } - - $result['JFIF']['Identifier'] = substr($data,0,5);; - $result['JFIF']['ExtensionCode'] = bin2hex(substr($data,6,1)); - - } else if ($data=="ffed") { //IPTC Marker - $result['ValidIPTCData'] = 1; - $result['IPTC']['Size'] = hexdec($size)-2; - - if(hexdec($size)-2 > 0) { - $data = fread( $in, hexdec($size)-2); - $result['IPTC']['Data'] = $data ; - } - } else if ($data=="ffe2") { //EXIF extension Marker - $result['ValidICCData'] = 1; - $result['APP2']['Size'] = hexdec($size)-2; - - if(hexdec($size)-2 > 0) { - $data = fread( $in, hexdec($size)-2); - // $result['APP2']['Data'] = $data; - } - } else if ($data=="fffe") { //COM extension Marker - $result['ValidCOMData'] = 1; - $result['COM']['Size'] = hexdec($size)-2; - - if(hexdec($size)-2 > 0) { - $data = fread( $in, hexdec($size)-2); - $result['COM']['Data'] = $data ; - } - } else if ($data=="ffe1") { - // check EXIF header.. - $data = fread($in, 4); - fseek($in, -4, SEEK_CUR); - if ($data == "Exif") { - $result['ValidEXIFData'] = 1; - $EXIF_OFFSET=ftell($in)- 4; - - if(hexdec($size)-2 > 0) { - $data = fread( $in, hexdec($size)-2); - // $result['EXIF']['Data'] = $data; - $result['EXIF']['Size'] = hexdec($size)-2; - } - } else { - /* parse header as appropriate */ - $result['APP1Size'] = hexdec($size); - } - } else { - fread($in, hexdec($size)-2); - } - - $data = bin2hex(fread( $in, 2 )); - $size = bin2hex(fread( $in, 2 )); - } - //END MARKER LOOP - - /* Seek to EXIF offset */ - if ($result['ValidEXIFData'] != 0) { - fseek($in, $EXIF_OFFSET); - $data = bin2hex(fread( $in, 2 )); - $size = bin2hex(fread( $in, 2 )); - } - - if($data=="ffe1") { // APP1 block! - $result['ValidEXIFData'] = 1; - } else { - $result['ValidEXIFData'] = "0"; - fclose($in); - fclose($seek); - return $result; - } - - //Start of APP1 block starts with "Exif" header (6 bytes) - $header = fread( $in, 6 ); - } else if ($result['ValidTIFF'] != 0) { - $EXIF_OFFSET = 0; - fseek($in, $EXIF_OFFSET); - } - - return parse_exif_data($in, $seek, $result, $verbose); -} - -/* Split out the actual EXIF parsing code */ - -function parse_exif_data($in, $seek, $result, $verbose) { - - //error_log("EXIF Decode."); - - $globalOffset = ftell($in); - - //Then theres a TIFF header with 2 bytes of endianess (II or MM) - $header = fread( $in, 2 ); - if($header==="II") { - $intel=1; - $result['Endian'] = "Intel"; - } else if($header==="MM") { - $intel=0; - $result['Endian'] = "Motorola"; - } else { - $result['Endian'] = "Unknown -- '$header'"; // This is an invalid EXIF marker. - fclose($in); - fclose($seek); - return $result; - } - - /* TIFF header version (== 0x002a) */ - $tag = bin2hex(fread( $in, 2 )); - - //Then 4 bytes of offset to IFD0 (usually 8 which includes all 8 bytes of TIFF header) - $offset = bin2hex(fread( $in, 4 )); - if($intel==1) $offset = intel2Moto($offset); - - // Check for extremely large values here - if(hexdec($offset) > 100000) { - $result['ValidEXIFData'] = 0; - fclose($in); - fclose($seek); - return $result; - } - - if(hexdec($offset)>8) $unknown = fread( $in, hexdec($offset)-8); //fixed this bug in 1.3 - - /* For TIFF files, all remaining offsets are from the start of the file, not the first IFD */ - if ($result['ValidTIFF'] == 1) { - $globalOffset = 0; - } - - - //===========================================================Start of IFD0 - $num = bin2hex(fread( $in, 2 )); - if($intel==1) $num = intel2Moto($num); - $num = hexdec($num); - $result['IFD0NumTags'] = $num; - - if($num<1000) { //1000 entries is too much and is probably an error. - for($i=0;$i<$num;$i++) { - //error_log("READ IFD0 $i/$num"); - read_entry($result,$in,$seek,$intel,"IFD0",$globalOffset); - } - } else { - $result['Error'][$result['Errors']++] = "Illegal size for IFD0"; - } - - //store offset to IFD1 - $offset = bin2hex(fread( $in, 4 )); - if($intel==1) $offset = intel2Moto($offset); - $result['IFD1Offset'] = hexdec($offset); - - - //Check for SubIFD - if(!isset($result['IFD0']['ExifOffset']) || $result['IFD0']['ExifOffset']==0) { - fclose($in); - fclose($seek); - return $result; - } - - //seek to SubIFD (Value of ExifOffset tag) above. - $ExifOffset = $result['IFD0']['ExifOffset']; - $v = fseek($in,$globalOffset+$ExifOffset); - if($v==-1) { - $result['Error'][$result['Errors']++] = "Couldnt Find SubIFD"; - } - - //===========================================================Start of SubIFD - $num = bin2hex(fread( $in, 2 )); - if($intel==1) $num = intel2Moto($num); - $num = hexdec($num); - $result['SubIFDNumTags'] = $num; - - if($num<1000) { //1000 entries is too much and is probably an error. - for($i=0;$i<$num;$i++) { - //error_log("READ SubIFD $i/$num"); - read_entry($result,$in,$seek,$intel,"SubIFD",$globalOffset); - } - } else { - $result['Error'][$result['Errors']++] = "Illegal size for SubIFD"; - } - - //Check for IFD1 - if(!isset($result['IFD1Offset']) || $result['IFD1Offset']==0) { - fclose($in); - fclose($seek); - return $result; - } - //seek to IFD1 - $v = fseek($in,$globalOffset+$result['IFD1Offset']); - if($v==-1) { - $result['Error'][$result['Errors']++] = "Couldnt Find IFD1"; - } - - //===========================================================Start of IFD1 - $num = bin2hex(fread( $in, 2 )); - if($intel==1) $num = intel2Moto($num); - $num = hexdec($num); - $result['IFD1NumTags'] = $num; - - if($num<1000) { //1000 entries is too much and is probably an error. - for($i=0;$i<$num;$i++) { - //error_log("READ IFD1 $i/$num"); - read_entry($result,$in,$seek,$intel,"IFD1",$globalOffset); - } - } else { - $result['Error'][$result['Errors']++] = "Illegal size for IFD1"; - } - //if verbose output is on, stick in the thumbnail raw data - if($result['VerboseOutput']==1 && $result['IFD1']['JpegIFOffset']>0 && $result['IFD1']['JpegIFByteCount']>0) { - $v = fseek($seek,$globalOffset+$result['IFD1']['JpegIFOffset']); - if($v==0) { - $data = fread($seek, $result['IFD1']['JpegIFByteCount']); - } else if($v==-1) { - $result['Error'][$result['Errors']++] = "Error seeking to end of thumbnail data"; - } - $result['IFD1']["ThumbnailData"] = $data; - } - - - //Check for Interoperability IFD - if(!isset($result['SubIFD']['ExifInteroperabilityOffset']) || $result['SubIFD']['ExifInteroperabilityOffset']==0) { - fclose($in); - fclose($seek); - return $result; - } - //seek to InteroperabilityIFD - $v = fseek($in,$globalOffset+$result['SubIFD']['ExifInteroperabilityOffset']); - if($v==-1) { - $result['Error'][$result['Errors']++] = "Couldnt Find InteroperabilityIFD"; - } - - //===========================================================Start of InteroperabilityIFD - $num = bin2hex(fread( $in, 2 )); - if($intel==1) $num = intel2Moto($num); - $num = hexdec($num); - $result['InteroperabilityIFDNumTags'] = $num; - - if($num<1000) { //1000 entries is too much and is probably an error. - for($i=0;$i<$num;$i++) { - //error_log("READ InteropIFD $i/$num"); - read_entry($result,$in,$seek,$intel,"InteroperabilityIFD",$globalOffset); - } - } else { - $result['Error'][$result['Errors']++] = "Illegal size for InteroperabilityIFD"; - } - fclose($in); - fclose($seek); - return $result; -} - -//================================================================================================ -//================================================================================================ -// Converts a floating point number into a fraction. Many thanks to Matthieu Froment for this code -//================================================================================================ -//================================================================================================ -function ConvertToFraction($v, &$n, &$d) -{ - $MaxTerms = 15; //Limit to prevent infinite loop - $MinDivisor = 1E-6; //Limit to prevent divide by zero - $MaxError = 1E-8; //How close is enough - - $f = $v; //Initialize fraction being converted - - $n_un = 1; //Initialize fractions with 1/0, 0/1 - $d_un = 0; - $n_deux = 0; - $d_deux = 1; - - for ($i = 0;$i<$MaxTerms;$i++) - { - $a = floor($f); //Get next term - $f = $f - $a; //Get new divisor - $n = $n_un * $a + $n_deux; //Calculate new fraction - $d = $d_un * $a + $d_deux; - $n_deux = $n_un; //Save last two fractions - $d_deux = $d_un; - $n_un = $n; - $d_un = $d; - - if ($f < $MinDivisor) //Quit if dividing by zero - break; - - if (abs($v - $n / $d) < $MaxError) - break; - - $f = 1 / $f; //Take reciprocal - } -} -?> diff --git a/src/include/exifer/fuji.tags b/src/include/exifer/fuji.tags deleted file mode 100644 index ce6c7cf7edd07d96a93bf8e3b00b41135a856417..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2376 zcmbVOU31zx5Y2Ocg&y07aBYJzFw=)X;*?GZOq`F~$@D=ni_yfEJd)f(fBjv_7*}qS zo7TL5_v~u-?CueS5b`*W&%LkYBRP|j?%&}X`@BDXGd~~a1%{!XQ3;cP9Q zfULGc3$+y`iF#hA*mJ7kmK7EqcwR8^qKQ8yet!~-CVm%vCN)#_xs;QsWLgW}iTGvq zG?Oc#m|=zS%w&nDR0UZH#ydpZzy>7n6s9>%pC7hN*O`Q&ThvUHd&#n`J)5;>lT#8) zfEWwxrK0Gha8}xFO%=t!`1f!p9AKqEmBbtrr)%m=xid&i~8^R5K z4^kZlHt2cg4NvDPeXRP6%Hy(|LhbQU;6g>M)#D`xaHb4{7 z?~VO||3b)SF#N$J98H3Od*CJDGHI43mHY;KY%w(fA1;&8psk@HGpU|%;SJzbK4T>G z38cYoh}Rnqyr4hmN1bW7*p)(65^#4jNehEcww2bnbt}mPj%6z-wTvXoqy$*sAnCkr zSEn6jRDNpNx4L^Ia7%8s1tlV5oLVJ0ZcU%~q2+1RmTymQyw>QX*$-Hog#X_Sb*>Z~ zrAW;L->|HbM@_Oj=B9Qaz?OMW^UCg#|4$SQh=SC`o}oTze|hi*gNTgt?Sc* z0g8Ufc95$Vpr4=-E`Rs}HZ~Qka?0V~R^m;;K59qkMI*mUdh7A!k3Cw4S8fsD$}|V` zR@iyHyKFuiKt{vrE5!4;BdPyEz3t!qZKF= zzA64yr7+teaXb$i`?-Y7{4;3Y9fR5p?A+5)@K@LLTixEmugP~Fx0jRe^+#^bHDbEg QFcTH8Z?NI86(nTqKMmMwrT_o{ diff --git a/src/include/exifer/index.php b/src/include/exifer/index.php deleted file mode 100644 index f76ad44..0000000 --- a/src/include/exifer/index.php +++ /dev/null @@ -1,25 +0,0 @@ - -"; -print_r($path); -echo ""; - -$result = read_exif_data_raw($path, $verbose); -echo "
    ";
    -print_r($result);
    -echo "
    "; -?> - - - diff --git a/src/include/exifer/kodak.tags b/src/include/exifer/kodak.tags deleted file mode 100644 index 48da113..0000000 --- a/src/include/exifer/kodak.tags +++ /dev/null @@ -1,58 +0,0 @@ - [IFD0] = Array - ( - [Make] = EASTMAN KODAK COMPANY - [Model] = KODAK DC3400 ZOOM DIGITAL CAMERA - [Orientation] = Normal (O deg) - [xResolution] = 192 dots per ResolutionUnit - [yResolution] = 192 dots per ResolutionUnit - [ResolutionUnit] = Inch - [YCbCrPositioning] = Center of Pixel Array - [Copyright] = KODAK DC3400 ZOOM DIGITAL CAMERA - [ExifOffset] = 252 - ) - - [SubIFD] = Array - ( - [ExposureTime] = 1/45 sec - [FNumber] = f 3 - [ExifVersion] = version 2.1 - [DateTimeOriginal] = 2002:01:09 22:07:02 - [DateTimedigitized] = 2002:01:09 22:07:02 - [ComponentsConfiguration] = YCbCr - [ShutterSpeedValue] = 1/45 sec - [ApertureValue] = f 2.9 - [ExposureBiasValue] = 0 EV - [MaxApertureValue] = f 2.9 - [MeteringMode] = Average - [LightSource] = Unknown or Auto - [Flash] = Flash - [FocalLength] = 6.3 mm - [KnownMaker] = 0 - [FlashPixVersion] = version 1 - [ColorSpace] = sRGB - [ExifImageWidth] = 1760 pixels - [ExifImageHeight] = 1168 pixels - [ExifInteroperabilityOffset] = 1294 - [ExposureIndex] = 100 - [SensingMethod] = Unknown: One Chip Color Area Sensor - [FileSource] = Digital Still Camera - [SceneType] = Directly Photographed - ) - - [IFD1] = Array - ( - [Compression] = Jpeg Compression - [Orientation] = Normal (O deg) - [xResolution] = 72 dots per ResolutionUnit - [yResolution] = 72 dots per ResolutionUnit - [ResolutionUnit] = Inch - [JpegIFOffset] = 1490 - [JpegIFByteCount] = 7180 - ) - - [InteroperabilityIFD] = Array - ( - [InteroperabilityIndex] = R98 - [InteroperabilityVersion] = version 1 - ) - diff --git a/src/include/exifer/makers/canon.php b/src/include/exifer/makers/canon.php deleted file mode 100755 index ca1c1b4..0000000 --- a/src/include/exifer/makers/canon.php +++ /dev/null @@ -1,324 +0,0 @@ - diff --git a/src/include/exifer/makers/fujifilm.php b/src/include/exifer/makers/fujifilm.php deleted file mode 100755 index 9043d4a..0000000 --- a/src/include/exifer/makers/fujifilm.php +++ /dev/null @@ -1,257 +0,0 @@ - diff --git a/src/include/exifer/makers/gps.php b/src/include/exifer/makers/gps.php deleted file mode 100755 index 8f5cd4d..0000000 --- a/src/include/exifer/makers/gps.php +++ /dev/null @@ -1,228 +0,0 @@ -2147483647) $top = $top - 4294967296; //this makes the number signed instead of unsigned - - if($tag=="0002" || $tag=="0004") { //Latitude - - $seconds = GPSRational(substr($data,0,16),$intel); - $minutes = GPSRational(substr($data,16,16),$intel); - $hour = GPSRational(substr($data,32,16),$intel); - - $data = $hour+$minutes/60+$seconds/3600; - } else if($tag=="0007") { //Time - $seconds = GPSRational(substr($data,0,16),$intel); - $minutes = GPSRational(substr($data,16,16),$intel); - $hour = GPSRational(substr($data,32,16),$intel); - - $data = $hour.":".$minutes.":".$seconds; - } else { - if($bottom!=0) $data=$top/$bottom; - else if($top==0) $data = 0; - else $data=$top."/".$bottom; - } - } else if($type=="USHORT" || $type=="SSHORT" || $type=="ULONG" || $type=="SLONG" || $type=="FLOAT" || $type=="DOUBLE") { - $data = bin2hex($data); - if($intel==1) $data = intel2Moto($data); - $data=hexdec($data); - - - } else if($type=="UNDEFINED") { - - - - } else if($type=="UBYTE") { - $data = bin2hex($data); - if($intel==1) $num = intel2Moto($data); - - if($tag=="0000") { //Latitude - $data = hexdec(substr($data,0,2)).".". hexdec(substr($data,2,2)).".". hexdec(substr($data,4,2)).".". hexdec(substr($data,6,2)); - } - - } else { - $data = bin2hex($data); - if($intel==1) $data = intel2Moto($data); - } - - return $data; -} - - -//================= -// GPS Special data section -// Useful websites -// http://drewnoakes.com/code/exif/sampleOutput.html -// http://www.geosnapper.com -//==================================================================== -function parseGPS($block,&$result,$offset,$seek, $globalOffset) { - - if($result['Endian']=="Intel") $intel=1; - else $intel=0; - - $v = fseek($seek,$globalOffset+$offset); //offsets are from TIFF header which is 12 bytes from the start of the file - if($v==-1) { - $result['Errors'] = $result['Errors']++; - } - - $num = bin2hex(fread( $seek, 2 )); - if($intel==1) $num = intel2Moto($num); - $num=hexdec($num); - $result['GPS']['NumTags'] = $num; - - $block = fread( $seek, $num*12 ); - $place = 0; - - //loop thru all tags Each field is 12 bytes - for($i=0;$i<$num;$i++) { - //2 byte tag - $tag = bin2hex(substr($block,$place,2));$place+=2; - if($intel==1) $tag = intel2Moto($tag); - $tag_name = lookup_GPS_tag($tag); - - //2 byte datatype - $type = bin2hex(substr($block,$place,2));$place+=2; - if($intel==1) $type = intel2Moto($type); - lookup_type($type,$size); - - //4 byte number of elements - $count = bin2hex(substr($block,$place,4));$place+=4; - if($intel==1) $count = intel2Moto($count); - $bytesofdata = $size*hexdec($count); - - //4 byte value or pointer to value if larger than 4 bytes - $value = substr($block,$place,4);$place+=4; - - if($bytesofdata<=4) { - $data = $value; - } else { - $value = bin2hex($value); - if($intel==1) $value = intel2Moto($value); - - $v = fseek($seek,$globalOffset+hexdec($value)); //offsets are from TIFF header which is 12 bytes from the start of the file - if($v==0) { - $data = fread($seek, $bytesofdata); - } else if($v==-1) { - $result['Errors'] = $result['Errors']++; - } - } - - if($result['VerboseOutput']==1) { - $result['GPS'][$tag_name] = formatGPSData($type,$tag,$intel,$data); - $result['GPS'][$tag_name."_Verbose"]['RawData'] = bin2hex($data); - $result['GPS'][$tag_name."_Verbose"]['Type'] = $type; - $result['GPS'][$tag_name."_Verbose"]['Bytes'] = $bytesofdata; - } else { - $result['GPS'][$tag_name] = formatGPSData($type,$tag,$intel,$data); - } - } -} - - -?> diff --git a/src/include/exifer/makers/nikon.php b/src/include/exifer/makers/nikon.php deleted file mode 100755 index a0249ac..0000000 --- a/src/include/exifer/makers/nikon.php +++ /dev/null @@ -1,331 +0,0 @@ -8) $place+=$offset-8; - - //Get number of tags (2 bytes) - $num = bin2hex(substr($block,$place,2));$place+=2; - if($intel==1) $num = intel2Moto($num); - - //loop thru all tags Each field is 12 bytes - for($i=0;$i diff --git a/src/include/exifer/makers/olympus.php b/src/include/exifer/makers/olympus.php deleted file mode 100755 index 8faff45..0000000 --- a/src/include/exifer/makers/olympus.php +++ /dev/null @@ -1,178 +0,0 @@ - diff --git a/src/include/exifer/makers/sanyo.php b/src/include/exifer/makers/sanyo.php deleted file mode 100755 index 10283e5..0000000 --- a/src/include/exifer/makers/sanyo.php +++ /dev/null @@ -1,168 +0,0 @@ - diff --git a/src/include/exifer/nikon.tags b/src/include/exifer/nikon.tags deleted file mode 100644 index 3a75b19..0000000 --- a/src/include/exifer/nikon.tags +++ /dev/null @@ -1,60 +0,0 @@ - [IFD0] = Array - ( - [ImageDescription] = - [Make] = NIKON - [Model] = E990 - [Orientation] = Normal (O deg) - [xResolution] = 300 dots per ResolutionUnit - [yResolution] = 300 dots per ResolutionUnit - [ResolutionUnit] = Inch - [Software] = E990v1.1 - [DateTime] = 2000:12:30 10:18:16 - [YCbCrPositioning] = Datum Point - [ExifOffset] = 284 - ) - - [SubIFD] = Array - ( - [ExposureTime] = 1/344 sec - [FNumber] = f 7 - [ExposureProgram] = Program - [ISOSpeedRatings] = 100 - [ExifVersion] = version 2.1 - [DateTimeOriginal] = 2000:12:30 10:18:16 - [DateTimedigitized] = 2000:12:30 10:18:16 - [ComponentsConfiguration] = YCbCr - [CompressedBitsPerPixel] = 3 - [ExposureBiasValue] = 0 EV - [MaxApertureValue] = f 3.4 - [MeteringMode] = Multi-Segment - [LightSource] = Unknown or Auto - [Flash] = No Flash - [FocalLength] = 8.2 mm - [KnownMaker] = 1 - [UserCommentOld] = - [FlashPixVersion] = version 1 - [ColorSpace] = sRGB - [ExifImageWidth] = 2048 pixels - [ExifImageHeight] = 1536 pixels - [ExifInteroperabilityOffset] = 886 - [FileSource] = Digital Still Camera - [SceneType] = Directly Photographed - ) - - [IFD1] = Array - ( - [Compression] = Jpeg Compression - [xResolution] = 300 dots per ResolutionUnit - [yResolution] = 300 dots per ResolutionUnit - [ResolutionUnit] = Inch - [JpegIFOffset] = 4084 - [JpegIFByteCount] = 8680 - ) - - [InteroperabilityIFD] = Array - ( - [InteroperabilityIndex] = R98 - [InteroperabilityVersion] = version 1 - ) - -) diff --git a/src/include/exifer/olympus.tags b/src/include/exifer/olympus.tags deleted file mode 100644 index 9eac421..0000000 --- a/src/include/exifer/olympus.tags +++ /dev/null @@ -1,67 +0,0 @@ - [IFD0] = Array - ( - [ImageDescription] = OLYMPUS DIGITAL CAMERA - [Make] = OLYMPUS OPTICAL CO.,LTD - [Model] = E-20,E-20N,E-20P - [Orientation] = Normal (O deg) - [xResolution] = 144 dots per ResolutionUnit - [yResolution] = 144 dots per ResolutionUnit - [ResolutionUnit] = Inch - [Software] = 29-1102 - [DateTime] = 2001:12:08 14:07:01 - [YCbCrPositioning] = Datum Point - [ExifOffset] = 254 - ) - - [SubIFD] = Array - ( - [ExposureTime] = 1/160 sec - [FNumber] = f 3.2 - [ExposureProgram] = Program - [ISOSpeedRatings] = 80 - [ExifVersion] = version 2.1 - [DateTimeOriginal] = 2001:12:08 14:07:01 - [DateTimedigitized] = 2001:12:08 14:07:01 - [ComponentsConfiguration] = YCbCr - [ExposureBiasValue] = 0.7 EV - [MaxApertureValue] = f 2 - [MeteringMode] = Multi-Segment - [Flash] = No Flash - [FocalLength] = 31 mm - [MakerNote] = Array - ( - [MakerNoteNumTags] = 70 - [SpecialMode] = 0 - [JpegQual] = Unknown: 196608 - [Macro] = Normal - [DigiZoom] = 10/0x - [SoftwareRelease] = D4029 - [CameraID] = OLYMPUS DIGITAL CAMERA - ) - - [KnownMaker] = 1 - [UserCommentOld] = - [FlashPixVersion] = version 1 - [ColorSpace] = sRGB - [ExifImageWidth] = 2560 pixels - [ExifImageHeight] = 1920 pixels - [ExifInteroperabilityOffset] = 590 - [FileSource] = Digital Still Camera - ) - - [IFD1] = Array - ( - [Compression] = Jpeg Compression - [xResolution] = 72 dots per ResolutionUnit - [yResolution] = 72 dots per ResolutionUnit - [ResolutionUnit] = Inch - [JpegIFOffset] = 6800 - [JpegIFByteCount] = 6680 - ) - - [InteroperabilityIFD] = Array - ( - [InteroperabilityIndex] = R98 - [InteroperabilityVersion] = version 1 - ) - diff --git a/src/include/exifer/unified.tags b/src/include/exifer/unified.tags deleted file mode 100644 index 2aacb3a113c16f863b8f93cb15a22b47221ef96e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5237 zcmb_gTX*6%5Z>qg6?)u#*u*B>&*=j(AxldF#mS~ypFSu?fEpuFShCh=l`oNGVqCyI9OU_uf-6IqE z#8kYLnq1ag!m;8^XsWpsNPaEVie}`~n9SJXvrGCsWx31>OB%KVGLt$dYo>-`8??HOmP`CSx{uUE<{VAn zVqyFP)`R|XPA2@BWuC*0n=hXEd_14$%;*qyny%F0iY{26<*DLp>zhcfR)yfH@oWCU zWr*cmKT&0L?#<*qBNK>>%$IUaS|@==-BX(9rS(*hbH%lm!lRk8Ia5re>^!6C!`+hW z(jkq8dvYY#FN!agMjWrikuPMR7#n~VC#hU{(l00RP|PKItJSKE|NPMiPhcCj4rc0g zvAUs)+=y^h`o>hg$-UZ1fPe1(2wbR(8G{Vl*oZ=|KYZ|%v~;-JsGoG&o#y7_CBaCF z#U6=wuO(VS6d9g$!g~0INSlCRz1wJaYjxLxO9ppQ^E58hBYS~_r6}<3GH%x^8>}T$MKr6*%X2!%CNo?$>%$veJrC)Jn(^R20H}H^KUdOj48oM ztr>)kX3b08n28+Dx?*}MXQ<)E<}MivMxrHOlSpRh0L3UlYN=d5#3>W(=4EY;aks1k zwt+lt)&r8W)Fm508s9U8r_YHOWeY@rrwcBq!QP{QWSM5bqxrwg7oU1faEATLzopYT}m@+trHuxScLv8}Q4M%v|JZrr6L=P}uLr!h!Uirhi z^qkY3;F61Pu69@Sd5?=Hhs{V2(hD%yl|0C3zC`M4Nz8X| zTc$J{F|p8ws1}md%B8^Ss;*@TrS5ISOMstGB?Oi~s{aZ2Fy%C}`nq?+(j~vH+2Z%2 zOqFdmLwRWiZAX(W!xc@Hf#I@B?}E9#$>-ctqix#u}|%qoWE#h zN=bXaW4DCw@z<6(X4xF?zq#H}?)N%kOO0^@SVUV~Ag~m6O}2S>RAyiCM`m*-hJ4T1 zsnO`LDg&7oxn(=z5!0*0fHbK1h$`>WSf%ZnT+sXl+D3_?LzXKl!0^NRU;=8I*&KxH zw|PSF(P3TyG_7da?i@(+t$r~D6xyQSyEv9qt+C>uIqzYBT8E^KBc9!lQD2@m7UR7{wtzDDeU?REDkg+TU{6qChNIZOsg=Cv6n{t1c3EL%5Zx<_@Ef=4yUUp3& zW0dxoYF=ApiS3#gdTjJfWX_HpVQy6~)%60dlL1$5Ik3mrwY-*nrYXr@+CW>RgWG@g}!! zpUWT`j$QOMb)7-t;0S9*#8$gh}D72@TOWGXZn=O>Cgy+p!XQB^IIbPE;vGVEVxx0@;u(A4%&&rmm4)gySXXgA3%C83dP;2a_-z3HPTS7lc?>Uy# zok`ozixMLykpAqC>g50)&\n"; } +if ($image_data['date_of_exposure'] != "null") { + $exposure_year = substr($image_data['date_of_exposure'], 0, 4); $exposure_month = substr($image_data['date_of_exposure'], 5, 2); $exposure_day = substr($image_data['date_of_exposure'], 8, 2); @@ -347,19 +349,32 @@ function create_xml_photo($image_data) { $xml_string .= " seconds=\"$exposure_sec\""; $xml_string .= " />\n"; } +} if ($image_data['location'] && $image_data['location'] != "null") $xml_string .= "\n"; - if (($image_data['storage_location_type'] && $image_data['storage_location_type'] != null) || - ($image_data['storage_location_id'] && $image_data['storage_location_id'] != null) || - ($image_data['storage_index'] && $image_data['storage_index'] != null)) { + if ($image_data['latitude'] || $image_data['longitude'] || + $image_data['altitude'] || $image_data['direction']) { + $xml_string .= "\n"; + } + + if ($image_data['remark'] != "") { + $xml_string .= "$image_data[remark]\n"; + } + if (($image_data['camera'] && $image_data['camera'] != "null") || ($image_data['camera_metering'] && $image_data['camera_metering'] != "null") || ($image_data['camera_program'] && $image_data['camera_program'] != "null") || @@ -624,21 +647,21 @@ function convert_read_body($fd, $format) { else $camera_program = "auto"; - $shooting_data[$frames] = array(shutter => $shutter, - aperture => $aperture, - flash_mode => $flash_mode, - camera_metering => $camera_metering, - camera_program => $camera_program, - focal_length => $focal_length, - exp_comp => $exp_comp, - minimum_aperture => $minimum_aperture, - ev_diff => $ev_diff, - caption => $caption); + $shooting_data[$frames] = array('shutter' => $shutter, + 'aperture' => $aperture, + 'flash_mode' => $flash_mode, + 'camera_metering' => $camera_metering, + 'camera_program' => $camera_program, + 'focal_length' => $focal_length, + 'exp_comp' => $exp_comp, + 'minimum_aperture' => $minimum_aperture, + 'ev_diff' => $ev_diff, + 'caption' => $caption); $frames++; } - return array(frames => $frames, data => $shooting_data); + return array('frames' => $frames, 'data' => $shooting_data); } ?> diff --git a/src/include/import.php b/src/include/import.php index 89de4aa..bf6831c 100644 --- a/src/include/import.php +++ b/src/include/import.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -22,78 +22,57 @@ include_once "mime.php"; include_once "exif.php"; include_once "iptc.php"; include_once "rdf.php"; +include_once "site.php"; function count_storage_space_by_user($database, $user_id) { global $image_repository_path; - $all_photos_of_user = pg_query($database, " - select small_image_path, medium_image_path, large_image_path - from photo_version, photo - where photo.identifier = photo_version.photo - and photo.users = $user_id"); + $file_sizes = pg_query($database, " + select sum(filesize) + from files, photo_version, photo + where photo.users = $user_id + and photo.identifier = photo_version.photo + and files.version = photo_version.identifier"); - $num_of_photos = pg_num_rows($all_photos_of_user); - $result = array('size' => 0, 'files' => 0, 'directories' => 0); + $size = pg_fetch_row($file_sizes); - $result = 0; - - error_reporting(0); - for ($photo = 0; $photo < $num_of_photos; $photo++) { - $photo_paths = pg_fetch_row($all_photos_of_user, $i); - $result += filesize($image_repository_path."/". $photo_paths[0]); - $result += filesize($image_repository_path."/". $photo_paths[1]); - $result += filesize($image_repository_path."/". $photo_paths[2]); - } - error_reporting(1); - return $result; + return $size[0]; } -function dirsize($directory) { - $result = array("size" => 0, "files" => 0, "directories" => 0); +function dirsize($database, $directory) { + $result = array("size" => 0, "files" => 0); - if ($handle = opendir($directory)) { - while (FALSE !== ($file_name = readdir($handle))) { + $query = pg_query($database, "select count(identifier), sum(filesize) from files where path LIKE '$directory%'"); - if ($file_name == "." || $file_name == "..") - continue; - - if (is_dir($directory."/".$file_name)) { - $sub_results = dirsize($directory."/".$file_name); - $result['size'] += $sub_results['size']; - $result['files'] += $sub_results['files']; - $result['directories'] += $sub_results['directories'] + 1; - } - if (is_file($directory."/".$file_name)) { - $result['size'] += filesize($directory."/".$file_name); - $result['files'] ++; - } - } - closedir($handle); + if ($query && pg_num_rows($query)) { + $row = pg_fetch_row($query); + $result['files'] = $row[0]; + $result['size'] = $row[1]; } + return $result; } - function get_current_volume($database, $image_file) { global $image_repository_path; + global $po_options_default; - $system_preferences = pg_fetch_row(pg_query($database, "select current_volume, volume_max_size from system_preferences")); - $new_volume = $system_preferences[0]; + $curr_volume = readlink($image_repository_path."/current"); + $new_volume = $curr_volume; do { - $dir_size = dirsize($image_repository_path."/". $new_volume); + $dir_size = dirsize($database, $new_volume); if (is_file($image_file)) { $image_size = filesize($image_file); - } - else { + } else { $image_size = 0; } $dir_size['size'] = round($dir_size['size']/1048576, 2); /* if size is smaller return the volume as current volume */ - if (($dir_size['size'] + $image_size/1048576) < $system_preferences[1]) + if (($dir_size['size'] + $image_size/1048576) < $po_options_default['volume_max_size']) break; $new_volume++; @@ -101,8 +80,7 @@ function get_current_volume($database, $image_file) { /* if the next volume check if there is enough space */ closedir($directory_handle); continue; - } - else { + } else { /* if the next volume does not exist, try to create it */ if (!mkdir($image_repository_path."/".$new_volume, 0700)) return FALSE; @@ -116,167 +94,320 @@ function get_current_volume($database, $image_file) { } } while (TRUE); - if ($new_volume != $system_preferences[0]) - pg_query($database, "update system_preferences set current_volume='$new_volume'"); + if ($new_volume != $curr_volume) { + unlink($image_repository_path."/current"); + po_symlink($new_volume, "$image_repository_path/current"); + } return $new_volume; } -function photo_import($database, $index, $im_options, $my_im_composite_options, $dcraw_options, $user_id, $default_folder_id, $image_data) { +function display_data_decoding_radio() { + global $strings; + + print "\n"; + print ""; + print emit_th(" "); + print emit_th($strings['generic']['skip']); + print emit_th($strings['generic']['first']); + print emit_th($strings['generic']['second']); + print emit_th($strings['generic']['third']); + print ""; + print ""; + print emit_td("EXIF"); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print ""; + print ""; + print emit_td("XMP"); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print ""; + print ""; + print emit_td("IPTC"); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print emit_td(""); + print ""; + print "
    \n"; +} + +function extract_exiftool_metadata($image_data, $index, $type = "EXIF") { + global $sys_exiftool; + global $strings; + + $image_data["exiftool_data_$type"] = NULL; + $exif_data = array(); + + $exclude_args = ""; + + switch ($type) { + case 'EXIF' : + $exclude_args = "-x xmp:all -x iptc:all"; + break; + case 'IPTC' : + $exclude_args = "-iptc:all"; + break; + case 'XMP' : + $exclude_args = "-xmp:all"; + break; + case 'ORIENT' : + $exclude_args = "-Orientation -ICCProfile -ColorSpace -ProfileClass -Make -Model"; + break; + } + + print "
  • ".$strings['import']['extracting_metadata']." ($type) ... "; + + if (!is_executable($sys_exiftool)) { + print err_str($strings['errors']['exiftool_not_installed']) ."
  • "; + return $image_data; + } + + $handle = popen("$sys_exiftool $exclude_args " . $image_data['file'][$index]['name_tmp'], "r"); + + if ($handle === FALSE) { + print err_str($strings['errors']['exiftool_failed']) .""; + return $image_data; + } + + while (!feof($handle)) { + $line = fgets($handle); + $parts = explode(":", $line, 2); + $parts[0] = trim($parts[0]); + if (!isset($parts[1])) continue; + $parts[1] = trim($parts[1]); + if ($parts[0] == "File Name") continue; + if ($parts[0] == "Directory") continue; + if (substr($parts[1], 2, 6) == "Binary") continue; + // print "
  • key: $parts[0] value: $parts[1]
  • "; + $exif_data[$parts[0]] = $parts[1]; + } + pclose($handle); + $image_data["exiftool_data_$type"] = $exif_data; + + print $strings['generic']['done'].""; + + return $image_data; +} + +function transfer_metadata($image_data, $original_name, $image_name, $verbose, $fix_orient) { + global $sys_exiftool; + global $po_options; + global $image_repository_path; + global $strings; + + $retval = FALSE; + + /* Fix up paths as necessary */ + if (substr($original_name, 0, 1) != '/') { + $original_name = $image_repository_path . "/" . $original_name; + } + if (substr($image_name, 0, 1) != '/') { + $image_name = $image_repository_path . "/" . $image_name; + } + + // image_data can be NULL! + + /* Copy over image tags */ + if (is_executable($sys_exiftool)) { + if ($verbose) + print "
  • ".$strings['import']['transferring_metadata']." ... "; + + if ($fix_orient) { + $orient = " -Orientation=1 -n "; + } else { + $orient = ""; + } + + $cmdline = "$sys_exiftool -q -overwrite_original -TagsFromFile " . escapeshellarg($original_name) ." $orient ". escapeshellarg($image_name); + system($cmdline, $retval); + + if (!$retval) { + if ($verbose) { + print $strings['generic']['done'].".
  • "; + } + } else { + if ($verbose) { + print "".$strings['generic']['failed']."."; + print "
  • $cmdline
  • "; + } + } + } + return !$retval; +} + +function photo_import($database, $index, $user_id, $default_folder_id, &$image_data) { global $image_repository_path; global $mime_type; + global $po_options; + global $strings; if (($current_volume = get_current_volume($database, $image_data['file'][$index]['name_tmp'])) == FALSE) { - print "Failed to create new volume in the image repository.
    "; + print err_str($strings['errors']['failed_volume']); return FALSE; } - if (!is_readable( $image_data['file'][$index]['name_tmp'])) { - print "Image is not readable.
    "; + if (!is_readable($image_data['file'][$index]['name_tmp'])) { + print err_str($strings['errors']['invalid_file'] . "(" . $image_data['file'][$index]['name'] .")"); + return FALSE; + } + + /* Trims the temporary directory name that is used during bulk upload */ + $pos = strpos($image_data['file'][$index]['name'], "/"); + if (is_integer($pos)) { + $original_name = substr($image_data['file'][$index]['name'], strrpos($image_data['file'][$index]['name'], "/") + 1); + } else { + $original_name = $image_data['file'][$index]['name']; + } + + if ($original_name == '') { + print err_str($strings['errors']['invalid_file'] . "(" . $image_data['file'][$index]['name'] .")"); return FALSE; } pg_query($database, "begin"); - $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); - $image_data['file'][$index]['type'] = strtolower($image_data['file'][$index]['type']); - $hires_name = $current_volume . "/00000/" . $next_index[0] . "." . $image_data['file'][$index]['type']; + $original_file_type = strtolower($image_data['file'][$index]['type']); - // we do this to trim the temporary directory name that is used during bulk upload - $pos = strpos($image_data['file'][$index]['name'], "/"); - if (is_integer($pos)) { - $original_name = substr($image_data['file'][$index]['name'], strrpos($image_data['file'][$index]['name'], "/") + 1); - } - else { - $original_name = $image_data['file'][$index]['name']; - } + $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); + + $hires_name = $current_volume . "/00000/" . $next_index[0] . "_3_orig." . $original_file_type; $image_data['file'][$index]['original_name'] = $original_name; - $original_file_type = $image_data['file'][$index]['type']; - $image_data['file'][$index]['type'] = $mime_type[$original_file_type]['out']; $multi_page_parameter = $mime_type[$original_file_type]['page']; $mime_type_name = $mime_type[$original_file_type]['name']; $decoder = $mime_type[$original_file_type]['decoder']; - if (!$image_data['file'][$index]['type']) { - $image_data['file'][$index]['type'] = "jpeg"; - } - - $thumb_name = $current_volume . "/00002/" . $next_index[0] . "." . $image_data['file'][$index]['type']; - $image_name = $current_volume . "/00001/" . $next_index[0] . "." . $image_data['file'][$index]['type']; - - print " 
    \n"; - $target_folder = pg_fetch_row(pg_query($database, "select caption, users from folder where identifier = '$image_data[folder]'")); - if ($target_folder[1] != $user_id) { - print "You do not own the destination folder $target_folder[0]."; + if (!isset($image_data['folder'])) $image_data['folder'] = $default_folder_id; - $target_folder = pg_fetch_row(pg_query($database, "select caption from folder where identifier = '$image_data[folder]'")); + + $thumb_name = $current_volume . "/00002/" . $next_index[0] . "_1." . $po_options['thumb_format']; + $image_name = $current_volume . "/00001/" . $next_index[0] . "_2." . $po_options['preview_format']; + + $target_folder = pg_fetch_row(pg_query($database, "select caption, users from folder where identifier = $image_data[folder]")); + if ($target_folder[1] != $user_id) { + print err_str($strings['errors']['not_folder_owner']." (".emit_a("folder.php?folder=$image_data[folder]", $target_folder[0]). ")"); + $image_data['folder'] = $default_folder_id; + $target_folder = pg_fetch_row(pg_query($database, "select caption from folder where identifier = $image_data[folder]")); } - print "Importing the $mime_type_name file ".$image_data['file'][$index]['name']." into folder $target_folder[0]
    "; + + print "

    ".sprintf($strings['import']['importing_into_folder'], $original_name, $mime_type_name, emit_a("folder.php?folder=$image_data[folder]", "$target_folder[0]"))."

    "; + flush(); - print "
      "; + print "
        "; - $preferences = pg_fetch_row(pg_query($database, " - select quota_size, quota_count - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$user_id")); - - if ($preferences[0] > 0) { + /* Check quotas */ + if ($po_options['quota_size'] > 0) { $used_storage_space = count_storage_space_by_user($database, $user_id); $used_storage_space += filesize($image_data['file'][$index]['name_tmp']); - if ($preferences[0] <= $used_storage_space) { - pg_query($database, "rollback"); - error_reporting(0); + if ($po_options['quota_size'] <= $used_storage_space) { + pg_query($database, "rollback"); + $err = error_reporting(0); unlink($image_data['file'][$index]['name_tmp']); - error_reporting(1); - $preferences[0] /= 1048576; - print "
      • Your account have reached the storage space quota of $preferences[0] Mb, imposed by your PO adminstrator.
        "; - print "No further uploads are possible.
      • "; + error_reporting($err); + $po_options['quota_size'] /= 1048576; + print "
      • "; + print err_str($strings['errors']['quota_space_full'] . " ($po_options[quota_size] MB)"); + print $strings['import']['no_more_uploads']; + print "
      • "; print "
      "; return FALSE; } } - if ($preferences[1] > 0) { + if ($po_options['quota_count'] > 0) { $num_of_photo_versions = pg_fetch_row(pg_query($database, "select count_photo_versions_by_user($user_id)")); $num_of_photo_versions++; - if ($preferences[1] <= $num_of_photo_versions[0]) { - pg_query($database, "rollback"); - error_reporting(0); + if ($po_options['quota_count'] <= $num_of_photo_versions[0]) { + pg_query($database, "rollback"); + $err = error_reporting(0); unlink($image_data['file'][$index]['name_tmp']); - error_reporting(1); - print "
    • Your account have reached the photo quota of $preferences[1] photos including photo versions, imposed by your PO adminstrator.
      "; - print "No further uploads are possible.
    • "; + error_reporting($err); + print "
    • "; + print err_str($strings['errors']['quota_count_full'] . " ($po_options[quota_count] ".$strings['generic']['files'] .")"); + print $strings['import']['no_more_uploads']; + print "
    • "; print "
    "; return FALSE; } } - + /* Extract any metadata */ if ($image_data['decode_exif'] == 1) $image_data = photo_parse_exif($database, $index, $user_id, $image_data); - if ($image_data['decode_iptc'] == 1) + else if ($image_data['decode_iptc'] == 1) $image_data = photo_parse_iptc($database, $index, $user_id, $image_data); - if ($image_data['decode_rdf'] == 1) + else if ($image_data['decode_rdf'] == 1) $image_data = photo_parse_rdf($database, $index, $user_id, $image_data); if ($image_data['decode_exif'] == 2) $image_data = photo_parse_exif($database, $index, $user_id, $image_data); - if ($image_data['decode_iptc'] == 2) + else if ($image_data['decode_iptc'] == 2) $image_data = photo_parse_iptc($database, $index, $user_id, $image_data); - if ($image_data['decode_rdf'] == 2) + else if ($image_data['decode_rdf'] == 2) $image_data = photo_parse_rdf($database, $index, $user_id, $image_data); - if ($image_data['decode_exif'] == 3) + if ($image_data['decode_exif'] == 3) $image_data = photo_parse_exif($database, $index, $user_id, $image_data); - if ($image_data['decode_iptc'] == 3) + else if ($image_data['decode_iptc'] == 3) $image_data = photo_parse_iptc($database, $index, $user_id, $image_data); - if ($image_data['decode_rdf'] == 3) + else if ($image_data['decode_rdf'] == 3) $image_data = photo_parse_rdf($database, $index, $user_id, $image_data); - if (!$image_data['caption']) - $image_data['caption'] = "No Caption"; + /* Figure out orientation and necessary transforms */ + $orientation = orientation_id_from_string($database, $image_data["orientation"]); + $image_data["orientation_xform"] = orientation_to_xform($database, $orientation); - if (!file_upload($image_data, $index, $im_options, $my_im_composite_options, $dcraw_options, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database)) { + if (!file_upload($image_data, $index, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database)) { pg_query($database, "rollback"); - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path."/".$hires_name); unlink($image_repository_path."/".$image_name); unlink($image_repository_path."/".$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } + /* Sanity-check the timestamp */ $image_data['date_of_exposure'] = check_date_validity($image_data['date_of_exposure']); + /* Insert into database */ $query = "insert into photo (identifier, users, folder, location, caption, date_of_exposure, access_rights, copyright_statement, - views, hide_original, author, title, + views, hide_original, author, title, caption_writer, category, credit, source, headline, instructions, transmission_reference, - supplemental_category, web_statement) + supplemental_category, web_statement, store_url, comments) values ($next_index[0], '$user_id', '$image_data[folder]', $image_data[location], '$image_data[caption]', $image_data[date_of_exposure], '$image_data[access_rights]', '$image_data[copyright]', 0, '$image_data[hide_original]', '$image_data[author]', '$image_data[title]', '$image_data[caption_writer]', '$image_data[category]', '$image_data[credit]', '$image_data[source]', '$image_data[headline]', '$image_data[instructions]', '$image_data[transmission_reference]', - '$image_data[supplemental_category]', '$image_data[web_statement]')"; + '$image_data[supplemental_category]', '$image_data[web_statement]', '$image_data[store_url]', '$image_data[remark]')"; $result = pg_query($database, $query); if (!$result) { - pg_query($database, "rollback"); - print "
  • Failed to insert rows into photo.
  • "; - print "
      $query
    "; - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + $error = pg_last_error($database); + print "
  • $error
  • "; + + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path."/".$hires_name); unlink($image_repository_path."/".$image_name); unlink($image_repository_path."/".$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } @@ -289,18 +420,20 @@ function photo_import($database, $index, $im_options, $my_im_composite_options, if ($keyword == "") continue; $keyword = pg_escape_string($keyword); - $result = pg_query($database, "insert into photo_keywords (photo, keyword) values ($next_index[0], '$keyword')"); + $query = "insert into photo_keywords (photo, keyword) + values ($next_index[0], '$keyword')"; + $result = pg_query($database, $query); + if (!$result) { pg_query($database, "rollback"); - print "
  • Failed to insert keyword data.
  • "; - print "
      $query
    "; - - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path."/".$hires_name); unlink($image_repository_path."/".$image_name); unlink($image_repository_path."/".$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } @@ -308,239 +441,424 @@ function photo_import($database, $index, $im_options, $my_im_composite_options, $comment = $image_data['file'][$index]['remark']; - $orientation = orientation_id_from_string($database, $image_data['orientation']); - $colorspace = $image_data['colorspace'] == "" ? "1" : $image_data['colorspace']; + $next_version = pg_fetch_row(pg_query($database, "select nextval('photo_version_id_sequence')")); - $query = "insert into photo_version(identifier, key, photo, master, small_image_path, medium_image_path, large_image_path, original_image_name, date_of_creation, comment, colorspace, orientation) - values (nextval('photo_version_id_sequence'), 1, $next_index[0], 't', '$thumb_name', '$image_name', '$hires_name', '$original_name', now(), '$comment', $colorspace, $orientation)"; + $orientation = orientation_id_from_string($database, $image_data["orientation"]); + + $query = "insert into photo_version(identifier, key, photo, master, original_image_name, comment, colorspace, orientation) + values ($next_version[0], 1, $next_index[0], 't', '$original_name', '$comment', " . $image_data['colorspace'] . " , $orientation )"; $result = pg_query($database, $query); + if (!$result) { pg_query($database, "rollback"); - print "
  • Failed to insert rows into photo_version.
  • "; - print "
      $query
    "; - - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path."/".$hires_name); unlink($image_repository_path."/".$image_name); unlink($image_repository_path."/".$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } + /* Thumbnail */ + $image_dimension = po_get_image_size($image_repository_path."/".$thumb_name); + $size = filesize($image_repository_path."/".$thumb_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 1, + $image_dimension[0], $image_dimension[1], '$thumb_name', + $size, '', '', null)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + + /* preview image */ + + if ($po_options['watermark_location'] && + $po_options['watermark_brightness'] && + $po_options['watermark_photo']) { + $watermark = $po_options['watermark_photo']; + } else { + $watermark = "null"; + } + + $image_dimension = po_get_image_size($image_repository_path."/".$image_name); + $size = filesize($image_repository_path."/".$image_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 2, + $image_dimension[0], $image_dimension[1], '$image_name', + $size, '', '', $watermark)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + + /* original image */ + $image_dimension = po_get_image_size($image_repository_path."/".$hires_name); + $size = filesize($image_repository_path."/".$hires_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 3, + $image_dimension[0], $image_dimension[1], '$hires_name', + $size, '', '', null)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + + if ($image_data['storage_location_type'] == "null") + $image_data['storage_location_type'] = ""; + $storage_location = $image_data['storage_location_type'].$image_data['storage_location_id']; - $query = "insert into photo_dupe (identifier, key, photo, date_of_creation, storage_location, storage_index, remark) - values (nextval('photo_dupe_id_sequence'), 1, $next_index[0], now(), '$storage_location', '$image_data[storage_index]', 'Original')"; + $query = "insert into photo_dupe (identifier, key, photo, date_of_creation, storage_location, storage_index, remark, version) + values (nextval('photo_dupe_id_sequence'), 1, $next_index[0], now(), '$storage_location', '$image_data[storage_index]', 'Original', $next_version[0])"; $result = pg_query($database, $query); if (!$result) { pg_query($database, "rollback"); - print "
  • Failed to insert rows into photo_dupe.
  • "; - print "
      $query
    "; - print " 
    \n"; - - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path."/".$hires_name); unlink($image_repository_path."/".$image_name); unlink($image_repository_path."/".$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } + + if ($image_data['latitude'] == "") $image_data['latitude'] = "null"; + if ($image_data['longitude'] == "") $image_data['longitude'] = "null"; + if ($image_data['altitude'] == "") $image_data['altitude'] = "null"; + if ($image_data['direction'] == "") $image_data['direction'] = "null"; - if ($image_data['camera'] != "null" || $image_data['lens'] != "null" || - $image_data['film'] != "null" || $image_data['flash'] != "null" || - $image_data['support'] != "null" || $image_data['scanner'] != "null" || - $image_data['filter'] != "null" || $image_data['scan_resolution'] != "null" || - $image_data['scan_bitdepth'] != "null" || $image_data['scan_multiscan'] != "null" || - $image_data['aperture'] != "null" || $image_data['focal_length'] != "null" || - $image_data['shutter'] != "null" || $image_data['camera_metering'] != "null" || - $image_data['camera_program'] != "null" || $image_data['flash_mode'] != "null" || - $image_data['exp_comp'] != "null" || $image_data['flash_comp'] != "null" || - $image_data['exif'] != "null" || $image_data['iptc'] != "null" || - $image_data['exp_diff'] != "null" || $image_data['iso_override'] != "null") { - - $query = "insert into photo_tech (identifier, photo, camera, lens, film, flash, scanner, filter, scan_resolution, aperture, focal_length, shutter, camera_metering, camera_program, flash_mode, exposure_comp, flash_comp, ev_difference, iso_override, support, scan_bitdepth, scan_multiscan, exif, iptc) + $query = "insert into photo_tech (identifier, photo, camera, lens, film, flash, scanner, filter, scan_resolution, aperture, focal_length, shutter, camera_metering, camera_program, flash_mode, exposure_comp, flash_comp, ev_difference, iso_override, support, scan_bitdepth, scan_multiscan, exif, iptc, latitude, longitude, altitude, img_direction, rdf) values (nextval('photo_tech_id_sequence'), $next_index[0], $image_data[camera], $image_data[lens], $image_data[film], $image_data[flash], $image_data[scanner], $image_data[filter], $image_data[scan_resolution], $image_data[aperture], $image_data[focal_length], $image_data[shutter], $image_data[camera_metering], $image_data[camera_program], $image_data[flash_mode], $image_data[exp_comp], $image_data[flash_comp], $image_data[exp_diff], $image_data[iso_override], - $image_data[support], $image_data[scan_bitdepth], $image_data[scan_multiscan], - '$image_data[exif]', '$image_data[iptc]')"; - $result = pg_query($database, $query); - if (!$result) { - pg_query($database, "rollback"); - print "
  • Failed to insert rows into photo_tech.
  • "; - print "
      $query
    "; - print " 
    \n"; + $image_data[support], $image_data[scan_bitdepth], $image_data[scan_multiscan], + '$image_data[exif]', '$image_data[iptc]', $image_data[latitude], $image_data[longitude], $image_data[altitude], $image_data[direction], '$image_data[rdf]')"; + $result = pg_query($database, $query); + if (!$result) { - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; - unlink($image_repository_path."/".$hires_name); - unlink($image_repository_path."/".$image_name); - unlink($image_repository_path."/".$thumb_name); - error_reporting(1); - print ""; - return FALSE; - } + $error = pg_last_error($database); + print "
  • $error
  • "; + + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; } + print "
  • ".$strings['import']['complete']." ( ". emit_a("photo.php?photo=$next_index[0]", "#" . $next_index[0]) .")
  • "; pg_query($database, "commit"); print ""; + + /* If we have an embedded preview image, import it as a secondary version */ + if ($image_data['jpgfromraw']) { + $image_data_b = $image_data; + + /* Transfer metadata over to preview image */ + transfer_metadata($image_data_b, + $image_repository_path."/".$hires_name, + $image_data['jpgfromraw'], FALSE, FALSE); + + /* Fill in the blanks */ + $image_data_b['file'][$index]['name'] = $image_data['file'][$index]['name'] . "_jpgfromraw.jpg"; + $image_data_b['file'][$index]['name_tmp'] = $image_data['jpgfromraw']; + $image_data_b['file'][$index]['type'] = "jpeg"; + $image_data_b['file'][$index]['remark'] = ""; + $image_data_b['file'][$index]['master'] = "f"; + $image_data_b['orientation'] = $image_data['orientation_orig']; + $image_data_b['file'][$index]['remark'] = "Preview image extracted from RAW"; + + /* And import it. This will unlink the temp file */ + photo_version_import($database, $index, $user_id, $next_index[0], $image_data_b); + } + return $next_index[0]; } -function photo_version_import($database, $index, $im_options, $my_im_composite_options, $dcraw_options, $user_id, $photo_id, $image_data) { +function photo_version_import($database, $index, $user_id, $photo_id, $image_data) { global $image_repository_path; global $mime_type; + global $po_options; + global $strings; if (($current_volume = get_current_volume($database, $image_data['file'][$index]['name_tmp'])) == FALSE) { - print "Failed to create new volume in the image repository.
    "; + print err_str($strings['errors']['failed_volume']); return FALSE; } if (!is_readable( $image_data['file'][$index]['name_tmp'])) { - print "Image is not readable.
    "; + print err_str($strings['errors']['invalid_file'] . "(" . $image_data['file'][$index]['name'] .")"); return FALSE; } - $preferences = pg_fetch_row(pg_query($database, " - select quota_size, quota_count - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$user_id")); + /* Trims the temporary directory name that is used during bulk upload */ - if ($preferences[0] > 0) { - $used_storage_space = count_storage_space_by_user($database, $user_id); - $used_storage_space += filesize($image_data['file'][$index]['name_tmp']); - if ($preferences[0] <= $used_storage_space) { - print "
  • Your account have reached the storage space quota of $preferences[0] Mb, imposed by your PO adminstrator.
    "; - print "No further uploads are possible.
  • "; - print "

    "; - site_footer($database); - site_epilog($database); - exit(); - } - } - - if ($preferences[1] > 0) { - $num_of_photo_versions = pg_fetch_row(pg_query($database, "select count_photo_versions_by_user($user_idy)")); - $num_of_photo_versions++; - if ($preferences[1] <= $num_of_photo_versions[0]) { - print "

  • Your account have reached the photo quota of $preferences[1] photos including photo versions, imposed by your PO adminstrator.
    "; - print "No further uploads are possible.
  • "; - print "

    "; - site_footer($database); - site_epilog($database); - exit(); - } - } - - $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); - $image_data['file'][$index]['type'] = strtolower($image_data['file'][$index]['type']); - $hires_name = $current_volume . "/00000/" . $next_index[0] . "." . $image_data['file'][$index]['type']; - - // we do this to trim the temporary directory name that is used during bulk upload $pos = strpos($image_data['file'][$index]['name'], "/"); if (is_integer($pos)) { $original_name = substr($image_data['file'][$index]['name'], strrpos($image_data['file'][$index]['name'], "/") + 1); - } - else { + } else { $original_name = $image_data['file'][$index]['name']; } - $original_file_type = $image_data['file'][$index]['type']; - $image_data['file'][$index]['type'] = $mime_type[$original_file_type]['out']; - $multi_page_parameter = $mime_type[$original_file_type]['page']; - $mime_type_name = $mime_type[$original_file_type]['name']; - $decoder = $mime_type[$original_file_type]['decoder']; - - if (!$image_data['file'][$index]['type']) { - $image_data['file'][$index]['type'] = "jpeg"; - } - - $thumb_name = $current_volume . "/00002/" . $next_index[0] . "." . $image_data['file'][$index]['type']; - $image_name = $current_volume . "/00001/" . $next_index[0] . "." . $image_data['file'][$index]['type']; - - $photo_data = pg_fetch_row(pg_query($database, " - select caption - from photo - where photo.identifier = '$photo_id'")); - - print " 
    \n"; - print "Importing the $mime_type_name file ".$image_data['file'][$index]['name']." as a new version of $photo_data[0]
    "; - flush(); - print "

      "; - - $master = $image_data['file'][$index]['master']; - if (!file_upload($image_data, $index, $im_options, $my_im_composite_options, $dcraw_options, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database)) { - error_reporting(0); - print "
    • Cleaning up the mess.
    • "; - unlink($image_repository_path ."/" .$hires_name); - unlink($image_repository_path ."/" .$image_name); - unlink($image_repository_path ."/" .$thumb_name); - error_reporting(1); - print "
    "; + if ($original_name == '') { + print err_str($strings['errors']['invalid_file'] . "(" . $image_data['file'][$index]['name'] .")"); return FALSE; } pg_query($database, "begin"); + $original_file_type = strtolower($image_data['file'][$index]['type']); + + $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); + + $hires_name = $current_volume . "/00000/" . $next_index[0] . "_3_orig." . $original_file_type; + + $multi_page_parameter = $mime_type[$original_file_type]['page']; + $mime_type_name = $mime_type[$original_file_type]['name']; + $decoder = $mime_type[$original_file_type]['decoder']; + + $thumb_name = $current_volume . "/00002/" . $next_index[0] . "_1." . $po_options['thumb_format']; + $image_name = $current_volume . "/00001/" . $next_index[0] . "_2." . $po_options['preview_format']; + + print "

    ". sprintf($strings['import']['importing_new_version'], $original_name, $mime_type_name, emit_a("photo.php?photo=$photo_id&detail_info=5", "$photo_id")) ."

    "; + + flush(); + print "
      "; + + /* Check quotas */ + if ($po_options['quota_size'] > 0) { + $used_storage_space = count_storage_space_by_user($database, $user_id); + $used_storage_space += filesize($image_data['file'][$index]['name_tmp']); + if ($po_options['quota_size'] <= $used_storage_space) { + pg_query($database, "rollback"); + $err = error_reporting(0); + unlink($image_data['file'][$index]['name_tmp']); + error_reporting($err); + $po_options['quota_size'] /= 1048576; + print "
    • "; + print err_str($strings['errors']['quota_space_full'] . " ($po_options[quota_size] MB)"); + print $strings['import']['no_more_uploads']; + print "
    • "; + print "
    "; + return FALSE; + } + } + + if ($po_options['quota_count'] > 0) { + $num_of_photo_versions = pg_fetch_row(pg_query($database, "select count_photo_versions_by_user($user_id)")); + $num_of_photo_versions++; + if ($po_options['quota_count'] <= $num_of_photo_versions[0]) { + pg_query($database, "rollback"); + $err = error_reporting(0); + unlink($image_data['file'][$index]['name_tmp']); + error_reporting($err); + print "
  • "; + print err_str($strings['errors']['quota_count_full'] . " ($po_options[quota_count] ".$strings['generic']['files'] .")"); + print $strings['import']['no_more_uploads']; + print "
  • "; + print ""; + return FALSE; + } + } + + /* Orientation and colorspace */ + $image_data = extract_exiftool_metadata($image_data, $index, "ORIENT"); + $image_data = photo_parse_exif_orientation_colorspace($database, $index, $user_id, $image_data, "ORIENT"); + + $orientation = orientation_id_from_string($database, $image_data['orientation']); + $colorspace = $image_data['colorspace'] == "" ? "1" : $image_data['colorspace']; + + $master = $image_data['file'][$index]['master']; + if (!file_upload($image_data, $index, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database)) { + pg_query($database, "rollback"); + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path ."/" .$hires_name); + unlink($image_repository_path ."/" .$image_name); + unlink($image_repository_path ."/" .$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + if ($master == 't') { $query = "update photo_version set master='f' where photo=$photo_id"; $result = pg_query($database, $query); if (!$result) { - - print "
  • Failed to insert rows into photo_tech.
  • "; - print "
      $query
    "; - print " 
    \n"; - pg_query($database, "rollback"); - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path ."/" .$hires_name); unlink($image_repository_path ."/" .$image_name); unlink($image_repository_path ."/" .$thumb_name); - error_reporting(1); + error_reporting($err); print ""; return FALSE; } } $key = pg_fetch_row(pg_query($database, "select max(key) from photo_version where photo=$photo_id")); - $key[0] = $key[0] + 1; + $key[0]++; $comment = $image_data['file'][$index]['remark']; $pos = strpos($image_data['file'][$index]['name'], "/"); if (is_integer($pos)) { $original_name = substr($image_data['file'][$index]['name'], strrpos($image_data['file'][$index]['name'], "/") + 1); - } - else { + } else { $original_name = $image_data['file'][$index]['name']; } - $orientation = orientation_id_from_string($database, $image_data['orientation']); - $colorspace = $image_data['colorspace'] == "" ? "1" : $image_data['colorspace']; + $next_version = pg_fetch_row(pg_query($database, "select nextval('photo_version_id_sequence')")); - $query = "insert into photo_version (identifier, key, photo, master, small_image_path, medium_image_path, large_image_path, original_image_name, date_of_creation, comment, colorspace, orientation) - values (nextval('photo_version_id_sequence'), '$key[0]', '$photo_id', '$master', '$thumb_name', '$image_name', '$hires_name', '$original_name', now(), '$comment', $colorspace, $orientation)"; + $query = "insert into photo_version (identifier, key, photo, master, original_image_name, comment, colorspace, orientation) + values ($next_version[0], '$key[0]', '$photo_id', '$master', '$original_name', '$comment', $colorspace, $orientation)"; $result = pg_query($database, $query); if (!$result) { - print "
  • Failed to insert rows into photo_version.
  • "; - print "
      $query
    "; - print " 
    \n"; pg_query($database, "rollback"); - error_reporting(0); - print "
  • Cleaning up the mess.
  • "; + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); unlink($image_repository_path ."/" .$hires_name); unlink($image_repository_path ."/" .$image_name); unlink($image_repository_path ."/" .$thumb_name); - error_reporting(1); + error_reporting($err); + print ""; + return FALSE; + } + + /* Thumbnail */ + $image_dimension = po_get_image_size($image_repository_path."/".$thumb_name); + $size = filesize($image_repository_path."/".$thumb_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 1, + $image_dimension[0], $image_dimension[1], '$thumb_name', + $size, '', '', null)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + + /* preview image */ + if ($po_options['watermark_location'] && + $po_options['watermark_brightness'] && + $po_options['watermark_photo']) { + $watermark = $po_options['watermark_photo']; + } else { + $watermark = "null"; + } + + $image_dimension = po_get_image_size($image_repository_path."/".$image_name); + $size = filesize($image_repository_path."/".$image_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 2, + $image_dimension[0], $image_dimension[1], '$image_name', + $size, '', '', $watermark)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); + print ""; + return FALSE; + } + + /* original image */ + $image_dimension = po_get_image_size($image_repository_path."/".$hires_name); + $size = filesize($image_repository_path."/".$hires_name); + $query = "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $next_version[0], 3, + $image_dimension[0], $image_dimension[1], '$hires_name', + $size, '', '', null)"; + $result = pg_query($database, $query); + + if (!$result) { + pg_query($database, "rollback"); + print "
  • " . err_str($strings['errors']['db_insert_failed']) ."
  • "; + print "
  • $query
  • \n"; + print "
  • ".$strings['import']['cleaning_up']."
  • "; + $err = error_reporting(0); + unlink($image_repository_path."/".$hires_name); + unlink($image_repository_path."/".$image_name); + unlink($image_repository_path."/".$thumb_name); + error_reporting($err); print ""; return FALSE; } @@ -550,44 +868,11 @@ function photo_version_import($database, $index, $im_options, $my_im_composite_o return TRUE; } -function import_raw_decode_exiftool($input_file_name, $ufraw_options, $camera_input_profile, $verbose, $image_data) { - global $sys_exiftool; - global $tmp_volume_path; - - if (!is_executable($sys_exiftool)) - return FALSE; - - $temporary_file_name = tempnam($tmp_volume_path, "po"); - unlink($temporary_file_name); - $temporary_file_name = $temporary_file_name . ".jpg"; - - $options = " -b -JpgFromRaw > " . escapeshellarg($temporary_file_name); - - if ($verbose) { - print "
  • Decoding raw image using ExifTool..."; - } - - system("$sys_exiftool " . escapeshellarg($input_file_name) . " $options " , $retval_decoding); - - if ($retval_decoding) { - if ($verbose) { - print " failed. -- $sys_exiftool $options
  • "; - } - return FALSE; - } - - if ($verbose) { - print " done."; - } - - flush(); - - return $temporary_file_name; -} - -function import_raw_decode_dcraw($input_file_name, $dcraw_options, $camera_input_profile, $verbose, &$image_data) { +function import_raw_decode_dcraw($input_file_name, $camera_input_profile, $verbose, &$image_data) { global $sys_dcraw; global $tmp_volume_path; + global $strings; + global $po_options; $temporary_file_name = tempnam($tmp_volume_path, "po"); unlink($temporary_file_name); @@ -597,23 +882,22 @@ function import_raw_decode_dcraw($input_file_name, $dcraw_options, $camera_input return FALSE; if ($verbose) { - print "
  • Decoding raw image using dcraw..."; + print "
  • ".sprintf($strings['import']['decoding_raw_using'], 'dcraw')." ... "; } - // $options = " -q 3 -b $dcraw_options[1]"; - $options = " -q 3"; + $options = " -q 3 -b $po_options[dcraw_brightness]"; + // $options = " $options -B 2 4" - switch ($dcraw_options[2]) { + + switch ($po_options['raw_white_balance']) { case "automatic": $options = $options . " -a"; break; case "camera": $options = $options . " -w"; } - switch ($dcraw_options[3]) { + switch ($po_options['raw_bitdepth']) { case 24: - // dcraw 8.28 defaults to "-2" of old. -// $options = $options . " -2"; break; case 48: $options = $options . " -4"; @@ -626,48 +910,268 @@ function import_raw_decode_dcraw($input_file_name, $dcraw_options, $camera_input $options = $options . " -p $camera_input_profile"; } - system("$sys_dcraw $options -c " . escapeshellarg($input_file_name) . " > $temporary_file_name ", $retval_decoding); + $cmdline = "$sys_dcraw $options -c " . escapeshellarg($input_file_name) . " > $temporary_file_name "; + + /* + if ($verbose) { + print "$cmdline "; + } + */ + + system($cmdline, $retval_decoding); if ($retval_decoding) { if ($verbose) { - print " failed. -- $sys_dcraw $options
  • "; + print "".$strings['generic']['failed']."."; + print "
  • $cmdline
  • "; } return FALSE; } /* dcraw automatically rotates images */ - if ($image_data != NULL) - $image_data["orientation"] = "Normal (O deg)"; + $image_data["orientation"] = "Normal (O deg)"; if ($verbose) { - print " done."; + print $strings['generic']['done']."."; } - flush(); - /* the decoder generates ppm files so transform the file name */ return $temporary_file_name; } -function import_raw_decode($input_file_name, $dcraw_options, $decoder, $verbose, $camera_input_profile, &$image_data) { +function import_raw_decode_exiftool($input_file_name, $camera_input_profile, $verbose, &$image_data) { + global $sys_exiftool; + global $tmp_volume_path; + global $strings; + + if (!is_executable($sys_exiftool)) + return FALSE; + + /* If we don't have a RAW preview image, we're SOL here */ + if (!$image_data['jpgfromraw']) + return FALSE; + + /* If we're already extracted the image, just use that one. */ + if (file_exists($image_data['jpgfromraw'])) + return $image_data['jpgfromraw']; + + /* Clear the jpegfromraw data so we don't think we have a secondary + image to import. If we actually do, the caller has to fix it up. */ + $image_data['jpgfromraw'] = FALSE; + + $temporary_file_name = tempnam($tmp_volume_path, "po"); + unlink($temporary_file_name); + $temporary_file_name = $temporary_file_name . ".jpg"; + + $options = " -b -JpgFromRaw > " . escapeshellarg($temporary_file_name); + + if ($verbose) { + print "
  • ".sprintf($strings['import']['decoding_raw_using'], 'ExifTool')." ... "; + } + + $cmdline = "$sys_exiftool " . escapeshellarg($input_file_name) . " $options "; + + /* + if ($verbose) { + print "$cmdline "; + } + */ + + system($cmdline , $retval_decoding); + + if ($retval_decoding) { + if ($verbose) { + print "".$strings['generic']['failed'].".
  • "; + print "
  • $cmdline
  • "; + } + return FALSE; + } + + if ($verbose) { + print $strings['generic']['done']."."; + flush(); + } + + return $temporary_file_name; +} + +function import_raw_decode_ufraw($input_file_name, $camera_input_profile, $verbose, &$image_data) { + // global $icc_profiles; + global $sys_ufraw; + global $po_options; + global $tmp_volume_path; + global $strings; + + if (!is_executable($sys_ufraw)) + return FALSE; + + $options = ""; + + if ($camera_input_profile != FALSE && $camera_input_profile != "") { + $temporary_config_file = tempnam($tmp_volume_path, "po"); + $output_file=fopen($temporary_config_file,"w"); + fwrite($output_file,"\n"); + fwrite($output_file,"\n"); + fwrite($output_file,"Profile\n"); + fwrite($output_file," ".$camera_input_profile."\n"); + fwrite($output_file,"\n"); + fwrite($output_file,"\n"); + fwrite($output_file,"\n"); + fwrite($output_file,"\n"); + fclose($output_file); + $options = $options . " --conf=$temporary_config_file"; + } + + $curve = "camera"; // curve == linear/camera/filename + $exposure = "auto"; // exposure compensation + + $linearity = $po_options['ufraw_gamma_linearity']; + $gamma = $po_options['ufraw_gamma']; + + if (($curve == "camera") || ($curve == "linear") || ($curve=="custom")) { + $curve = "--base-curve=$curve"; + } else { + $curve = "--base-curve-file=$curve"; + } + + $temporary_file_name = tempnam($tmp_volume_path, "po"); + unlink($temporary_file_name); + $temporary_file_name = $temporary_file_name . ".ppm"; + + if ($verbose) { + print "
  • ".sprintf($strings['import']['decoding_raw_using'], 'ufraw')." ... "; + } + + $options = $options . " --exposure=$exposure --gamma=$gamma --linearity=$linearity --interpolation=ahd $curve"; + switch ($po_options['raw_white_balance']) { + case "automatic": + $options = $options . " --wb=auto"; + break; + case "camera": + $options = $options . " --wb=camera"; + } + switch ($po_options['raw_bitdepth']) { + case 24: + $options = $options . " --out-type=ppm8"; + break; + case 48: + $options = $options . " --out-type=ppm16"; + } + + $cmdline = "$sys_ufraw $options --silent --output=$temporary_file_name " . escapeshellarg($input_file_name); + + system($cmdline, $retval_decoding); + + /* + if ($verbose) { + print "$cmdline "; + } + */ + + if ($retval_decoding) { + if ($verbose) { + print "".$strings['generic']['failed'].".
  • "; + print "
  • $cmdline
  • "; + } + unlink($temporary_config_file); + + return FALSE; + } + + /* ufraw automatically rotates images */ + $image_data["orientation"] = "Normal (O deg)"; + + if ($verbose) { + print $strings['generic']['done']."."; + flush(); + } + + unlink($temporary_config_file); + + return $temporary_file_name; +} + +function import_raw_decode_dcm2pnm($input_file_name, $camera_input_profile, $verbose, &$image_data) { + global $sys_dcm2pnm; + global $tmp_volume_path; + global $strings; + + if (!is_executable($sys_dcm2pnm)) + return FALSE; + + $temporary_file_name = tempnam($tmp_volume_path, "po"); + unlink($temporary_file_name); + $temporary_file_name = $temporary_file_name . ".pnm"; + + if ($verbose) { + print "
  • ".sprintf($strings['import']['decoding_raw_using'], 'dcm2pnm')." ... "; + } + + $options = ""; + + switch ($po_options['raw_bitdepth']) { + case 24: + $options = $options . " --write-8-bit-pnm"; + break; + case 48: + $options = $options . " --write-16-bit-pnm"; + } + + $cmdline = "$sys_dcm2pnm $options " . escapeshellarg($input_file_name) ." $temporary_file_name "; + + system($cmdline, $retval_decoding); + + /* + if ($verbose) { + print "$cmdline "; + } + */ + + if ($retval_decoding) { + if ($verbose) { + print "".$strings['generic']['failed'].".
  • "; + print "
  • $cmdline
  • "; + } + return FALSE; + } + + if ($verbose) { + print $strings['generic']['done']."."; + flush(); + } + + return $temporary_file_name; +} + +function import_raw_decode($input_file_name, $decoder, $camera_input_profile, $verbose, &$image_data) { + global $icc_profiles; if (($camera_input_profile == FALSE) || ($camera_input_profile == null) || - ($camera_input_profile == "") || ($camera_input_profile == "None")) { $camera_input_profile = FALSE; } else { $camera_input_profile = $icc_profiles[$camera_input_profile]['file']; } + + /* Figure out if we have an embedded preview image to extract */ + if ($image_data['jpgfromraw']) { + /* This extracts the embedded image to a temporary file */ + $image_data['jpgfromraw'] = import_raw_decode_exiftool($input_file_name, $camera_input_profile, $verbose, $image_data); + } $res = FALSE; $decoders = split(",", $decoder); foreach ($decoders as $decoder) { $decoder = trim($decoder); if ($decoder == "dcraw") { - $res = import_raw_decode_dcraw($input_file_name, $raw_options, $camera_input_profile, $verbose, $image_data); + $res = import_raw_decode_dcraw($input_file_name, $camera_input_profile, $verbose, $image_data); } else if ($decoder == "exiftool") { - $res = import_raw_decode_exiftool($input_file_name, $raw_options, $camera_input_profile, $verbose, $image_data); + $res = import_raw_decode_exiftool($input_file_name, $camera_input_profile, $verbose, $image_data); + } else if ($decoder == "ufraw") { + $res = import_raw_decode_ufraw($input_file_name, $camera_input_profile, $verbose, $image_data); + } else if ($decoder == "dcm2pnm") { + $res = import_raw_decode_dcm2pnm($input_file_name, $camera_input_profile, $verbose, $image_data); } else { $res = FALSE; } @@ -676,15 +1180,17 @@ function import_raw_decode($input_file_name, $dcraw_options, $decoder, $verbose, return $res; } -function import_generate_thumbnail($input_file_name, $thumb_name, $verbose, $im_options, $multi_page_parameter, $orientation, $colorspace) +function import_generate_thumbnail($input_file_name, $thumb_name, $verbose, $multi_page_parameter, $orientation, $colorspace) { global $image_repository_path; global $sys_convert; global $thumb_max_size; global $icc_profiles; + global $strings; + global $po_options; - if (($im_options[13] != 0) && ($im_options[14] != 0)) - $im_framing_option = " -frame " . escapeshellarg($im_options[13] ."x". $im_options[14]); + if (($po_options['thumb_border_width'] != 0) && ($po_options['thumb_border_height'] != 0)) + $im_framing_option = " -frame " . escapeshellarg($po_options['thumb_border_width'] ."x". $po_options['thumb_border_height']) . " -mattecolor " . escapeshellarg("#".$po_options['thumb_border_color']); else $im_framing_option = ""; @@ -698,49 +1204,62 @@ function import_generate_thumbnail($input_file_name, $thumb_name, $verbose, $im_ } } - /* generate thumbnail */ - $cmdline = "$sys_convert". - $im_profile_a . - " -geometry " . escapeshellarg($thumb_max_size ."x". $thumb_max_size) ."\> ". - " -unsharp ". escapeshellarg($im_options[11] ."x". $im_options[12] ."+". $im_options[18] ."+". $im_options[19]) ." ". - " -mattecolor " . escapeshellarg("#".$im_options[15]) ." ". - $im_framing_option ." ". - $orientation ." ". - $im_profile_b . - " -colorspace " . escapeshellarg($im_options[9]) ." ". - " -gamma " . escapeshellarg($im_options[10]) ." ". - " -quality " . escapeshellarg($im_options[8]) ." ". - escapeshellarg($input_file_name).escapeshellarg($multi_page_parameter)." ". - escapeshellarg($thumb_name); + if ($verbose) { + print "
  • ".$strings['import']['generating_thumb'] ." ... "; + } - system($cmdline, $retval_thumb_scaling); + /* generate thumbnail */ + $cmdline = "$sys_convert ". + $im_profile_a . + " -thumbnail " . escapeshellarg($thumb_max_size ."x". $thumb_max_size) ."\> ". + " -unsharp ". escapeshellarg($po_options['thumb_sharpen_radius'] ."x". $po_options['thumb_sharpen_sigma'] ."+". $po_options['thumb_sharpen_amount'] ."+". $po_options['thumb_sharpen_threshold']) ." ". + $im_framing_option ." " . + $orientation ." ". + $im_profile_b ." ". + (($po_options['thumb_color_space'] == "RGB") ? "" : " -colorspace " . escapeshellarg($po_options['thumb_color_space'])) ." ". + (($po_options['thumb_gamma'] == 1) ? "" : " -gamma " . escapeshellarg($po_options['thumb_gamma'])) ." ". + " -quality " . escapeshellarg($po_options['thumb_quality']) ." ". + escapeshellarg($input_file_name).escapeshellarg($multi_page_parameter). + " -strip ". + escapeshellarg($thumb_name); + + /* + if ($verbose) { + print "$cmdline"; + } + */ + + system($cmdline, $retval_thumb_scaling); if ($retval_thumb_scaling) { if ($verbose) { - print "
  • Thumbnail generation failed.
  • "; - print "
  • $cmdline
  • "; + print "".$strings['generic']['failed']."."; + print "
  • $cmdline
  • "; } return FALSE; } if ($verbose) { - print "
  • Thumbnail $thumb_name of $thumb_max_size pixels generated.
  • "; + print $strings['generic']['done'].". ($thumb_max_size ".$strings['generic']['pixels'] .")"; flush(); } return TRUE; } -function import_generate_preview($input_file_name, $image_name, $verbose, $im_options, $my_im_composite_options, $multi_page_parameter, $orientation, $colorspace) { +function import_generate_preview($input_file_name, $image_name, $verbose, $multi_page_parameter, $orientation, $colorspace) { global $image_repository_path; global $sys_convert; global $sys_composite; global $image_max_size; global $icc_profiles; + global $strings; + global $po_options; /* matting options */ - if (($im_options[5] != 0) && ($im_options[6] != 0)) - $im_framing_option = " -frame " . escapeshellarg($im_options[5] ."x". $im_options[6]); + if (($po_options['preview_border_width'] != 0) && ($po_options['preview_border_height'] != 0)) + $im_framing_option = " -frame " . escapeshellarg($po_options['preview_border_width'] ."x". $po_options['preview_border_height']) . " -mattecolor " . escapeshellarg("#".$po_options['preview_border_color']); + else $im_framing_option = ""; @@ -753,75 +1272,102 @@ function import_generate_preview($input_file_name, $image_name, $verbose, $im_op $im_profile_a = " +profile icm -profile " . $icc_profiles[$colorspace]['file']; } } + + if ($verbose) { + print "
  • ".$strings['import']['generating_preview'] ." ... "; + } /* generate preview */ - $cmdline = "$sys_convert". - $im_profile_a . - " -geometry " . escapeshellarg($image_max_size ."x". $image_max_size) ."\> ". - " -unsharp " . escapeshellarg($im_options[3] ."x". $im_options[4] ."+". $im_options[16] ."+". $im_options[17] ) ." ". - " -mattecolor " . escapeshellarg("#".$im_options[7]) ." ". - $im_framing_option ." ". - $orientation ." ". - $im_profile_b . - " -colorspace " . escapeshellarg($im_options[1]) ." ". - " -gamma " . escapeshellarg($im_options[2]) ." ". - " -quality " . escapeshellarg($im_options[0]) ." ". - escapeshellarg($input_file_name).escapeshellarg($multi_page_parameter)." ". - escapeshellarg($image_name); - + $cmdline = "$sys_convert ". + $im_profile_a . + " -resize " . escapeshellarg($image_max_size ."x". $image_max_size) ."\> ". + " -unsharp ". escapeshellarg($po_options['preview_sharpen_radius'] ."x". $po_options['preview_sharpen_sigma'] ."+". $po_options['preview_sharpen_amount'] ."+". $po_options['preview_sharpen_threshold']) ." ". + $im_framing_option ." ". + $orientation ." ". + $im_profile_b ." ". + (($po_options['preview_color_space'] == "RGB") ? "" : " -colorspace " . escapeshellarg($po_options['preview_color_space'])) ." ". + (($po_options['preview_gamma'] == 1) ? "" : " -gamma " . escapeshellarg($po_options['preview_gamma'])) . + " -quality " . + escapeshellarg($po_options['preview_quality']) ." ". + escapeshellarg($input_file_name).escapeshellarg($multi_page_parameter). + " -strip ". + escapeshellarg($image_name); + + /* + if ($verbose) { + print "$cmdline"; + } + */ system($cmdline, $retval_image_scaling); - if ($retval_image_scaling) { - if ($verbose) { - print "
  • Preview generation failed.
  • "; - print "
  • $cmdline
  • "; - } - return FALSE; - } - if ($verbose) { - print "
  • Preview $image_name of $image_max_size pixels created.
  • "; - flush(); + print $strings['generic']['done'].". ($image_max_size ".$strings['generic']['pixels'] .")"; } - + /* watermark preview */ - if ($my_im_composite_options[0] && $my_im_composite_options[1] && $my_im_composite_options[2]) { - system("$sys_composite". - " -gravity " . escapeshellarg($my_im_composite_options[0]) . - " -watermark " . escapeshellarg($my_im_composite_options[1]) ." ". - escapeshellarg($image_repository_path."/".$my_im_composite_options[3]) ." ". - escapeshellarg($image_name)." ". - escapeshellarg($image_name), $retval_watermarking); + if ($po_options['watermark_location'] && + $po_options['watermark_brightness'] && + $po_options['watermark_photo']) { + + if ($verbose) { + print "
  • ".$strings['import']['watermarking'] ." ... "; + } + + $cmdline = "$sys_composite". + " -gravity " . escapeshellarg($po_options['watermark_location']) . + " -watermark " . escapeshellarg($po_options['watermark_brightness']) ." ". + escapeshellarg($image_repository_path."/".$po_options['watermark_path']) ." ". + escapeshellarg($image_name)." ". + escapeshellarg($image_name); + + /* + if ($verbose) { + print "$cmdline"; + } + */ + + system($cmdline, $retval_watermarking); + if ($retval_watermarking) { - if ($verbose) { - print "
  • Watermarking failed.
  • "; - } + if ($verbose) { + print "".$strings['generic']['failed']."."; + print "
  • $cmdline
  • "; + } return FALSE; } if ($verbose) { - print "
  • Watermarking preview $image_name.
  • "; + print $strings['generic']['done']."."; flush(); } } + return TRUE; } -function file_upload(&$image_data, $index, $im_options, $my_im_composite_options, $dcraw_options, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database) { +function file_upload(&$image_data, $index, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database) { global $image_repository_path; - $success = TRUE; + global $strings; + global $po_options; + + $success=TRUE; if ($image_data['file'][$index]['name_tmp']) { + + $original_name = $image_data['file'][$index]['original_name']; + + print "
  • " . sprintf($strings['import']['copying_into_repo'], $original_name) . " ... "; /* copy the original to the repository */ if (!copy($image_data['file'][$index]['name_tmp'], $image_repository_path."/".$hires_name)) { - print "
  • Copying ".$image_data['file'][$index]['name']." failed [cp ".$image_data['file'][$index]['name_tmp']." $image_repository_path/$hires_name]
  • "; + print "".$strings['generic']['failed']."."; + print "
  • cp ".$image_data['file'][$index]['name_tmp']." $image_repository_path/$hires_name
  • "; return FALSE; - } else { - print "
  • Copying ".$image_data['file'][$index]['name']." into $image_repository_path/$hires_name
  • "; } + print $strings['generic']['done'].""; flush(); - $temporary_ppm_file = import_raw_decode($image_data['file'][$index]['name_tmp'], $dcraw_options, $decoder, TRUE, $image_data['camera_input_profile'], $image_data); + /* Raw Decode */ + $temporary_ppm_file = import_raw_decode($image_data['file'][$index]['name_tmp'], $decoder, $image_data['camera_input_profile'], TRUE, $image_data); if ($temporary_ppm_file) { unlink($image_data['file'][$index]['name_tmp']); $image_data['file'][$index]['name_tmp'] = $temporary_ppm_file; @@ -831,18 +1377,30 @@ function file_upload(&$image_data, $index, $im_options, $my_im_composite_options $orientation = orientation_id_from_string($database, $image_data["orientation"]); $image_data["orientation_xform"] = orientation_to_xform($database, $orientation); - $return_value = import_generate_preview($image_data['file'][$index]['name_tmp'], $image_repository_path ."/". $image_name, TRUE, $im_options, $my_im_composite_options, $multi_page_parameter, $image_data["orientation_xform"], $image_data['colorspace']); - if (!$return_value) { - $success = false; - unlink($input_file_name); - } + // print "
  • $image_data[orientation] => $orientation => $image_data[orientation_xform]
  • "; - $return_value = import_generate_thumbnail($image_data['file'][$index]['name_tmp'], $image_repository_path ."/". $thumb_name, TRUE, $im_options, $multi_page_parameter, $image_data["orientation_xform"], $image_data['colorspace']); + /* Preview */ + $input_file_name = $image_repository_path ."/". $image_name; + $return_value = import_generate_preview($image_data['file'][$index]['name_tmp'], $input_file_name, TRUE, $multi_page_parameter, $image_data["orientation_xform"], $image_data['colorspace']); if (!$return_value) { unlink($input_file_name); $success=false; } + if ($success && ($po_options['preview_copy_metadata'] == 't')) { + $success = transfer_metadata($image_data, $hires_name, $image_name, TRUE, TRUE); + } + + /* Thumbnails */ + if ($success) { + $input_file_name = $image_repository_path ."/". $thumb_name; + $return_value = import_generate_thumbnail($image_data['file'][$index]['name_tmp'], $input_file_name, TRUE, $multi_page_parameter, $image_data["orientation_xform"], $image_data['colorspace']); + if (!$return_value) { + unlink($input_file_name); + $success=false; + } + } + /* remove temporary file */ unlink($image_data['file'][$index]['name_tmp']); } diff --git a/src/include/iptc.php b/src/include/iptc.php index 034c745..fa47160 100644 --- a/src/include/iptc.php +++ b/src/include/iptc.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,66 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -$iptc_field_names = array (5 => "Object Name", - 7 => "Edit Status", - 10 => "Priority", - 15 => "Category", - 20 => "Supplemental Category", - 22 => "Job Identifier", - 25 => "Keywords", - 30 => "Release Date", - 35 => "Release Time", - 40 => "Special Instructions", - 55 => "Created Date", - 60 => "Created Time", - 65 => "Originating Program", - 70 => "Program Version", - 80 => "Byline", - 85 => "Byline Title", - 90 => "City", - 95 => "Province, State", - 100 => "Country Code", - 101 => "Country", - 103 => "Org. Transmission Reference", - 105 => "Headline", - 110 => "Credit", - 120 => "Caption", - 121 => "Local Caption", - 122 => "Caption Writer"); - -function human_readable_iptc($iptc_string) { - global $iptc_field_names; - - /* this parser replaces unhandled iptc fields */ - /* we leave the iptc numbers in the database so that */ - /* we have a chance to add them in the future */ - - $iptc_string = ereg_replace("IPTC ", "", $iptc_string); - - $key_start_position = 0; - $new_iptc_string = ""; - - do { - $key_start_position = strpos($iptc_string, "", $key_start_position) + 8; - $key_end_position = strpos($iptc_string, "", $key_start_position); - - $value_start_position = $key_end_position + 9; - $value_end_position = strpos($iptc_string, "", $value_start_position); - - $key = substr($iptc_string, $key_start_position, $key_end_position - $key_start_position); - $key = trim(substr($key, 0, strpos($key, "."))); - $key += 0.0; - $value = substr($iptc_string, $value_start_position, $value_end_position - $value_start_position); - - $tail = substr($iptc_string, $value_end_position + 10); - - if ($iptc_field_names[$key]) - $new_iptc_string .= "". $iptc_field_names[$key] ."".$value .""; - } while ($tail != ""); - - return $new_iptc_string; -} - function convert_iptc2sql_timestamp($date, $time) { $year = substr($date, 0, 4); $month = substr($date, 4, 2); @@ -146,7 +86,7 @@ function convert_iptc_location($database, $user_id, $city, $state, $country) { return "0"; } pg_query($database, "insert into country (identifier, value) values ($country_id[0], '$country')"); - // print "insert into country (identifier, value) values ($country_id[0], '$country')"; + // print "insert into country (identifier, value) values ($country_id[0], '$country'"; } } @@ -288,141 +228,105 @@ function validate_iptc_string($iptc_string) { } function photo_parse_iptc($database, $index, $user_id, $image_data) { - error_reporting(0); - $size = getimagesize($image_data['file'][$index]['name_tmp'], $info); - error_reporting(1); + global $strings; + $loc = ""; $city = ""; $state = ""; $country = ""; - $creation_date = ""; $creation_time = ""; + $keywords = ""; - if (!isset($info["APP13"])) - return $image_data; - - $iptc = iptcparse ($info["APP13"]); - if ($iptc === FALSE) - return $image_data; - - print "
  • Extracting IPTC data ... "; - - $image_data['title'] = ""; - $image_data['author'] = ""; - $image_data['caption'] = ""; - $image_data['copyright'] = ""; - $image_data['iptc'] = ""; - - foreach ($iptc as $key=>$section) { - $key = substr($key, strrpos($key, "#") + 1); - foreach ($section as $name=>$val) { - $val = validate_iptc_string($val); - if ($val != "") { - $image_data['iptc'] .= "$key.$name$val"; - - switch ($key) { - case 5: - if ($image_data['title'] == "") - $image_data['title'] = $val; - else - $image_data['title'] .= ", $val"; - break; - case 15: - $image_data['category'] = substr($val, 0, 3); - break; - case 20: - if ($image_data['supplemental_category'] == "") - $image_data['supplemental_category'] = $val; - else - $image_data['supplemental_category'] .= ", $val"; - break; - case 25: - $image_data['keywords'][] = $val; - break; - case 40: - if ($image_data['instructions'] == "") - $image_data['instructions'] = $val; - else - $image_data['instructions'] .= ", $val"; - break; - case 80: - if ($image_data['author'] == "") - $image_data['author'] = $val; - else - $image_data['author'] .= ", $val"; - break; - case 55: - $creation_date = $val; - break; - case 60: - $creation_time = $val; - break; - case 90: - $city = $val; - break; - case 95: - $state = $val; - break; - case 101: - $country = $val; - break; - case 105: - if ($image_data['headline'] == "") - $image_data['headline'] = $val; - else - $image_data['headline'] .= ", $val"; - break; - case 103: - if ($image_data['transmission_reference'] == "") - $image_data['transmission_reference'] = $val; - else - $image_data['transmission_reference'] .= ", $val"; - break; - case 110: - if ($image_data['credit'] == "") - $image_data['credit'] = $val; - else - $image_data['credit'] .= ", $val"; - break; - case 115: - if ($image_data['source'] == "") - $image_data['source'] = $val; - else - $image_data['source'] .= ", $val"; - break; - case 116: - if ($image_data['copyright'] == "") - $image_data['copyright'] = $val; - else - $image_data['copyright'] .= ", $val"; - break; - case 120: - if ($image_data['caption'] == "") - $image_data['caption'] = $val; - else - $image_data['caption'] .= ", $val"; - break; - case 122: - if ($image_data['caption_writer'] == "") - $image_data['caption_writer'] = $val; - else - $image_data['caption_writer'] .= ", $val"; - break; - default: - break; - } - } + $image_data = extract_exiftool_metadata($image_data, $index, "IPTC"); + /* Populate IPTC data */ + $iptc_data = $image_data['exiftool_data_IPTC']; + foreach ($iptc_data as $key => $value) { + $image_data["iptc"] .= "$key$value"; + switch ($key) { + case "Caption-Abstract": + $image_data["caption"] = $value; + break; + case "Writer-Editor": + $image_data["caption_writer"] = $value; + break; + case "By-line": + $image_data["author"] = $value; + break; + case "Copyright Notice": + $image_data["copyright"] = $value; + break; + case "Object Name": + $image_data["title"] = $value; + break; + case "Category": + $image_data["category"] = $value; + break; + case "Supplemental Categories": + $image_data["supplemental_category"] = $value; // add to keywords? + break; + case "Special Instructions": + $image_data["instructions"] = $value; + break; + case "Headline": + $image_data["headline"] = $value; + break; + case "Credit": + $image_data["credit"] = $value; + break; + case "Source": + $image_data["source"] = $value; + break; + case "Original Transmission Reference": + $image_data["transmission_reference"] = $value; + break; + case "City": + $city = $value; + break; + case "Province-State": + $state = $value; + break; + case "Country-Primary Location Name": + $country = $value; + break; + case "Sub-location": + $loc = $value; + break; + case "Creation Date": + $creation_date = $value; + break; + case "Creation Time": + $creation_time = $value; + break; + case "Keywords": + $keywords = $value; + break; + case "Application Record Version": + // Ignore + break; + default: + // print "
  • UNHANDLED: $key = $value
  • "; + break; } } - if (($city != "") || ($state != "") || ($country != "")) + if (($loc != "") || ($city != "") || ($state != "") || ($country != "")) { $image_data['location'] = convert_iptc_location($database, $user_id, $city, $state, $country); + } - if (($creation_date != "") || ($creation_time != "")) + if (($creation_date != "") || ($creation_time != "")) { $image_data['date_of_exposure'] = convert_iptc2sql_timestamp($creation_date, $creation_time); + } - print "done"; + if ($keywords != "") { + $keys = explode(", ", $keywords); + foreach ($keys as $key) { + $image_data['keywords'][] = $key; + } + } + + /* Escape it for database sanity */ + $image_data["iptc"] = pg_escape_string($image_data["iptc"]); return $image_data; } diff --git a/src/include/mail.php b/src/include/mail.php index 6fb8a01..41c434c 100644 --- a/src/include/mail.php +++ b/src/include/mail.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -18,11 +18,11 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA include_once "config.php"; -include_once "vars.php"; function send_login_information($database, $email) { - global $user_type; + global $strings; global $site_url; + global $site_title; $failures = 0; @@ -40,32 +40,18 @@ function send_login_information($database, $email) { select users.first_name, users.last_name, email from users, contact_info where users.contact = contact_info.identifier - and users.type = $user_type[administrator]")); + and users.type = ".PO_USER_TYPE_ADMIN)); for ($i = 0; $i < $num_of_valid_emails; $i++) { $user_data = pg_fetch_row($valid_emails, $i); - $subject = "Login information request."; - $message = " - - - Photo Organizer login information - - - Dear $user_data[0], -

    - Find below your $site_url access codes: -

    - Username: $user_data[3]
    - Password: $user_data[4] -

    - This e-mail has been automatically generated by PO. Please do not reply. -

    - $admin_data[0] $admin_data[1], your PO administrator. - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $admin_data[2]\r\n"; + eval('$subject = "'. $strings['mail']['login_info_subject']. '";'); + + $message = $strings['mail']['login_info']; + $message .= $strings['mail']['mail_bottom']; + + eval('$message = "'. $message. '";') ; + + $headers = "From: $admin_data[0] $admin_data[1] <$admin_data[2]>\r\n"; if (!mail($user_data[2], $subject, $message, $headers)) $failures++; @@ -76,10 +62,11 @@ function send_login_information($database, $email) { return FALSE; } -function send_new_client_notification($database, $user_id, $client_id) { - global $user_type; - global $client_status; +function send_new_client_notification($database, $user_id, $client_id) +{ global $site_url; + global $site_title; + global $strings; $user_data = pg_query($database, " select users.first_name, users.last_name, email @@ -112,75 +99,46 @@ function send_new_client_notification($database, $user_id, $client_id) { select users.first_name, users.last_name, email from users, contact_info where users.contact = contact_info.identifier - and users.type = $user_type[administrator]")); + and users.type = ".PO_USER_TYPE_ADMIN)); /* SEND MAIL TO THE USER */ + $client_data[3] = $strings['generic'][$client_status[$client_data[3]]]; $client_data[5] = substr($client_data[5], 0, 10); - $subject = "Photo Organizer Client Subscription Notificaiton"; - $message = " - - - Photo Organizer Client Subscription Notificaiton - - - Dear $user_data[0], -

    - On $client_data[5], $client_data[0] $client_data[1] subscribed to - be one of your clients. His status is: \"$client_data[3]\" which means that $client_data[0] $client_data[1] "; - if ($client_data[4] == $client_status[pending]) - $message = $message . "cannot access your protected photos.

    To enable your new client to access - protected areas of your PO account, please visit your PO workspace and change - the client status to \"Accepted\""; - if ($client_data[4] == $client_status[accepted]) - $message = $message . "can access your protected photos.

    To disable your new client accessing - protected areas of your PO account, please visit your PO workspace and change - your new client status' to \"Pending\" or \"Disabled\""; - $message = $message . "

    - This e-mail has been automatically generated by PO. Please do not reply. -

    - $admin_data[0] $admin_data[1], your PO administrator. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $client_data[2]\r\n"; + eval('$subject = "'. $strings['mail']['new_client_subject']. '";'); + + $message = $strings['mail']['new_sub_top']; + + if ($client_data[4] == PO_CLIENT_PENDING) + $message .= $strings['mail']['new_sub_pending']; + else if ($client_data[4] == PO_CLIENT_ACCEPTED) + $message .= $strings['mail']['new_sub_accepted']; + + $message .= $strings['mail']['mail_bottom']; + + eval('$message = "'.$message . '";'); + + $headers = "From: $admin_data[0] $admin_data[1] <$admin_data[2]>\r\n"; if (!mail($user_data[2], $subject, $message, $headers)) return FALSE; /* SEND MAIL TO THE CLIENT */ - $subject = "Photo Organizer Client Subscription Notificaiton"; - $message = " - - - Photo Organizer Client Subscription Notificaiton - - - Dear $client_data[0], -

    - On $client_data[5], you subscribed to - be one of $user_data[0] $user_data[1] clients. Your status is: \"$client_data[3]\" which means that you "; - if ($client_data[4] == $client_status[pending]) - $message = $message . "cannot access yet the protected photos of $user_data[0] $user_data[1].

    - Short time ago $user_data[0] $user_data[1] also received a notification and he/she will - evaluate and possibly accept your subscription."; - if ($client_data[4] == $client_status[accepted]) - $message = $message . "can access the protected photos of $user_data[0] $user_data[1]."; - $message = $message . " Should this happen, you will be notified about the new status of your subscription. -

    $user_data[0] $user_data[1] has the rights to change your client - subscription status at any time, to restrict or grant access to his/her protected - data.

    - This e-mail has been automatically generated by PO. -

    - $admin_data[0] $admin_data[1], your PO administrator. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $user_data[2]\r\n"; + + eval('$subject = "'. $strings['mail']['new_client_subject']. '";'); + $message = $strings['mail']['new_client_top']; + + if ($client_data[4] == PO_CLIENT_PENDING) + $message .= $strings['mail']['new_client_pending']; + else if ($client_data[4] == PO_CLIENT_ACCEPTED) + $message .= $strings['mail']['new_client_accepted']; + + $message .= $strings['mail']['client_footer']; + $message .= $strings['mail']['mail_bottom']; + + eval('$message = "'.$message . '";'); + + $headers = "From: $admin_data[0] $admin_data[1] <$admin_data[2]>\r\n"; if (!mail($client_data[2], $subject, $message, $headers)) return FALSE; @@ -188,11 +146,10 @@ function send_new_client_notification($database, $user_id, $client_id) { return TRUE; } - - function send_client_account_change_notification($database, $user_id, $client_id) { - global $user_type; - global $client_status; + global $site_title; + global $site_url; + global $strings; $user_data = pg_query($database, " select users.first_name, users.last_name, email @@ -225,38 +182,25 @@ function send_client_account_change_notification($database, $user_id, $client_id select users.first_name, users.last_name, email from users, contact_info where users.contact = contact_info.identifier - and users.type = $user_type[administrator]")); + and users.type = ".PO_USER_TYPE_ADMIN)); /* SEND MAIL TO THE CLIENT */ - $subject = "Photo Organizer Client Account Status Notificaiton"; - $message = " - - - Photo Organizer Client Account Status Notificaiton - - - Dear $client_data[0], -

    - $user_data[0] $user_data[1] changed your client subscription status, which currently is: \"$client_data[3]\". This means that you "; - if ($client_data[4] == $client_status[pending]) - $message = $message . "cannot access the protected photos of $user_data[0] $user_data[1]."; - if ($client_data[4] == $client_status[rejectetd]) - $message = $message . "cannot access the protected photos of $user_data[0] $user_data[1]."; - if ($client_data[4] == $client_status[accepted]) - $message = $message . "can access the protected photos of $user_data[0] $user_data[1]."; - $message = $message . "

    $user_data[0] $user_data[1] has the rights to change your client - subscription status at any time, to restrict or grant access to his/her protected - data. Should this happen, you will be notified about the new status of your - subscription.

    - This e-mail has been automatically generated by PO. -

    - $admin_data[0] $admin_data[1], your PO administrator. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $user_data[2]\r\n"; + eval('$subject = "'. $strings['mail']['client_status_subject']. '";'); + + $message = $strings['mail']['client_status_top']; + + if ($client_data[4] == PO_CLIENT_PENDING) + $message .= $strings['mail']['client_status_pending']; + if ($client_data[4] == PO_CLIENT_REJECTED) + $message .= $strings['mail']['client_status_rejected']; + if ($client_data[4] == PO_CLIENT_ACCEPTED) + $message .= $strings['mail']['client_status_accepted']; + + $message .= $strings['mail']['client_footer']; + $message .= $strings['mail']['mail_bottom']; + eval('$message = "'.$message . '";'); + + $headers = "From: $admin_data[0] $admin_data[1] <$admin_data[2]>\r\n"; if (!mail($client_data[2], $subject, $message, $headers)) return FALSE; @@ -265,15 +209,20 @@ function send_client_account_change_notification($database, $user_id, $client_id } function send_po_account_change_notification($database, $user_id) { - global $user_type; + global $site_title; + global $site_url; + global $strings; + global $po_options_default; $user_data = pg_query($database, " - select users.first_name, users.last_name, email, user_type.identifier, value, bulk_upload_enable, shop_enable, - quota_size, quota_count - from users, contact_info, user_type, preferences + select users.first_name, users.last_name, email, user_type.identifier, value, + get_user_pref(users.identifier, 'bulk_upload_enable'), + 'f' as shop_enable, + get_user_pref(users.identifier, 'quota_size'), + get_user_pref(users.identifier, 'quota_count') + from users, contact_info, user_type where users.contact = contact_info.identifier and users.type = user_type.identifier - and users.preferences = preferences.identifier and users.identifier = '$user_id'"); $num_of_to_users = pg_num_rows($user_data); @@ -285,146 +234,34 @@ function send_po_account_change_notification($database, $user_id) { select users.first_name, users.last_name, email from users, contact_info where users.contact = contact_info.identifier - and users.type = $user_type[administrator]")); + and users.type = ".PO_USER_TYPE_ADMIN)); if ($user_data[5]=='t') $user_data[5] = "Enabled"; else $user_data[5] = "Disabled"; - if ($user_data[6]=='t') - $user_data[6] = "Enabled"; - else - $user_data[6] = "Disabled"; - - /* SEND MAIL TO THE CLIENT */ - $subject = "Photo Organizer Account Status Notificaiton"; - $message = " - - - Photo Organizer Account Status Notificaiton - - - Dear $user_data[0], -

    - Your Photo Organizer account settings were changed to: -

      -
    • Account type: $user_data[4]"; - - if ($user_data[3] == $user_type['user']) { - $message = $message . "
    • Bulk upload: $user_data[5]"; - $message = $message . "
    • Shop: $user_data[6]"; - } - - if ($user_data[7] == 0) { - $message = $message . "
    • Storage space quota: unlimited"; - } - else { - $user_data[7] = round($user_data[7]/1048576, 2); - $message = $message . "
    • Storage space quota: $user_data[7] Mb"; - } - - if ($user_data[8] == 0) { - $message = $message . "
    • Photo count quota: unlimited"; - } - else { - $message = $message . "
    • Photo count quota: $user_data[8] photos, including versions"; - } - - $message = $message . "
    Should you have any questions please contact your PO administrator."; - $message = $message . "

    - This e-mail has been automatically generated by PO. -

    - $admin_data[0] $admin_data[1], your PO administrator. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $admin_data[2]\r\n"; - - if (!mail($user_data[2], $subject, $message, $headers)) - return FALSE; - - return TRUE; -} - - -function send_po_order_notification($database, $user_id, $client_id) { - global $user_type; - global $client_status; - global $site_url; - - $user_data = pg_query($database, " - select users.first_name, users.last_name, email - from users, contact_info - where users.contact = contact_info.identifier - and users.identifier = '$user_id'"); - - $num_of_to_users = pg_num_rows($user_data); - if ($num_of_to_users != 1) - return FALSE; - - $client_data = pg_query($database, " - select users.identifier, users.first_name, users.last_name, email, - from users, contact_info - where users.contact = contact_info.identifier - and users.identifier = '$client_id'"); - - $num_of_to_users = pg_num_rows($client_data); - if ($num_of_to_users != 1) - return FALSE; - - /* SEND MAIL TO THE USER */ - $subject = "Photo Organizer Shop Notificaiton"; - $message = " - - - Photo Organizer Shop Notificaiton - - - Dear $user_data[0], -

    + eval('$subject = "'. $strings['mail']['account_status_subject']. '";'); - $client_data[1] $client_data[2] submitted a new order.
    - Click here to see your pending orders. + if ($user_data[7]) + $user_data[7] = round($user_data[7]/1048576, 2); + else + $user_data[7] = $po_options_default['quota_size']; - This e-mail has been automatically generated by PO. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $client_data[3]\r\n"; + if (!$user_data[8]) + $user_data[8] = $po_options_default['quota_count']; + + $message = $strings['mail']['account_status']; + $message .= $strings['mail']['mail_bottom']; + + eval('$message = "'.$message . '";'); + + $headers = "From: $admin_data[0] $admin_data[1] <$admin_data[2]>\r\n"; if (!mail($user_data[2], $subject, $message, $headers)) return FALSE; - /* SEND MAIL TO THE CLIENT */ - $message = " - - - Photo Organizer Shop Notificaiton - - - Dear $client_data[1], -

    - - This e-mail is to confirm your order that you submitted recently using Photo Organizer.
    - Click here to see your pending orders. - - This e-mail has been automatically generated by PO. -

    - - "; - $headers = "MIME-Version: 1.0\r\n"; - $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $headers .= "From: $user_data[2]\r\n"; - - if (!mail($client_data[3], $subject, $message, $headers)) - return FALSE; - return TRUE; } diff --git a/src/include/mime.php b/src/include/mime.php index f759f24..89c9600 100644 --- a/src/include/mime.php +++ b/src/include/mime.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,149 +17,143 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// Mime Type Conversion - since browsers aren't capable of displaying -// many of the file types that can be processed by the system at upload. -// We generate the thumbnail and the preview in JPEG or at your preference in PNG. -// You can specify for each format apart in which format you prefer -// for the preview or the thumbnail by setting the "out" parameter - include_once "include/config.php"; $mime_type = array ( // FILE MIME IMAGICK MULTI THUMBNAIL AND RAW // EXTENSION TYPE PAGE PARAMETER PREVIEW FORMAT DECODER POSTPROCESSOR DESCRIPTION - "8bim" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Photoshop resource format"), - "8bimtext"=> array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Photoshop resource format"), - "app1" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Raw application information"), - "art" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "PF1: 1st Publisher"), - "avi" => array ("type" => "application", "page" => "[9]", "out" => "jpeg", "decoder" => "", "name" => "Audio/Visual Interleaved"), - "avs" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "AVS X image"), - "bay" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Kodak/Roper Bayer Picture Sequence"), - "bie" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), - "bmp" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Microsoft Windows bitmap image"), - "cmyk" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Raw cyan, magenta, yellow, and black samples"), - "cmyka" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Raw cyan, magenta, yellow, black, and opacity samples"), - "cs1" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sinar CaptureShot-1 Image"), - "crw" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Canon Raw Format"), - "cr2" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Canon Raw Format 2"), - "cut" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "DR Halo"), - "dcm" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Digital Imaging and Communications in Medicine image"), - "dc2" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Kodak Raw Format 2"), - "dcr" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Kodak Raw Format"), - "dng" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Adobe Digital Negative Format"), - "kdc" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Kodak Digital Camera Raw Format"), - "dcx" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "ZSoft IBM PC multi-page Paintbrush"), - "dps" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Display Postscript"), - "dpx" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Digital Moving Picture Exchange"), - "erf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Epson Raw Format"), - "epdf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Encapsulated Portable Document Format"), - "epi" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Adobe Encapsulated PostScript Interchange format"), - "eps" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Adobe Encapsulated PostScript"), - "epsf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Adobe Encapsulated PostScript"), - "epsi" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Adobe Encapsulated PostScript Interchange format"), - "ept" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Adobe Encapsulated PostScript with TIFF preview"), - "fax" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Group 3 FAX"), - "fff" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Hasselblad/Imacon RAW Format"), - "fits" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Flexible Image Transport System"), - "fpx" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "FlashPix Format"), - "g3" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Group 3 FAX"), - "gif" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "CompuServe graphics interchange format (LZW disabled)"), - "gif87" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "CompuServe graphics interchange format (version 87a)"), - "gray" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Raw gray samples"), - "hdf" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Hierarchical Data Format"), - "hdr" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Leaf HDR Raw Format"), - "icb" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Truevision Targa image"), - "icm" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "ICC Color Profile"), - "ico" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Microsoft icon"), - "icon" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Microsoft icon"), - "iptc" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "IPTC Newsphoto"), - "jbg" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), - "jbig" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), - "jp2" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "JPEG-2000 JP2 File Format Syntax"), - "jpc" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "JPEG-2000 Code Stream Syntax"), - "jpeg" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Joint Photographic Experts Group JFIF format (62)"), - "jpg" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Joint Photographic Experts Group JFIF format"), - "k25" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Kodak DC-25 Raw Format"), - "m2v" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "MPEG Video Stream"), - "mat" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "MATLAB image format"), - "mdc" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Mustek Raw Format"), - "miff" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Magick Image File Format (5.4.7 with Zlib 1.1.4 and BZlib)"), - "mng" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Multiple-image Network Graphics (1.2.2)"), - "mono" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Bi-level bitmap in least-significant-byte first order"), - "mos" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "CREO Photo Raw Format"), - "mpeg" => array ("type" => "application", "page" => "[9]", "out" => "jpeg", "decoder" => "", "name" => "MPEG Video Stream"), - "mpg" => array ("type" => "application", "page" => "[9]", "out" => "jpeg", "decoder" => "", "name" => "MPEG Video Stream"), - "mrw" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Minolta Raw Format"), - "mtv" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "MTV Raytracing image format"), - "mvg" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Magick Vector Graphics"), - "nef" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Nikon Raw Format"), - "orf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Olympus Raw Format"), - "raw" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Panasonic raw Image"), - "p7" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Xv thumbnail format"), - "pef" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Pentax Electronic Format"), - "pal" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "16bit/pixel interleaved YUV"), - "palm" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Palm pixmap"), - "pbm" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Portable bitmap format (black and white)"), - "pcd" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Kodak Photo CD"), - "pcds" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Kodak Photo CD"), - "pct" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Apple Macintosh QuickDraw/PICT"), - "pcx" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "ZSoft IBM PC Paintbrush"), - "pdb" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Palm Database ImageViewer Format"), - "pdf" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Portable Document Format"), - "pfa" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "TrueType font"), - "pfb" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "TrueType font"), - "pgm" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Portable graymap format (gray scale)"), - "picon" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Personal Icon"), - "pict" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Apple Macintosh QuickDraw/PICT"), - "pix" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Alias/Wavefront RLE image format"), - "pm" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "X Windows system pixmap (color)"), - "png" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Portable Network Graphics (1.2.2)"), - "pnm" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Portable anymap"), - "ppm" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Portable pixmap format (color)"), - "ps" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Adobe PostScript"), - "psd" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Adobe Photoshop bitmap"), - "ptif" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Pyramid encoded TIFF"), - "pxn" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "PXN Raw Format"), - "pwp" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Seattle Film Works"), - "raf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Fuji Raw Format"), - "ras" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "SUN Rasterfile"), - "rdc" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Ricoh Raw Format"), - "rgb" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Raw red, green, and blue samples"), - "rgba" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Raw red, green, blue, and matte samples"), - "rla" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Alias/Wavefront image"), - "rle" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Utah Run length encoded image"), - "sfw" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Seattle Film Works"), - "sgi" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Irix RGB image"), - "sti" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sinar Raw Image Format"), - "stegano" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Steganographic image"), - "sun" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "SUN Rasterfile"), - "srf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sony Raw Format"), - "sr2" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sony Raw Format 2"), - "arw" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sony Alpha Raw format"), - "svg" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Scalable Vector Gaphics (XML 2.5.1)"), - "text" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Text"), - "tga" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Truevision Targa image"), - "tif" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Tagged Image File Format (42)"), - "tiff" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Tagged Image File Format (42)"), - "tile" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Tile image with a texture"), - "tim" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "PSX TIM"), - "ttf" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "TrueType font"), - "txt" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Text"), - "uyvy" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "16bit/pixel interleaved YUV"), - "vda" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Truevision Targa image"), - "vicar" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "VICAR rasterfile format"), - "vid" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Visual Image Directory"), - "viff" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Khoros Visualization image"), - "vst" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Truevision Targa image"), - "wbmp" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Wireless Bitmap (level 0) image"), - "wpg" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Word Perfect Graphics"), - "x" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "X Image"), - "x3f" => array ("type" => "application", "page" => "", "out" => "jpeg", "decoder" => "$raw_decoder", "name" => "Sigma raw Image"), - "xbm" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "X Windows system bitmap (black and white)"), - "xc" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "Constant image uniform color"), - "xcf" => array ("type" => "application", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "GIMP image"), - "xpm" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "X Windows system pixmap (color)"), - "xv" => array ("type" => "image", "page" => "[0]", "out" => "jpeg", "decoder" => "", "name" => "Khoros Visualization image"), - "xwd" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "X Windows system window dump (color)"), - "yuv" => array ("type" => "image", "page" => "", "out" => "jpeg", "decoder" => "", "name" => "CCIR 601 4:1:1 or 4:2:2")); + "8bim" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Photoshop resource format"), + "8bimtext"=> array ("type" => "application", "page" => "", "decoder" => "", "name" => "Photoshop resource format"), + "app1" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Raw application information"), + "art" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "PF1: 1st Publisher"), + "avi" => array ("type" => "application", "page" => "[9]", "decoder" => "", "name" => "Audio/Visual Interleaved"), + "avs" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "AVS X image"), + "bay" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Kodak/Roper Bayer Picture Sequence"), + "bie" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), + "bmp" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Microsoft Windows bitmap image"), + "cmyk" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Raw cyan, magenta, yellow, and black samples"), + "cmyka" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Raw cyan, magenta, yellow, black, and opacity samples"), + "cs1" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sinar CaptureShot-1 Image"), + "crw" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Canon Raw Format"), + "cr2" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Canon Raw Format 2"), + "cut" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "DR Halo"), + "dcm" => array ("type" => "application", "page" => "", "decoder" => "dcm2pnm", "name" => "Digital Imaging and Communications in Medicine image"), + "dc2" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Kodak Raw Format 2"), + "dcr" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Kodak Raw Format"), + "dng" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Adobe Digital Negative Format"), + "kdc" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Kodak Digital Camera Raw Format"), + "dcx" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "ZSoft IBM PC multi-page Paintbrush"), + "dps" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Display Postscript"), + "dpx" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Digital Moving Picture Exchange"), + "erf" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Epson Raw Format"), + "epdf" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Encapsulated Portable Document Format"), + "epi" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Adobe Encapsulated PostScript Interchange format"), + "eps" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Adobe Encapsulated PostScript"), + "epsf" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Adobe Encapsulated PostScript"), + "epsi" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Adobe Encapsulated PostScript Interchange format"), + "ept" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Adobe Encapsulated PostScript with TIFF preview"), + "fax" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Group 3 FAX"), + "fff" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Hasselblad/Imacon RAW Format"), + "fits" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Flexible Image Transport System"), + "fpx" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "FlashPix Format"), + "g3" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Group 3 FAX"), + "gif" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "CompuServe graphics interchange format (LZW disabled)"), + "gif87" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "CompuServe graphics interchange format (version 87a)"), + "gray" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Raw gray samples"), + "hdf" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Hierarchical Data Format"), + "hdr" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Leaf HDR Raw Format"), + "icb" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Truevision Targa image"), + "icm" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "ICC Color Profile"), + "ico" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Microsoft icon"), + "icon" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Microsoft icon"), + "iptc" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "IPTC Newsphoto"), + "jbg" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), + "jbig" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Joint Bi-level Image experts Group interchange format"), + "jp2" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "JPEG-2000 JP2 File Format Syntax"), + "jpc" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "JPEG-2000 Code Stream Syntax"), + "jpeg" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Joint Photographic Experts Group JFIF format"), + "jpg" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Joint Photographic Experts Group JFIF format"), + "k25" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Kodak DC-25 Raw Format"), + "m2v" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "MPEG Video Stream"), + "mat" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "MATLAB image format"), + "mdc" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Mustek Raw Format"), + "miff" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Magick Image File Format (5.4.7 with Zlib 1.1.4 and BZlib)"), + "mng" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Multiple-image Network Graphics (1.2.2)"), + "mono" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Bi-level bitmap in least-significant-byte first order"), + "mos" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "CREO Photo Raw Format"), + "mpeg" => array ("type" => "application", "page" => "[9]", "decoder" => "", "name" => "MPEG Video Stream"), + "mpg" => array ("type" => "application", "page" => "[9]", "decoder" => "", "name" => "MPEG Video Stream"), + "mrw" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Minolta Raw Format"), + "mtv" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "MTV Raytracing image format"), + "mvg" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Magick Vector Graphics"), + "nef" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Nikon Raw Format"), + "orf" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Olympus Raw Format"), + "raw" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Panasonic raw Image"), + "p7" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Xv thumbnail format"), + "pef" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Pentax Electronic Format"), + "pal" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "16bit/pixel interleaved YUV"), + "palm" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Palm pixmap"), + "pbm" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Portable bitmap format (black and white)"), + "pcd" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Kodak Photo CD"), + "pcds" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Kodak Photo CD"), + "pct" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Apple Macintosh QuickDraw/PICT"), + "pcx" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "ZSoft IBM PC Paintbrush"), + "pdb" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Palm Database ImageViewer Format"), + "pdf" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Portable Document Format"), + "pfa" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "TrueType font"), + "pfb" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "TrueType font"), + "pgm" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Portable graymap format (gray scale)"), + "picon" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Personal Icon"), + "pict" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Apple Macintosh QuickDraw/PICT"), + "pix" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Alias/Wavefront RLE image format"), + "pm" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "X Windows system pixmap (color)"), + "png" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Portable Network Graphics (1.2.2)"), + "pnm" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Portable anymap"), + "ppm" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Portable pixmap format (color)"), + "ps" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Adobe PostScript"), + "psd" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Adobe Photoshop bitmap"), + "ptif" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Pyramid encoded TIFF"), + "pxn" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "PXN Raw Format"), + "pwp" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Seattle Film Works"), + "raf" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Fuji Raw Format"), + "ras" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "SUN Rasterfile"), + "rdc" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Ricoh Raw Format"), + "rgb" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Raw red, green, and blue samples"), + "rgba" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Raw red, green, blue, and matte samples"), + "rla" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Alias/Wavefront image"), + "rle" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Utah Run length encoded image"), + "sfw" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Seattle Film Works"), + "sgi" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Irix RGB image"), + "sti" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sinar Raw Image Format"), + "stegano" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Steganographic image"), + "sun" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "SUN Rasterfile"), + "srf" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sony Raw Format"), + "sr2" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sony Raw Format 2"), + "arw" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sony Alpha Raw format"), + "svg" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Scalable Vector Gaphics (XML 2.5.1)"), + "text" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Text"), + "tga" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Truevision Targa image"), + "tif" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Tagged Image File Format"), + "tiff" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Tagged Image File Format"), + "tile" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Tile image with a texture"), + "tim" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "PSX TIM"), + "ttf" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "TrueType font"), + "txt" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "Text"), + "uyvy" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "16bit/pixel interleaved YUV"), + "vda" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Truevision Targa image"), + "vicar" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "VICAR rasterfile format"), + "vid" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Visual Image Directory"), + "viff" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Khoros Visualization image"), + "vst" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Truevision Targa image"), + "wbmp" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Wireless Bitmap (level 0) image"), + "wpg" => array ("type" => "application", "page" => "", "decoder" => "", "name" => "Word Perfect Graphics"), + "x" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "X Image"), + "x3f" => array ("type" => "application", "page" => "", "decoder" => "$raw_decoder", "name" => "Sigma raw Image"), + "xbm" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "X Windows system bitmap (black and white)"), + "xc" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "Constant image uniform color"), + "xcf" => array ("type" => "application", "page" => "[0]", "decoder" => "", "name" => "GIMP image"), + "xpm" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "X Windows system pixmap (color)"), + "xv" => array ("type" => "image", "page" => "[0]", "decoder" => "", "name" => "Khoros Visualization image"), + "xwd" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "X Windows system window dump (color)"), + "yuv" => array ("type" => "image", "page" => "", "decoder" => "", "name" => "CCIR 601 4:1:1 or 4:2:2")); ?> diff --git a/src/include/orderby.php b/src/include/orderby.php index 27d46bd..29aa3dc 100644 --- a/src/include/orderby.php +++ b/src/include/orderby.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,90 +17,69 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* we have to start from 1 otherwise POST will not pass the 0 values and we end up in a mess */ -$order_by_string = array ("1" => array ("rating asc", "Rating »"), - "2" => array ("rating desc", "Rating «"), - "3" => array ("photo.views asc", "Number of views »"), - "4" => array ("photo.views desc", "Number of views «"), - "5" => array ("photo_version.date_of_creation asc", "Creation date »"), - "6" => array ("photo_version.date_of_creation desc", "Creation date «"), - "7" => array ("photo.date_of_exposure asc", "Exposure date »"), - "8" => array ("photo.date_of_exposure desc", "Exposure date «"), - "9" => array ("photo_version.original_image_name asc", "Original file name »"), - "10" => array ("photo_version.original_image_name desc", "Original file name «"), - "11" => array ("photo.caption asc", "Caption »"), - "12" => array ("photo.caption desc", "Caption «"), - "13" => array ("photo.title asc", "Title »"), - "14" => array ("photo.title desc", "Title «"), - "15" => array ("photo.identifier asc", "Order added »"), - "16" => array ("photo.identifier desc", "Order added «")); +$order_by_string = array(); + +function orderby_i18n_data() { + global $order_by_string; + global $strings; + + $order_by_string = array ("1" => array ("rating asc", + $strings['generic']['rating']. " ↑"), + "2" => array ("rating desc", + $strings['generic']['rating']. " ↓"), + "3" => array ("photo.views asc", + $strings['generic']['views']." ↑"), + "4" => array ("photo.views desc", + $strings['generic']['views']." ↓"), + "5" => array ("photo_version.date_of_creation asc", + $strings['generic']['created']." ↑"), + "6" => array ("photo_version.date_of_creation desc", + $strings['generic']['created']." ↓"), + "7" => array ("photo.date_of_exposure asc", + $strings['generic']['exposed']." ↑"), + "8" => array ("photo.date_of_exposure desc", + $strings['generic']['exposed']." ↓"), + "9" => array ("photo_version.original_image_name asc", + $strings['generic']['orig_file']. " ↑"), + "10" => array ("photo_version.original_image_name desc", + $strings['generic']['orig_file']." ↓"), + "11" => array ("photo.caption asc", + $strings['generic']['caption']." ↑"), + "12" => array ("photo.caption desc", + $strings['generic']['caption']." ↓"), + "13" => array ("photo.title asc", + $strings['generic']['title']." ↑"), + "14" => array ("photo.title desc", + $strings['generic']['title']." ↓"), + "15" => array ("photo.identifier asc", + $strings['generic']['order_added']." ↑"), + "16" => array ("photo.identifier desc", + $strings['generic']['order_added']." ↓")); +} + +$generate_i18n_data[] = "orderby_i18n_data"; function display_order_by_combo($order_by) { - global $style; - global $theme; global $order_by_string; print "\n"; } function display_order_by_combo_with_button($order_by) { - global $style; - global $theme; + global $thm_elem; global $order_by_string; - print "\n\n\n
    \n"; - print "\n"; - print "\n"; + print "\n\n\n"; print "
    \n"; + print $thm_elem['button.order.by']; + print "\n"; display_order_by_combo($order_by); print "
    "; } -function display_order_by_combo_for_photo($order_by, $album_id, $previous, $current, $next, $detail_info) { - global $style; - global $theme; - global $order_by_string; - - $option = ""; - - /* check if photo is alone in the folder */ - if (($current == $next) && ($current == $previous)) - return; - - if ($album_id) - $option = "&album=$album_id"; - - print "\n\n"; - if ($current != $previous) { - print "\n"; - } - print ""; - if ($current != $next) { - print "\n"; - } - print "\n
    \n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "
    "; -} - ?> diff --git a/src/include/print.pdf.php b/src/include/print.pdf.php index 1eca61e..2b4949c 100644 --- a/src/include/print.pdf.php +++ b/src/include/print.pdf.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/include/print.ps.php b/src/include/print.ps.php index 75d3594..963bcae 100644 --- a/src/include/print.ps.php +++ b/src/include/print.ps.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -59,7 +59,7 @@ function ps_DrawCode128BarCode($file, $string, $type, $storage_info, $xoffset, $ fwrite($file, "$fontsize RF $x $y moveto ($storage_info) RS\r\n"); } - switch (type) { + switch ($type) { case 0: case 1: $ypos = $yoffset - $height; @@ -167,7 +167,7 @@ function ps_Footer($file) { function ps_Dictionary($file) { /* fonts */ - fwrite($file, "/RF {\r\n /size exch def /Arial findfont [size 0.92 mul 0 0 size 0 0] makefont setfont\r\n} def\r\n"); + fwrite($file, "/RF {\r\n /size exch def /Helvetica findfont [size 0.92 mul 0 0 size 0 0] makefont setfont\r\n} def\r\n"); fwrite($file, "/CF {\r\n /size exch def /Courier-Bold findfont [size 0.92 mul 0 0 size 0 0] makefont setfont\r\n} def\r\n"); fwrite($file, "/BF {\r\n /Courier-BoldOblique findfont [size 1.05 mul 0 0 size 0 0] makefont setfont\r\n} def\r\n"); fwrite($file, "/CB {\r\n /Courier-Bold findfont [size 1.05 mul 0 0 size 0 0] makefont setfont\r\n} def\r\n"); @@ -343,7 +343,7 @@ function ps_FrameInfo($file, $xoffset, $yoffset, $width, $height, $border, $fram fwrite($file, "closepath\r\n"); fwrite($file, "grestore\r\n"); - return $label_area; + // return $label_area; } function ps_ScaleImage($image_file, $xoffset, $yoffset, $width, $height, $border) { diff --git a/src/include/profile.php b/src/include/profile.php index 4972c67..ef58e8f 100644 --- a/src/include/profile.php +++ b/src/include/profile.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,35 +17,42 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -$profile_data = array("lens" => array("idx" => 1, "active_img" => "$theme/navigator.eq.lens.a.gif", "img" => "$theme/navigator.eq.lens.gif", 'link' => "my.profile.php?selector=1", "alt" => " Lenses "), - "camera" => array("idx" => 2, "active_img" => "$theme/navigator.eq.camera.a.gif", "img" => "$theme/navigator.eq.camera.gif", 'link' => "my.profile.php?selector=2", "alt" => " Cameras "), - "flash" => array("idx" => 3, "active_img" => "$theme/navigator.eq.flash.a.gif", "img" => "$theme/navigator.eq.flash.gif", 'link' => "my.profile.php?selector=3", "alt" => " Flashes "), - "scanner" => array("idx" => 4, "active_img" => "$theme/navigator.eq.scanner.a.gif", "img" => "$theme/navigator.eq.scanner.gif", 'link' => "my.profile.php?selector=4", "alt" => " Scanners "), - "filter" => array("idx" => 5, "active_img" => "$theme/navigator.eq.filter.a.gif", "img" => "$theme/navigator.eq.filter.gif", 'link' => "my.profile.php?selector=5", "alt" => " Filters "), - "film" => array("idx" => 6, "active_img" => "$theme/navigator.eq.film.a.gif", "img" => "$theme/navigator.eq.film.gif", 'link' => "my.profile.php?selector=6", "alt" => " Films "), - "support" => array("idx" => 7, "active_img" => "$theme/navigator.eq.support.a.gif", "img" => "$theme/navigator.eq.support.gif", 'link' => "my.profile.php?selector=7", "alt" => " Supports "), - "manufacturer" => array("idx" => 8, "active_img" => "$theme/navigator.eq.manufacturer.a.gif", "img" => "$theme/navigator.eq.manufacturer.gif", 'link' => "my.profile.php?selector=8", "alt" => " Manufacturers "), - "label" => array("idx" => 9, "active_img" => "$theme/navigator.eq.label.a.gif", "img" => "$theme/navigator.eq.label.gif", 'link' => "my.profile.php?selector=9", "alt" => " Labels "), - "shop" => array("idx" => 10,"active_img" => "$theme/navigator.eq.shop.a.gif", "img" => "$theme/navigator.eq.shop.gif", 'link' => "my.profile.php?selector=10", "alt" => " Shop "), - "location" => array("idx" => 11,"active_img" => "$theme/navigator.eq.location.a.gif", "img" => "$theme/navigator.eq.location.gif", 'link' => "my.profile.php?selector=11", "alt" => " Locations ")); +$profile_data = array(); + +function profile_i18n_data() { + global $profile_data; + global $strings; + + $profile_data = array("lens" => array("idx" => 1, 'link' => "my.profile.php?selector=1", "alt" => $strings['generic']['lenses']), + "camera" => array("idx" => 2, 'link' => "my.profile.php?selector=2", "alt" => $strings['generic']['cameras']), + "flash" => array("idx" => 3, 'link' => "my.profile.php?selector=3", "alt" => $strings['generic']['flashes']), + "scanner" => array("idx" => 4, 'link' => "my.profile.php?selector=4", "alt" => $strings['generic']['scanners']), + "filter" => array("idx" => 5, 'link' => "my.profile.php?selector=5", "alt" => $strings['generic']['filters']), + "film" => array("idx" => 6, 'link' => "my.profile.php?selector=6", "alt" => $strings['generic']['films']), + "support" => array("idx" => 7, 'link' => "my.profile.php?selector=7", "alt" => $strings['generic']['supports']), + "manufacturer" => array("idx" => 8, 'link' => "my.profile.php?selector=8", "alt" => $strings['generic']['manufacturers']), + "label" => array("idx" => 9, 'link' => "my.profile.php?selector=9", "alt" => $strings['generic']['labels']), + "location" => array("idx" => 10, 'link' => "my.profile.php?selector=10", "alt" => $strings['generic']['locations'])); +} + +$generate_i18n_data[] = "profile_i18n_data"; function display_lens($database, $viewer_id, $owner_id) { - global $color; - global $style; global $access; + global $strings; if ($viewer_id==$owner_id) { - $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights + $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights, number_of_lens_references(identifier) as photos from view_lens where users=$owner_id order by name"); } else { $client = FALSE; - if ($owner_id != "" && $viewer_id != "") + if ($viewer_id != FALSE) $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_id' and client='$viewer_id' and status=2")); if ($client == FALSE) - $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights + $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights, number_of_lens_references(identifier) as photos from view_lens where users=$owner_id and access_rights=$access[public] order by name"); else - $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights + $all_lenses = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, serial_number, date_of_purchase, purchased_new, url, access_rights, number_of_lens_references(identifier) as photos from view_lens where users=$owner_id and access_rights<=$access[protected] order by name"); } @@ -53,33 +60,35 @@ function display_lens($database, $viewer_id, $owner_id) { if ($viewer_id != $owner_id && $num_of_lenses == 0) return; - print "\n"; + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['profile']['model'], "width=\"35%\""); + print emit_th($strings['profile']['serial'], "width=\"13%\""); + print emit_th($strings['profile']['purchased'], "width=\"16%\""); + print emit_th($strings['profile']['new'], "width=\"5%\""); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; + print emit_th($strings['generic']['photos'], "width=\"5%\""); + print emit_th($strings['generic']['access'], "width=\"10%\""); + print "\n"; } print "\n"; for ($i=0; $i < $num_of_lenses; $i++) { $lens = pg_fetch_row($all_lenses, $i); print "\n"; - print "\n"; - print "\n"; + print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print emit_td(emit_date_html($lens[9], 'date')); + print emit_td(emit_yes_no_text($lens[10])); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print emit_td($strings['generic'][$access[$lens[12]]]); + print "\n"; + print "\n"; } print "\n"; } @@ -87,23 +96,22 @@ function display_lens($database, $viewer_id, $owner_id) { } function display_camera($database, $viewer_id, $owner_id) { - global $color; - global $style; global $access; global $icc_profiles; + global $strings; if ($viewer_id==$owner_id) { - $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile + $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile, number_of_camera_references(identifier) as photos, ignore_comment from view_camera where users=$owner_id order by name"); } else { $client = FALSE; - if ($owner_id != "" && $viewer_id != "") + if ($viewer_id != FALSE) $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_id' and client='$viewer_id' and status=2")); if ($client == FALSE) - $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile + $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile, number_of_camera_references(identifier) as photos, ignore_comment from view_camera where users=$owner_id and access_rights=$access[public] order by name"); else - $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile + $all_cameras = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, raw_icc_profile, number_of_camera_references(identifier) as photos, ignore_comment from view_camera where users=$owner_id and access_rights<=$access[protected] order by name"); } @@ -111,53 +119,57 @@ function display_camera($database, $viewer_id, $owner_id) { if ($viewer_id!=$owner_id && $num_of_cameras == 0) return; - print "
    IdModelSerial NumberNewPurchase DateAccessAdd".$strings['generic']['add']."
    $lens[0]$lens[1] $lens[2] $lens[3]\n"; - display_lens_string($lens[4], $lens[5], $lens[6], $lens[7]); + print "$lens[0]$lens[1] $lens[2] $lens[3]\n"; + print emit_lens_string($lens[4], $lens[5], $lens[6], $lens[7]); print "$lens[8]"; display_yes_no_text($lens[10]); print"".generate_date_html($lens[9], 'date', $viewer_id == "" ? 0 : 1). "$lens[8]$lens[12]EditDelete$lens[13]".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['profile']['model'], "width=\"25%\""); + print emit_th($strings['profile']['serial'], "width=\"13%\""); + print emit_th($strings['profile']['purchased'], "width=\"16%\""); + print emit_th($strings['profile']['new'], "width=\"5%\""); + print emit_th($strings['profile']['ignore_comment'], "width=\"10%\""); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['generic']['photos'], "width=\"5%\""); + print emit_th($strings['generic']['access'], "width=\"5%\""); + print emit_th($strings['profile']['icc_profile'], "width=\"10%\""); + print "\n"; } print "\n"; for ($i=0; $i < $num_of_cameras; $i++) { $camera = pg_fetch_row($all_cameras, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print emit_td(emit_yes_no_text($camera[6])); + print emit_td(emit_yes_no_text($camera[11])); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; + print emit_td($strings['generic'][$access[$camera[8]]]); if ($camera[9] != "") - print $icc_profiles[$camera[9]]['name']; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + else + print "\n"; + print "\n"; + print "\n"; } print "\n"; } print "
    IdModelSerial NumberNewPurchase DateAccessICC ProfileAdd".$strings['generic']['add']."
    $camera[0]$camera[1] $camera[2] $camera[3]$camera[4]"; display_yes_no_text($camera[6]); print"".generate_date_html($camera[5], 'date', $viewer_id == "" ? 0 : 1). "
    $camera[0]$camera[1] $camera[2] $camera[3]$camera[4]".emit_date_html($camera[5], 'date'). "$camera[8]"; + print "$camera[10]EditDelete" . $icc_profiles[$camera[9]]['name'] . "".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; } +/* type is: flash filter support scanner [camera film lens not yet] */ function display_profile($database, $type, $viewer_id, $owner_id) { - global $color; - global $style; global $access; + global $strings; if ($viewer_id==$owner_id) { - $all = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights + $all = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights, number_of_".$type."_references(identifier) as photos from view_$type where users=$owner_id order by name"); } else { $client = FALSE; - if ($owner_id != "" && $viewer_id != "") + if ($viewer_id != FALSE) $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_id' and client='$viewer_id' and status=2")); if ($client == FALSE) $all = pg_query($database, "select identifier, name, model, variation, serial_number, date_of_purchase, purchased_new, url, access_rights @@ -171,31 +183,33 @@ function display_profile($database, $type, $viewer_id, $owner_id) { if ($viewer_id!=$owner_id && $num_of == 0) return; - print "\n"; + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['profile']['model'], "width=\"35%\""); + print emit_th($strings['profile']['serial'], "width=\"13%\""); + print emit_th($strings['profile']['purchased'], "width=\"16%\""); + print emit_th($strings['profile']['new'], "width=\"5%\""); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; + print emit_th($strings['generic']['photos'], "width=\"5%\""); + print emit_th($strings['generic']['access'], "width=\"10%\""); + print "\n"; } print "\n"; for ($i=0; $i < $num_of; $i++) { - $row = pg_fetch_row($all, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + $item = pg_fetch_row($all, $i); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print emit_td(emit_yes_no_text($item[6])); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print emit_td($strings['generic'][$access[$item[8]]]); + print "\n"; + print "\n"; } print "\n"; } @@ -203,22 +217,21 @@ function display_profile($database, $type, $viewer_id, $owner_id) { } function display_film($database, $viewer_id, $owner_id) { - global $color; - global $style; global $access; + global $strings; if ($viewer_id==$owner_id) { - $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights + $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights, number_of_film_references(identifier) as photos from view_film where users=$owner_id order by name"); } else { $client = FALSE; - if ($owner_id != "" && $viewer_id != "") + if ($viewer_id != FALSE) $client = pg_fetch_row(pg_query ($database, "select identifier from client where users='$owner_id' and client='$viewer_id' and status=2")); if ($client == FALSE) - $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights + $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights, number_of_film_references(identifier) as photos from view_film where users=$owner_id and access_rights=$access[public] order by name"); else - $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights + $all_films = pg_query($database, "select identifier, name, model, iso, format, url, access_rights, number_of_film_references(identifier) as photos from view_film where users=$owner_id and access_rights<=$access[protected] order by name"); } @@ -226,42 +239,40 @@ function display_film($database, $viewer_id, $owner_id) { if ($viewer_id!=$owner_id && $num_of_films == 0) return; - print "
    IdModelSerial NumberNewPurchase DateAccessAdd".$strings['generic']['add']."
    $row[0]$row[1] $row[2] $row[3]$row[4]"; display_yes_no_text($row[6]); print"".generate_date_html($row[5], 'date', $viewer_id == "" ? 0 : 1). "
    $item[0]$item[1] $item[2] $item[3]$item[4]".emit_date_html($item[5], 'date'). "$row[8]EditDelete$item[9]".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; + print "
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['profile']['model'], "width=\"35%\""); + print emit_th($strings['profile']['iso'], "width=\"7%\""); + print emit_th($strings['profile']['format'], "width=\"20%\""); if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; + print emit_th($strings['generic']['photos'], "width=\"5%\""); + print emit_th($strings['generic']['access'], "width=\"10%\""); + print "\n"; } print "\n"; for ($i=0; $i < $num_of_films; $i++) { $film = pg_fetch_row($all_films, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; if ($viewer_id==$owner_id) { - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print emit_td($strings['generic'][$access[$film[6]]]); + print "\n"; + print "\n"; } print "\n"; } print "
    IdModelFormatAccessAdd".$strings['generic']['add']."
    $film[0]$film[1] $film[2] $film[3]$film[4]
    $film[0]$film[1] $film[2]$film[3]$film[4]$film[6]EditDelete$film[7]".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; } - function display_manufacturer($database, $viewer_id, $owner_id) { - global $color; - global $style; global $access; + global $strings; if ($owner_id == "*") $all_manufacturers = pg_query($database, "select identifier, name, url, last_modified_date from manufacturer order by name"); @@ -273,40 +284,42 @@ function display_manufacturer($database, $viewer_id, $owner_id) { if ($owner_id == "*" && $num_of_manufacturers == 0) return; - print "\n"; + print "
    \n"; if ($owner_id == "*") { - print "\n"; - print "\n"; + print "\n"; + print "\n"; print "\n"; } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['generic']['name'], "width=\"25%\""); + print emit_th($strings['user']['web'], "width=\"40%\""); + print emit_th($strings['generic']['created'], "width=\"20%\""); if ($owner_id != "*") - print "\n"; + print "\n"; print "\n"; for ($i=0; $i < $num_of_manufacturers; $i++) { $manufacturer = pg_fetch_row($all_manufacturers, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; if ($owner_id != "*") { - print "\n"; - print "\n"; + print "\n"; + print "\n"; } print "\n"; } print "
    All Manufacturers in the System
    ".sprintf($strings['profile']['all'], $strings['generic']['manufacturers'])."
    IdNameURLCreatedAdd".$strings['generic']['add']."
    $manufacturer[0]$manufacturer[1]$manufacturer[2]".generate_date_html($manufacturer[3], 'date', $viewer_id == "" ? 0 : 1). "
    $manufacturer[0]$manufacturer[1]$manufacturer[2]".emit_date_html($manufacturer[3], 'date'). "EditDelete".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; } -function display_label($database, $viewer_id, $owner_id) { - global $color; - global $style; +function display_label($database, $owner_id) { + global $po_user; + global $strings; + + $viewer_id = $po_user['id']; if ($owner_id == "*") { $all_labels = pg_query($database, " @@ -319,8 +332,7 @@ function display_label($database, $viewer_id, $owner_id) { from label, paper where label.paper=paper.identifier order by label.identifier"); - } - else { + } else { $all_labels = pg_query($database, " select label.identifier, (select url from manufacturer where identifier=label.manufacturer), @@ -338,46 +350,46 @@ function display_label($database, $viewer_id, $owner_id) { if ($owner_id == "*" && $num_of_labels == 0) return; - print "\n"; + print "
    \n"; if ($owner_id == "*") { - print "\n"; - print "\n"; + print "\n"; + print "\n"; print "\n"; } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['profile']['model'], "width=\"25%\""); + print emit_th($strings['label']['h_space'], "width=\"5%\""); + print emit_th($strings['label']['v_space'], "width=\"5%\""); + print emit_th($strings['label']['width'], "width=\"5%\""); + print emit_th($strings['label']['height'], "width=\"5%\""); + print emit_th($strings['label']['h_offset'], "width=\"5%\""); + print emit_th($strings['label']['v_offset'], "width=\"5%\""); + print emit_th($strings['label']['rows'], "width=\"5%\""); + print emit_th($strings['label']['columns'], "width=\"5%\""); + print emit_th($strings['generic']['created'], "width=\"20%\""); if ($owner_id != "*") { - print "\n"; + print "\n"; } print "\n"; for ($i=0; $i < $num_of_labels; $i++) { $label = pg_fetch_row($all_labels, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; if ($owner_id != "*") { - print "\n"; - print "\n"; + print "\n"; + print "\n"; } print "\n"; } @@ -385,44 +397,51 @@ function display_label($database, $viewer_id, $owner_id) { } function display_location($database, $viewer_id) { - global $color; - global $style; global $po_user; - global $user_type; + global $strings; $filter = " where private is false "; - if ($po_user['type'] == $user_type['administrator']) + if ($po_user['type'] == PO_USER_TYPE_ADMIN) $filter = ""; if ($viewer_id == "*") { - $result = pg_query($database, "select identifier, place, city, state, country, last_modified_date, latitude, longitude, private - from view_location - $filter - order by country, state, city, place"); + $result = pg_query($database, " + select view_location.identifier, place, city, state, country, + last_modified_date, latitude, longitude, + number_of_location_references(view_location.identifier) as photos, + private + from view_location + $filter +order by country, state, city, place"); } else { - $result = pg_query($database, "select identifier, place, city, state, country, last_modified_date, latitude, longitude, private - from view_location - where users=$viewer_id - order by country, state, city, place"); + $result = pg_query($database, " + select view_location.identifier, place, city, state, country, + last_modified_date, latitude, longitude, + number_of_location_references(view_location.identifier) as photos, + private + from view_location + where users=$viewer_id +order by country, state, city, place"); } $num = pg_num_rows($result); - print "
    All Labels in the System
    ".sprintf($strings['profile']['all'], $strings['generic']['labels'])."
    IdModelH SpaceV SpaceWidthHeightH OffsetV OffsetRowsColumsCreatedAdd".$strings['generic']['add']."
    $label[0]$label[2] $label[3], $label[4]$label[5]$label[6]$label[7]$label[8]$label[9]$label[10]$label[11]$label[12]".generate_date_html($label[13], 'date', $viewer_id == "" ? 0 : 1). "
    $label[0]$label[2] $label[3], $label[4]$label[5]$label[6]$label[7]$label[8]$label[9]$label[10]$label[11]$label[12]".emit_date_html($label[13], 'date'). "EditDelete".$strings['generic']['edit']."".$strings['generic']['delete']."
    \n"; + print "
    \n"; if ($viewer_id == "*") { - print "\n"; - print "\n"; + print "\n"; + print "\n"; print "\n"; } print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print emit_th($strings['profile']['id_no'], "width=\"5%\""); + print emit_th($strings['generic']['description'], "width=\"40%\""); + print emit_th($strings['photo']['latitude'], "width=\"8%\""); + print emit_th($strings['photo']['longitude'], "width=\"8%\""); + print emit_th($strings['generic']['created'], "width=\"15%\""); + print emit_th($strings['generic']['photos'], "width=\"5%\""); if ($viewer_id != "*") { - print "\n"; - print "\n"; + print emit_th($strings['generic']['private'], "width=\"5%\""); + print "\n"; } print "\n"; @@ -437,129 +456,20 @@ function display_location($database, $viewer_id) { if ($r[3] != '' && $r[4] != '') { $r[3] = sprintf("%s,", $r[3]); } - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + + if ($r[1] == 'Unknown') $r[1] = $strings['generic']['unknown']; + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; if ($viewer_id != "*") { - print "\n"; - print "\n"; - print "\n"; - } - print "\n"; - } - print "
    All Locations in the System
    ".sprintf($strings['profile']['all'], $strings['generic']['locations'])."
    IdDescriptionLatitudeLongitudeCreatedPrivateAdd".$strings['generic']['add']."
    $r[0]$r[1] $r[2] $r[3] $r[4]$r[6]$r[7]".generate_date_html($r[5], 'date', $viewer_id == "" ? 0 : 1)."
    $r[0]$r[1] $r[2] $r[3] $r[4]$r[6]$r[7]".emit_date_html($r[5], 'date')."$r[8]"; - display_yes_no_text($r[8]); - print "EditDelete
    \n"; -} - - -function display_shop_items($database, $viewer_id, $owner_id) { - global $color; - global $style; - - if ($owner_id == "*") { - $all_shop_items = pg_query($database, " - select shop_item.identifier, description, shop_item.date_of_creation, caption - from shop_item, shop_category - where shop_item.category = shop_category.identifier"); - } - else { - $all_shop_items = pg_query($database, " - select shop_item.identifier, description, shop_item.date_of_creation, caption - from shop_item, shop_category - where shop_item.category = shop_category.identifier - and shop_item.users=$viewer_id"); - } - - $num_of_shop_items = pg_num_rows($all_shop_items); - if ($owner_id == "*" && $num_of_shop_items == 0) - return; - - print "\n"; - print "\n"; - if ($owner_id == "*") { - print "\n"; - } - else { - print "\n"; - } - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($owner_id != "*") { - print "\n"; - } - print "\n"; - - for ($i=0; $i < $num_of_shop_items; $i++) { - $shop_item = pg_fetch_row($all_shop_items, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($owner_id != "*") { - print "\n"; - print "\n"; - } - print "\n"; - } - print "
    All Shop Items in the SystemShop Items
    IdDescriptionCategoryCreatedAdd
    $shop_item[0]$shop_item[1]$shop_item[3]".generate_date_html($shop_item[2], 'date', $viewer_id == "" ? 0 : 1). "EditDelete
    \n"; -} - -function display_shop_categories($database, $viewer_id, $owner_id) { - global $color; - global $style; - - if ($owner_id == "*") { - $all_shop_categories = pg_query($database, " - select identifier, caption, date_of_creation - from shop_category"); - } - else { - $all_shop_categories = pg_query($database, " - select identifier, caption, date_of_creation - from shop_category - where users=$viewer_id"); - } - - $num_of_shop_categories = pg_num_rows($all_shop_categories); - if ($owner_id == "*" && $num_of_shop_categories == 0) - return; - - print "\n"; - print "\n"; - if ($owner_id == "*") { - print "\n"; - } - else { - print "\n"; - } - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($owner_id != "*") { - print "\n"; - } - print "\n"; - - for ($i=0; $i < $num_of_shop_categories; $i++) { - $shop_category = pg_fetch_row($all_shop_categories, $i); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($owner_id != "*") { - print "\n"; - print "\n"; + print emit_td(emit_yes_no_text($r[9])); + print "\n"; + print "\n"; } print "\n"; } @@ -570,7 +480,7 @@ function display_shop_categories($database, $viewer_id, $owner_id) { function profile_del_item ($database, $type, $identifier) { global $po_user; - global $user_type; + global $strings; $type = pg_escape_string($type); $identifer = pg_escape_string($identifier); @@ -580,7 +490,7 @@ function profile_del_item ($database, $type, $identifier) if ($identifier != "") { /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from $type where identifier=$identifier and users=$po_user[id]")); if ($result[0] == 0) { return FALSE; @@ -596,7 +506,7 @@ function profile_del_item ($database, $type, $identifier) $result = pg_query($database, "delete from $type where identifier='$identifier'"); if (!$result) { pg_query($database, "rollback"); - print "Failed to delete $type: $identifier"; + site_push_error($strings['errors']['db_insert_failed']); return FALSE; } @@ -604,7 +514,7 @@ function profile_del_item ($database, $type, $identifier) $result = pg_query($database, "delete from ".$type."_type where identifier='$type_to_remove[0]'"); if (!$result) { pg_query($database, "rollback"); - print "Failed to delete $type type: $type_to_remove"; + site_push_error($strings['errors']['db_insert_failed']); return FALSE; } } @@ -621,7 +531,7 @@ function profile_update_item($database, $identifier, $user_id, $type, $access_rights) { global $po_user; - global $user_type; + global $strings; $user_id = pg_escape_string($user_id); $type = pg_escape_string($type); @@ -637,7 +547,7 @@ function profile_update_item($database, $identifier, $user_id, $type, $type_to_remove = FALSE; /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from $type where identifier=$identifier and users=$user_id")); if ($result[0] == 0) { return FALSE; @@ -661,7 +571,7 @@ function profile_update_item($database, $identifier, $user_id, $type, values ($type_id, $manufacturer_id, '$model', '$variation', now(), $user_id)"); if (!$result) { pg_query($database, "rollback"); - print "Failed to create new type"; + site_push_error($strings['errors']['db_insert_failed']); return FALSE; } } @@ -670,9 +580,7 @@ function profile_update_item($database, $identifier, $user_id, $type, $result = pg_query($database, "update $type set type=$type_id, serial_number='$serial', date_of_purchase=$date_of_purchase, purchased_new='$purchased_new', access_rights='$access_rights' where identifier='$identifier'"); if (!$result) { pg_query($database, "rollback"); - print "Failed to create new item"; - print "update $type set type=$type_id, serial_number='$serial', date_of_purchase=$date_of_purchase, purchased_new='$purchased_new', access_rights='$access_rights' where identifier='$identifier'"; - + site_push_error($strings['errors']['db_insert_failed']); return FALSE; } @@ -681,7 +589,7 @@ function profile_update_item($database, $identifier, $user_id, $type, $result = pg_query($database, "delete from ".$type."_type where identifier='$type_to_remove[0]'"); if (!$result) { pg_query($database, "rollback"); - print "Failed to delete type: $type"; + site_push_error($strings['errors']['db_insert_failed']); return FALSE; } } diff --git a/src/include/rdf.php b/src/include/rdf.php index b6e05de..28f098e 100644 --- a/src/include/rdf.php +++ b/src/include/rdf.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -21,58 +21,6 @@ include_once "common.php"; include_once "iptc.php"; include_once "exif.php"; -$current_rdf_tag = "not_implemented"; -$rdf_image_data = array ("author" => "", - "title" => "", - "keywords" => NULL, - "caption" => "", - "copyright" => "", - "web_statement" => "", - "caption_writer" => "", - "category" => "", - "credit" => "", - "source" => "", - "headline" => "", - "instructions" => "", - "transmission_reference" => "", - "supplemental_category" => "", - "date_of_exposure" => "null", - "city" => "null", - "state" => "null", - "country" => "null", - "camera_model" => "null", - "camera_make" => "null", - "lens" => "null", - "film" => "null", - "flash" => "null", - "focal_length" => "null", - "aperture" => "null", - "shutter" => "null", - "camera_metering" => "null", - "camera_program" => "null", - "flash_mode" => "null"); - -/* as defined in the XMP spec January 2004 */ -$metering_mode_conversion = array (0 => "null", /* Unknown */ - 1 => "null", /* Average */ - 2 => 2, /* Center */ - 3 => 1, /* Spot */ - 4 => 5, /* MultiSpot */ - 5 => "null", /* Pattern */ - 6 => "null", /* Partial */ - 255 => "null"); /* Other */ - -/* as defined in the XMP spec January 2004 */ -$exposure_program_conversion = array (0 => "null", /* Unknown */ - 1 => 4, /* Manual */ - 2 => 1, /* Normal */ - 3 => 2, /* Aperture */ - 4 => 3, /* Shutter */ - 5 => "null", /* Creative */ - 6 => "null", /* Action */ - 7 => "null", /* Portrait */ - 8 => "null"); /* Landscape */ - function convert_rdf2sql_timestamp($date, $time) { $year = substr($date, 0, 4); $month = substr($date, 5, 2); @@ -99,23 +47,155 @@ function convert_rdf2sql_timestamp($date, $time) { return $sql_timestamp; } -function rdf_concat($string, $word) { - if (($string == "") || ($string == "null")) - $string = $word; - else { - /* FIX FOR BUGGY XML PARSER */ - if (ord($word[0]) > 127) - $string .= $word; - else - $string .= " ".$word; - } - return $string; -} +function photo_parse_rdf($database, $index, $user_id, $image_data) { + global $rdf_image_data; + global $metering_mode_conversion; + global $exposure_program_conversion; + global $strings; -function convert_into_float($string) { - $num_first = substr($string, 0, strpos($string, "/")); - $num_second = substr($string, strpos($string, "/")+1); - return $num_first/$num_second; + $loc = ""; + $city = ""; + $state = ""; + $country = ""; + $keywords = ""; + + $image_data = extract_exiftool_metadata($image_data, $index, "XMP"); + /* Populate RDF data */ + $rdf_data = $image_data['exiftool_data_XMP']; + foreach ($rdf_data as $key => $value) { + $image_data["rdf"] .= "$key$value"; + switch ($key) { + case "Creator": // and 'Owner' too + $image_data["author"] = $value; + break; + case "Rights": // and 'Usage Terms' too? + $image_data["copyright"] = $value; + break; + case "Headline": + $image_data["headline"] = $value; + break; + case "Title": + $image_data["title"] = $value; + break; + case "Description": // this could go into caption..? + $image_data["remark"] = $value; + break; + case "Date Created": // and 'Create Date' and 'Date' + $image_data["date_of_exposure"] = convert_rdf2sql_timestamp($value, "00:00:00"); + break; + case "City": + $city = $value; + break; + case "State": + $state = $value; + break; + case "Country": + $country = $value; + break; + case "Location": + $loc = $value; + break; + case "Instructions": + $image_data["instructions"] = $value; + break; + case "Caption Writer": + $image_data["caption_writer"] = $value; + break; + case "Web Statement": + $image_data["web_statement"] = $value; + break; + case "Source": + $image_data["source"] = $value; + break; + case "Credit": + $image_data["credit"] = $value; + break; + case "Category": + $image_data["category"] = $value; + break; + case "Transmission Reference": + $image_data["transmission_reference"] = $value; + break; + case "Supplemental Categories": // should get shoved onto keywords? + $image_data["supplemental_category"] = $value; + break; + case "Subject": + $keywords = $value; + break; + case "F Number": + $image_data["aperture"] = convert_exif_aperture($database, $value); + break; + case "Shutter Speed": + case "Exposure Time": + $image_data["shutter"] = convert_exif_shutter($database, $value); + break; + case "Exposure Compensation": + $image_data["exp_comp"] = convert_exif_ev_comp($database, $value); + break; + case "Date/Time Original": + $image_data["date_of_exposure"] = convert_exif2sql_timestamp($value); + break; + default: + // print "
  • UNHANDLED: $key = $value
  • "; + break; + } + } + + $image_data = photo_parse_exif_orientation_colorspace($database, $index, $user_id, $image_data, "XMP"); + + /* Image Comment */ + if (isset($rdf_data["User Comment"]) && !$image_data['IgnoreExifUserComment']) { + exif_string_helper($image_data, $rdf_data, "title", "User Comment"); + } + + /* Focal length is special */ + $tmp = $rdf_data["Focal Length"]; + $tmp = substr($tmp, 0, strpos($tmp, 'mm')); + + if ($rdf_data["Scale Factor To 35mm Equivalent"] > 2) { + if ($rdf_data["Focal Length In 35mm Format"]) { + $tmp = $rdf_data["Focal Length In 35mm Format"]; + $tmp = substr($tmp, 0, strpos($tmp, 'mm')); + } else { + $tmp = $tmp * $rdf_data["Scale Factor To 35mm Equivalent"]; + } + } + + if (isset($rdf_data["Focal Length"])) + $image_data["focal_length"] = convert_exif_focal_length($database, $tmp); + + /* Location */ + if (($loc != "") || ($city != "") || ($state != "") || ($country != "")) { + $image_data['location'] = + convert_iptc_location($database, $user_id, + $city, $state, $country); + } else { + $image_data['location'] = "0"; + } + + /* Keywords */ + if ($keywords != "") { + $keys = explode(", ", $keywords); + foreach ($keys as $key) { + $image_data['keywords'][] = $key; + } + } + + /* + + $rdf_image_data["lens"] = "null"; + $rdf_image_data["film"] = "null"; + $rdf_image_data["flash"] = "null"; + $rdf_image_data["camera_metering"] = "null"; + $rdf_image_data["camera_program"] = "null"; + $rdf_image_data["flash_mode"] = "null"; + + */ + + /* Escape it for database sanity */ + $image_data["rdf"] = pg_escape_string($image_data["rdf"]); + + return $image_data; } function convert_rdf_lens_serial_number($database, $user_id, $serial_number) { @@ -129,443 +209,4 @@ function convert_rdf_lens_serial_number($database, $user_id, $serial_number) { return "null"; } -function photo_parse_rdf($database, $index, $user_id, $image_data) { - global $rdf_image_data; - global $metering_mode_conversion; - global $exposure_program_conversion; - - $rdf_image_data["author"] = ""; - $rdf_image_data["title"] = ""; - $rdf_image_data["keywords"] = NULL; - $rdf_image_data["caption"] = ""; - $rdf_image_data["copyright"] = ""; - $rdf_image_data["web_statement"] = ""; - $rdf_image_data["caption_writer"] = ""; - $rdf_image_data["category"] = ""; - $rdf_image_data["credit"] = ""; - $rdf_image_data["source"] = ""; - $rdf_image_data["headline"] = ""; - $rdf_image_data["instructions"] = ""; - $rdf_image_data["transmission_reference"] = ""; - $rdf_image_data["supplemental_category"] = ""; - $rdf_image_data["date_of_exposure"] = "null"; - $rdf_image_data["city"] = "null"; - $rdf_image_data["state"] = "null"; - $rdf_image_data["country"] = "null"; - $rdf_image_data["camera_model"] = "null"; - $rdf_image_data["camera_make"] = "null"; - $rdf_image_data["lens"] = "null"; - $rdf_image_data["film"] = "null"; - $rdf_image_data["flash"] = "null"; - $rdf_image_data["focal_length"] = "null"; - $rdf_image_data["aperture"] = "null"; - $rdf_image_data["shutter"] = "null"; - $rdf_image_data["camera_metering"] = "null"; - $rdf_image_data["camera_program"] = "null"; - $rdf_image_data["flash_mode"] = "null"; - - $fp = fopen($image_data['file'][$index]['name_tmp'], "r"); - $data = fread($fp, filesize($image_data['file'][$index]['name_tmp'])); - - $rdf_data_start = strstr($data, "Extracting RDF data ... "; - - /* first parse the xml file */ - fseek ($fp, 0 ,SEEK_SET); - $xml_parser = xml_parser_create("ISO-8859-1"); - xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, TRUE); - xml_set_element_handler($xml_parser, "RDF_StartElement", "RDF_EndElement"); - xml_set_character_data_handler($xml_parser, "RDF_CharacterData"); - - if (!xml_parse($xml_parser, $rdf_data)) { - print sprintf("%s, XML error: %d %s in file data.xml at line %d\n

    \n", - xml_to_html($rdf_data), - xml_get_error_code($xml_parser), - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser)); - } - - xml_parser_free($xml_parser); - - fclose($fp); - print "done"; - - if ($rdf_image_data['author'] != "") - $image_data['author'] = $rdf_image_data['author']; - - if ($rdf_image_data['title'] != "") - $image_data['title'] = $rdf_image_data['title']; - - if ($rdf_image_data['keywords'] != NULL) - $image_data['keywords'] = $rdf_image_data['keywords']; - - if ($rdf_image_data['caption'] != "") - $image_data['caption'] = $rdf_image_data['caption']; - - if ($rdf_image_data['copyright'] != "") - $image_data['copyright'] = $rdf_image_data['copyright']; - - if ($rdf_image_data['web_statement'] != "") - $image_data['web_statement'] = $rdf_image_data['web_statement']; - - if ($rdf_image_data['caption_writer'] != "") - $image_data['caption_writer'] = $rdf_image_data['caption_writer']; - - if ($rdf_image_data['category'] != "") - $image_data['category'] = $rdf_image_data['category']; - - if ($rdf_image_data['credit'] != "") - $image_data['credit'] = $rdf_image_data['credit']; - - if ($rdf_image_data['source'] != "") - $image_data['source'] = $rdf_image_data['source']; - - if ($rdf_image_data['headline'] != "") - $image_data['headline'] = $rdf_image_data['headline']; - - if ($rdf_image_data['instructions'] != "") - $image_data['instructions'] = $rdf_image_data['instructions']; - - if ($rdf_image_data['transmission_reference'] != "") - $image_data['transmission_reference'] = $rdf_image_data['transmission_reference']; - - if ($rdf_image_data['supplemental_category'] != "") - $image_data['supplemental_category'] = $rdf_image_data['supplemental_category']; - - if ($rdf_image_data['date_of_exposure'] != "null") - $image_data['date_of_exposure'] = convert_rdf2sql_timestamp($rdf_image_data['date_of_exposure'], "00:00:00"); - - if (($rdf_image_data['city'] != "null") || - ($rdf_image_data['state'] != "null") || - ($rdf_image_data['country'] != "null")) { - $image_data['location'] = convert_iptc_location($database, - $user_id, - $rdf_image_data['city'], - $rdf_image_data['state'], - $rdf_image_data['country']); - } - else { - $image_data['location'] = "0"; - } - - if (($rdf_image_data['camera_make'] != "null") || - ($rdf_image_data['camera_model'] != "null")) - $image_data['camera'] = convert_exif_camera($database, $user_id, $rdf_image_data['camera_make'], $rdf_image_data['camera_model']); - - if ($rdf_image_data['lens'] != "null") - $image_data['lens'] = convert_rdf_lens_serial_number($database, $user_id, $rdf_image_data['lens']); - - if ($rdf_image_data['film'] != "null") - $image_data['film'] = convert_exif_iso_film($database, $user_id, $rdf_image_data['film']); - - if ($rdf_image_data['flash'] != "null") - $image_data['flash'] = $rdf_image_data['flash']; - - if ($rdf_image_data['focal_length'] != "null") - $image_data['focal_length'] = convert_exif_focal_length($database, convert_into_float($rdf_image_data['focal_length'])); - - if ($rdf_image_data['shutter'] != "null") - $image_data['shutter'] = convert_exif_shutter($database, convert_into_float($rdf_image_data['shutter'])); - - if ($rdf_image_data['aperture'] != "null") - $image_data['aperture'] = convert_exif_aperture($database, "f/".convert_into_float($rdf_image_data['aperture'])); - - if ($rdf_image_data['camera_metering'] != "null") - $image_data['camera_metering'] = $metering_mode_conversion[$rdf_image_data['camera_metering']]; - - if ($rdf_image_data['camera_program'] != "null") - $image_data['camera_program'] = $exposure_program_conversion[$rdf_image_data['camera_program']]; - - if ($rdf_image_data['flash_mode'] != "null") - $image_data['flash_mode'] = $rdf_image_data['flash_mode']; - - return $image_data; -} - -function RDF_CharacterData($parser, $data) { - global $current_rdf_tag; - global $rdf_image_data; - - /* check for crappy spaces */ - $test = ereg_replace(" ", "", $data); - $test = ereg_replace("\n", "", $test); - $test = ereg_replace("\r", "", $test); - - if (!$test) - return; - - switch ($current_rdf_tag) { - case "date_of_creation": - $rdf_image_data['date_of_exposure'] = convert_rdf2sql_timestamp($data, ""); - break; - case "city": - $rdf_image_data['city'] = rdf_concat($rdf_image_data['city'], $data); - break; - case "state": - $rdf_image_data['state'] = rdf_concat($rdf_image_data['state'], $data); - break; - case "country": - $rdf_image_data['country'] = rdf_concat($rdf_image_data['country'], $data); - break; - case "web_statement": - $rdf_image_data['web_statement'] = rdf_concat($rdf_image_data['web_statement'], $data); - break; - case "title": - $rdf_image_data['title'] = rdf_concat($rdf_image_data['title'], $data); - break; - case "caption": - $rdf_image_data['caption'] = rdf_concat($rdf_image_data['caption'], $data); - break; - case "copyright": - $rdf_image_data['copyright'] = rdf_concat($rdf_image_data['copyright'], $data); - break; - case "author": - $rdf_image_data['author'] = rdf_concat($rdf_image_data['author'], $data); - break; - case "keyword": - $rdf_image_data['keywords'][] = $data; - break; - case "caption_writer": - $rdf_image_data['caption_writer'] = rdf_concat($rdf_image_data['caption_writer'], $data); - break; - case "category": - $rdf_image_data['category'] = substr($data, 0, 3); - break; - case "credit": - $rdf_image_data['credit'] = rdf_concat($rdf_image_data['credit'], $data); - break; - case "source": - $rdf_image_data['source'] = rdf_concat($rdf_image_data['source'], $data); - break; - case "headline": - $rdf_image_data['headline'] = rdf_concat($rdf_image_data['headline'], $data); - break; - case "instructions": - $rdf_image_data['instructions'] = rdf_concat($rdf_image_data['instructions'], $data); - break; - case "transmission_reference": - $rdf_image_data['transmission_reference'] = rdf_concat($rdf_image_data['transmission_reference'], $data); - break; - case "supplemental_category": - $rdf_image_data['supplemental_category'] = rdf_concat($rdf_image_data['supplemental_category'], $data); - break; - case "web_statement": - $rdf_image_data['web_statement'] = rdf_concat($rdf_image_data['web_statement'], $data); - break; - case "film": - $rdf_image_data['film'] = $data; - break; - case "camera_make": - $rdf_image_data['camera_make'] = $data; - break; - case "camera_model": - $rdf_image_data['camera_model'] = $data; - break; - case "camera_metering": - $rdf_image_data['camera_metering'] = $data; - break; - case "camera_program": - $rdf_image_data['camera_program'] = $data; - break; - case "shutter": - $rdf_image_data['shutter'] = $data; - break; - case "aperture": - $rdf_image_data['aperture'] = $data; - break; - case "focal_length": - $rdf_image_data['focal_length'] = $data; - break; - case "lens_serial_number": - $rdf_image_data['lens'] = $data; - break; - } -} - -function RDF_StartElement($parser, $name, $attribs) { - global $current_rdf_tag; - - /* set current tag */ - switch ($name) { - case "TIFF:MAKE": - $current_rdf_tag = "camera_make"; - break; - case "TIFF:MODEL": - $current_rdf_tag = "camera_model"; - break; - case "EXIF:ISOSPEEDRATINGS": - $current_rdf_tag = "film"; - break; - case "EXIF:EXPOSUREPROGRAM": - $current_rdf_tag = "camera_program"; - break; - case "EXIF:METERINGMODE": - $current_rdf_tag = "camera_metering"; - break; - case "EXIF:EXPOSURETIME": - $current_rdf_tag = "shutter"; - break; - case "EXIF:FNUMBER": - $current_rdf_tag = "aperture"; - break; - case "EXIF:FOCALLENGTH": - $current_rdf_tag = "focal_length"; - break; - case "AUX:SERIALNUMBER": - $current_rdf_tag = "lens_serial_number"; - break; - case "PHOTOSHOP:DATECREATED": - $current_rdf_tag = "date_of_creation"; - break; - case "PHOTOSHOP:CITY": - $current_rdf_tag = "city"; - break; - case "PHOTOSHOP:STATE": - $current_rdf_tag = "state"; - break; - case "PHOTOSHOP:COUNTRY": - $current_rdf_tag = "country"; - break; - case "PHOTOSHOP:CAPTIONWRITER": - $current_rdf_tag = "caption_writer"; - break; - case "PHOTOSHOP:CATEGORY": - $current_rdf_tag = "category"; - break; - case "PHOTOSHOP:CREDIT": - $current_rdf_tag = "credit"; - break; - case "PHOTOSHOP:SOURCE": - $current_rdf_tag = "source"; - break; - case "PHOTOSHOP:HEADLINE": - $current_rdf_tag = "headline"; - break; - case "PHOTOSHOP:INSTRUCTIONS": - $current_rdf_tag = "instructions"; - break; - case "PHOTOSHOP:TRANSMISSIONREFERENCE": - $current_rdf_tag = "transmission_reference"; - break; - case "PHOTOSHOP:SUPPLEMENTALCATEGORIES": - $current_rdf_tag = "supplemental_category"; - break; - case "XAPRIGHTS:WEBSTATEMENT": - $current_rdf_tag = "web_statement"; - break; - case "DC:TITLE": - $current_rdf_tag = "title"; - break; - case "DC:DESCRIPTION": - $current_rdf_tag = "caption"; - break; - case "DC:RIGHTS": - $current_rdf_tag = "copyright"; - break; - case "DC:CREATOR": - $current_rdf_tag = "author"; - break; - case "DC:SUBJECT": - $current_rdf_tag = "keyword"; - break; - } -} - -function RDF_EndElement($parser, $name) { - global $current_rdf_tag; - - /* reset current tag */ - switch ($name) { - case "TIFF:MAKE": - $current_rdf_tag = "not_implemented"; - break; - case "TIFF:MODEL": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:ISOSPEEDRATINGS": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:EXPOSUREPROGRAM": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:METERINGMODE": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:EXPOSURETIME": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:FNUMBER": - $current_rdf_tag = "not_implemented"; - break; - case "EXIF:FOCALLENGTH": - $current_rdf_tag = "not_implemented"; - break; - case "AUX:SERIALNUMBER": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:DATECREATED": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:CAPTIONWRITER": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:CATEGORY": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:SUPPLEMENTALCATEGORIES": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:CITY": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:STATE": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:COUNTRY": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:CREDIT": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:SOURCE": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:HEADLINE": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:INSTRUCTIONS": - $current_rdf_tag = "not_implemented"; - break; - case "PHOTOSHOP:TRANSMISSIONREFERENCE": - $current_rdf_tag = "not_implemented"; - break; - case "XAPRIGHTS:WEBSTATEMENT": - $current_rdf_tag = "not_implemented"; - break; - case "DC:TITLE": - $current_rdf_tag = "not_implemented"; - break; - case "DC:DESCRIPTION": - $current_rdf_tag = "not_implemented"; - break; - case "DC:RIGHTS": - $current_rdf_tag = "not_implemented"; - break; - case "DC:CREATOR": - $current_rdf_tag = "not_implemented"; - break; - case "DC:SUBJECT": - $current_rdf_tag = "not_implemented"; - break; - } -} - - ?> diff --git a/src/include/search.2.php b/src/include/search.2.php index 05b3a74..18e1f56 100644 --- a/src/include/search.2.php +++ b/src/include/search.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -251,22 +251,22 @@ function argon_query($identifier, $cbir_host, $cbir_port, } -function display_effective_content_search($session_id, $photo_id) { - global $theme; +function display_effective_content_search($photo_id) { + global $thm_elem; global $cbir_host; global $cbir_port; if (($cbir_host == "") || ($cbir_port == "")) return FALSE; - print "\n"; - print "

    All Shop Categories in the SystemShop Categories
    IdDescriptionCreatedAdd
    $shop_category[0]$shop_category[1]".generate_date_html($shop_category[2], 'date', $viewer_id == "" ? 0 : 1). "EditDelete".$strings['generic']['edit']."".$strings['generic']['delete']."
    "; - print "\n"; + print "\n"; + print "
    "; + print $thm_elem['button.search']; print ""; - print "\n"; + print "\n"; print ""; print "
    "; print "\n"; @@ -282,19 +282,20 @@ function display_content_submit($type) { print "\n\n\n\n
    \n"; print ""; print "
    \n"; } -function submit_photo($database, $photo_id, $session_id, $index_algorithm) { +function submit_photo($database, $photo_id, $index_algorithm) { global $site_url; global $cbir_host; global $cbir_port; global $image_repository_path; + $session_id = session_id(); $verbose = TRUE; if (($cbir_host == "") || ($cbir_port == "")) @@ -355,12 +356,13 @@ function submit_photo($database, $photo_id, $session_id, $index_algorithm) { return TRUE; } -function audit_photo($database, $photo_id, $session_id) { +function audit_photo($database, $photo_id) { global $site_url; global $cbir_host; global $cbir_port; global $image_repository_path; + $session_id = session_id(); $verbose = TRUE; if (($cbir_host == "") || ($cbir_port == "")) @@ -551,19 +553,19 @@ function create_argon_algorithm_combo($item, $algorithm_list, $value) { foreach ($algorithm_list as $element) { $combined_name = $element['name'].":".$element['version']; - $combo = $combo.""; } - $combo = $combo.""; + $combo .= ""; return $combo; } diff --git a/src/include/search.php b/src/include/search.php index f0f0444..41c81c3 100644 --- a/src/include/search.php +++ b/src/include/search.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -18,19 +18,31 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA include_once "stemming.php"; -include_once "config.php"; -if (!$cbir_host || !$cbir_port) { - $search_interface = array("text_general" => array("idx" => 1, "active_img" => "$theme/navigator.search.general.a.gif", "img" => "$theme/navigator.search.general.gif", link => "search.text.general.php", "alt" => " General Text "), - "text_advanced" => array("idx" => 2, "active_img" => "$theme/navigator.search.advanced.a.gif", "img" => "$theme/navigator.search.advanced.gif", link => "search.text.advanced.php", "alt" => " Advanced Text ")); -} -else { - $search_interface = array("text_general" => array("idx" => 1, "active_img" => "$theme/navigator.search.general.a.gif", "img" => "$theme/navigator.search.general.gif", link => "search.text.general.php", "alt" => " General Text "), - "text_advanced" => array("idx" => 2, "active_img" => "$theme/navigator.search.advanced.a.gif", "img" => "$theme/navigator.search.advanced.gif", link => "search.text.advanced.php", "alt" => " Advanced Text "), - "image_layout" => array("idx" => 3, "active_img" => "$theme/navigator.search.layout.a.gif", "img" => "$theme/navigator.search.layout.gif", link => "search.image.layout.php", "alt" => " Image Layout "), - "image_color" => array("idx" => 4, "active_img" => "$theme/navigator.search.color.a.gif", "img" => "$theme/navigator.search.color.gif", link => "search.image.color.php", "alt" => " Image Color ")); +$search_interface = array(); +$search_type_string = array(); + +function search_i18n_data() { + global $strings; + global $search_interface; + global $search_type_string; + global $cbir_host; + global $cbir_port; + + $search_type_string = array ($strings['search']['photos'], + $strings['search']['folders'], + $strings['search']['users']); + + $search_interface = array("text_general" => array("idx" => 1, 'link' => "search.text.general.php", "alt" => $strings['search']['gen_text']), + "text_advanced" => array("idx" => 2, 'link' => "search.text.advanced.php", "alt" => $strings['search']['adv_text'])); + + if ($cbir_host || $cbir_port) { + $search_interface["image_layout"] = array("idx" => 3, 'link' => "search.image.layout.php", "alt" => $strings['search']['img_layout']); + $search_interface["image_color"] = array("idx" => 4, 'link' => "search.image.color.php", "alt" => $strings['search']['img_color']); + } } +$generate_i18n_data[] = "search_i18n_data"; function build_itemized_search_string($search_string, $identifier, $arguments) { $itemized_search_string = ""; @@ -62,7 +74,7 @@ function validate_search_string($search_string) { return $search_string; } -function prepare_keyword($keyword, $enable_stemming) { +function prepare_keyword($keyword, $enable_stemming, $search_type) { global $forbidden_keywords; global $ignored_keywords; @@ -112,7 +124,7 @@ function prepare_keyword($keyword, $enable_stemming) { return " ~* '".$keyword."'"; } -function extract_keywords($search_string, $enable_stemming) { +function extract_keywords($search_string, $enable_stemming, $search_type) { /* detect quotation marks and replace spaces with the #@# marker so */ /* that strings between quotation marks are treated as one keyword */ /* when tokenizing the search string for operators */ @@ -155,26 +167,23 @@ function extract_keywords($search_string, $enable_stemming) { while ($token) { if (strncmp($token, "AND", 3) == 0) { $token = strtok("+ \n\t"); - $token = prepare_keyword($token, $enable_stemming); + $token = prepare_keyword($token, $enable_stemming, $search_type); if ($token) - $keyword = array_merge($keyword, array($index => array("operator"=>"AND", keyword=>"$token"))); - } - elseif (strncmp($token, "NOT", 3) == 0) { + $keyword = array_merge($keyword, array($index => array("operator"=>"AND", "keyword"=>"$token"))); + } elseif (strncmp($token, "NOT", 3) == 0) { $token = strtok("+ \n\t"); - $token = prepare_keyword($token, $enable_stemming); + $token = prepare_keyword($token, $enable_stemming, $search_type); if ($token) - $keyword = array_merge($keyword, array($index => array("operator"=>"NOT", keyword=>"$token"))); - } - elseif (strncmp($token, "OR", 2) == 0) { + $keyword = array_merge($keyword, array($index => array("operator"=>"NOT", "keyword"=>"$token"))); + } elseif (strncmp($token, "OR", 2) == 0) { $token = strtok("+ \n\t"); - $token = prepare_keyword($token, $enable_stemming); + $token = prepare_keyword($token, $enable_stemming, $search_type); if ($token) - $keyword = array_merge($keyword, array($index => array("operator"=>"OR", keyword=>"$token"))); - } - else { - $token = prepare_keyword($token, $enable_stemming); + $keyword = array_merge($keyword, array($index => array("operator"=>"OR", "keyword"=>"$token"))); + } else { + $token = prepare_keyword($token, $enable_stemming, $search_type); if ($token) - $keyword = array_merge($keyword, array($index => array("operator"=>"AND", keyword=>"$token"))); + $keyword = array_merge($keyword, array($index => array("operator"=>"AND", "keyword"=>"$token"))); } $token = strtok("+ \n\t"); $index ++; @@ -233,29 +242,26 @@ function build_sql_search_string($keywords, $sql_field_name) { return $sql_search_string; foreach($keywords as $keyword) { - if (strncmp($keyword[operator], "AND", 3) == 0) { + if (strncmp($keyword['operator'], "AND", 3) == 0) { if ($sql_search_string == "") - $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword[keyword]); + $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword['keyword']); else - $sql_search_string = sprintf("%s and %s %s", $sql_search_string, $sql_field_name, $keyword[keyword]); - } - elseif (strncmp($keyword[operator], "NOT", 3) == 0) { + $sql_search_string = sprintf("%s and %s %s", $sql_search_string, $sql_field_name, $keyword['keyword']); + } elseif (strncmp($keyword['operator'], "NOT", 3) == 0) { if ($sql_search_string == "") - $sql_search_string = sprintf("%s !%s", $sql_field_name, $keyword[keyword]); + $sql_search_string = sprintf("%s !%s", $sql_field_name, $keyword['keyword']); else - $sql_search_string = sprintf("%s and %s !%s", $sql_search_string, $sql_field_name, $keyword[keyword]); - } - elseif (strncmp($keyword[operator], "OR", 2) == 0) { + $sql_search_string = sprintf("%s and %s %s", $sql_search_string, $sql_field_name, $keyword['keyword']); + } elseif (strncmp($keyword['operator'], "OR", 2) == 0) { if ($sql_search_string == "") - $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword[keyword]); + $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword['keyword']); else - $sql_search_string = sprintf("%s or %s %s", $sql_search_string, $sql_field_name, $keyword[keyword]); - } - else { + $sql_search_string = sprintf("%s or %s %s", $sql_search_string, $sql_field_name, $keyword['keyword']); + } else { if ($sql_search_string == "") - $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword[keyword]); + $sql_search_string = sprintf("%s %s", $sql_field_name, $keyword['keyword']); else - $sql_search_string = sprintf("%s and %s %s", $sql_search_string, $sql_field_name, $keyword[keyword]); + $sql_search_string = sprintf("%s and %s %s", $sql_search_string, $sql_field_name, $keyword['keyword']); } } @@ -265,25 +271,4 @@ function build_sql_search_string($keywords, $sql_field_name) { return $sql_search_string; } - -function generate_html_users_combo($identifier, $database, $current_user_id, $style) { - global $user_type; - - $user_list = pg_query($database, "select identifier, last_name, first_name, member_since from users where users.type > $user_type[client] order by last_name, first_name"); - - $html_string .= ""; - return $html_string; -} - ?> diff --git a/src/include/settings.php b/src/include/settings.php deleted file mode 100644 index 460d9ad..0000000 --- a/src/include/settings.php +++ /dev/null @@ -1,34 +0,0 @@ - array("idx" => 1, "active_img" => "$theme/navigator.set.identification.a.gif", "img" => "$theme/navigator.set.identification.gif", link => "my.settings.php?selector=1", "alt" => " Identification "), - "contact" => array("idx" => 2, "active_img" => "$theme/navigator.set.contact.info.a.gif", "img" => "$theme/navigator.set.contact.info.gif", link => "my.settings.php?selector=2", "alt" => " Contact Information "), - "calendar" => array("idx" => 3, "active_img" => "$theme/navigator.set.calendar.a.gif", "img" => "$theme/navigator.set.calendar.gif", link => "my.settings.php?selector=3", "alt" => " Calendar "), - "search" => array("idx" => 4, "active_img" => "$theme/navigator.set.search.engine.a.gif", "img" => "$theme/navigator.set.search.engine.gif", link => "my.settings.php?selector=4", "alt" => " Search Engine "), - "photo_browser" => array("idx" => 5, "active_img" => "$theme/navigator.set.photo.browser.a.gif", "img" => "$theme/navigator.set.photo.browser.gif", link => "my.settings.php?selector=5", "alt" => " Photo Browser "), - "photo_upload" => array("idx" => 6, "active_img" => "$theme/navigator.set.photo.upload.a.gif", "img" => "$theme/navigator.set.photo.upload.gif", link => "my.settings.php?selector=6", "alt" => " Photo Upload "), - "printer" => array("idx" => 7, "active_img" => "$theme/navigator.set.printer.a.gif", "img" => "$theme/navigator.set.printer.gif", link => "my.settings.php?selector=7", "alt" => " Printer ")); - -$settings_client_data = array("identification" => array("idx" => 1, "active_img" => "$theme/navigator.set.identification.a.gif", "img" => "$theme/navigator.set.identification.gif", link => "my.settings.php?selector=1", "alt" => " Identification "), - "contact" => array("idx" => 2, "active_img" => "$theme/navigator.set.contact.info.a.gif", "img" => "$theme/navigator.set.contact.info.gif", link => "my.settings.php?selector=2", "alt" => " Contact Information "), - "calendar" => array("idx" => 3, "active_img" => "$theme/navigator.set.calendar.a.gif", "img" => "$theme/navigator.set.calendar.gif", link => "my.settings.php?selector=3", "alt" => " Calendar "), - "search" => array("idx" => 4, "active_img" => "$theme/navigator.set.search.engine.a.gif", "img" => "$theme/navigator.set.search.engine.gif", link => "my.settings.php?selector=4", "alt" => " Search Engine "), - "photo_browser" => array("idx" => 5, "active_img" => "$theme/navigator.set.photo.browser.a.gif", "img" => "$theme/navigator.set.photo.browser.gif", link => "my.settings.php?selector=5", "alt" => " Photo Browser ")); - -?> diff --git a/src/include/site.php b/src/include/site.php index f71deae..4796c5c 100644 --- a/src/include/site.php +++ b/src/include/site.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -22,9 +22,20 @@ include_once "common.php"; include_once "vars.php"; include_once "database.php"; -function site_prolog() { - global $po_cookie; +function site_prolog($min_type = PO_USER_TYPE_DISABLED) { global $po_user; + global $po_options; + global $po_options_default; + global $default_cred_timeout; + global $po_session_lifetime; + global $po_session_path; + global $strings; + global $theme; + global $dayNames; + global $monthNames; + global $generate_i18n_data; + + global $passwords; $sybase = FALSE; // if magic quotes is enabled @@ -53,29 +64,139 @@ function site_prolog() { if ($dbh == FALSE) return FALSE; + /* Start up session */ + ini_set("session.cache_expire", $po_session_lifetime / 60); + ini_set("session.gc_maxlifetime", "$po_session_lifetime"); + if ($po_session_path != "") session_save_path($po_session_path); + session_name("po_session"); + session_start(); + /* See if user is logged in; Set up session data.. */ - if (isset($_COOKIE[$po_cookie])) { - $session_id = pg_escape_string($_COOKIE[$po_cookie]); + if (isset($_SESSION['po_user'])) { + $new_user = $_SESSION['po_user']; + + foreach ($new_user as $key => $value) { + $po_user[$key] = $new_user[$key]; + } + + /* Set last request time */ + $po_user['last_request'] = time(); + } + + $po_user['session_id'] = session_id(); + + /* And then set up option data */ + if (isset($_SESSION['po_options'])) { + $options = $_SESSION['po_options']; - $res = pg_query($dbh, "SELECT identifier, type, preferences, username, first_name, last_name, password - FROM users - WHERE session_id='$session_id'"); - if (($res != FALSE) && pg_num_rows($res)) { - $row = pg_fetch_assoc($res); - $po_user['id'] = $row['identifier']; - $po_user['type'] = $row['type']; - $po_user['session'] = $session_id; - $po_user['prefs'] = $row['preferences']; - $po_user['username'] = $row['username']; - $po_user['first_name'] = $row['first_name']; - $po_user['last_name'] = $row['last_name']; - $po_user['password'] = $row['password']; + foreach ($options as $key => $value) { + $po_options[$key] = $options[$key]; } } + /* Periodically refresh our cached credentials & preferences */ + if (($po_user['id'] != 0) && + ($po_user['last_updated'] + $default_cred_timeout) < time()) { + /* Update preferences and credentials */ + refresh_user_prefs($dbh); + } + + $tmp = array_merge($po_user['passwords'], $po_options['passwords']); + $passwords = pg_escape_string(implode("," , $tmp)); + + /* See if request updated things any -- Don't store! */ + if (isset($_REQUEST['order_by']) && isset($_REQUEST['order_by_req'])) { + $po_options['order_by'] = $_REQUEST['order_by']; + } + if (isset($_REQUEST['photo_view'])) { + $po_options['photo_view'] = $_REQUEST['photo_view']; + } + + if (isset($_REQUEST['photos_per_page']) && isset($_REQUEST['per_page_req'])) { + $po_options['photos_per_page'] = $_REQUEST['photos_per_page']; + } + if (isset($_REQUEST['rows_list_view']) && isset($_REQUEST['per_page_req'])) { + $po_options['rows_list_view'] = $_REQUEST['rows_list_view']; + } + + /* If a language tag is set, use it. */ + if (isset($_REQUEST['lang'])) + $po_options['lang'] = $_REQUEST['lang']; + + /* Update session details. */ + site_update_session(FALSE); + + /* And now, close it out to release locks */ + session_write_close(); + + /* Sanity check in case the cookie gets screwed up */ + if (($min_type == PO_USER_TYPE_DISABLED) && !$po_user['type']) { + session_start(); + setcookie(session_name(), '', time()-3600); + session_destroy(); + } + + /* Ensure user has minimum permissions for this page */ + if ($po_user['type'] < $min_type) { + switch ($min_type) { + case PO_USER_TYPE_ADMIN: + site_push_error($strings['errors']['admin_perm']); + break; + case PO_USER_TYPE_USER: + site_push_error($strings['errors']['user_perm']); + break; + case PO_USER_TYPE_CLIENT: + site_push_error($strings['errors']['client_perm']); + break; + default: + site_push_error($strings['errors']['insuff_perm']); + break; + } + + header("Location: login.php"); + site_epilog($dbh); + exit(); + } + + /* Set up the locale settings and whatnot */ + include "lang/".$po_options['lang'].".php"; + + foreach ($generate_i18n_data as $fn) { + $fn(); + } + setlocale(LC_ALL, $strings['formats']['locale_names']); + $foo = localeconv(); + $strings['formats']['decimal'] = $foo['decimal_point']; + $strings['formats']['thousands'] = $foo['thousands_sep']; + setlocale(LC_NUMERIC, 'POSIX', 'C'); + return $dbh; } +/* Updates the session state to match current configuration */ +function site_update_session($start_sess=TRUE) { + global $po_options; + global $po_user; + + if ($po_user['session_id']) + session_id($po_user['session_id']); + + if ($start_sess) + session_start(); + + if ($po_user['auto_login']) { + $res = setcookie(session_name(), session_id(), time()+157680000); + // site_push_error("auto_login = $po_user[auto_login], cookie = $res, sess = $po_user[session_id], start_sess = $start_sess"); + $po_user['auto_login'] = FALSE; + } + + $_SESSION['po_options'] = $po_options; + $_SESSION['po_user'] = $po_user; + + if ($start_sess) + session_write_close(); +} + function site_epilog($database) { pg_close($database); } @@ -87,42 +208,33 @@ function site_adv() { print "
    "; print $ad_script; print "
    "; - } -} - -function site_logo($align) { - global $site_url; - global $site_title; - - print "
    \"Photo
    \n"; -} - -function site_credit($align, $show_version, $framed) { - global $color; - - if ($framed) { - print "\n"; - print "\n"; - print "
    \n"; - } - - print "
    "; - if ($show_version) { - $php_version = version(); - print "Powered by Photo Organizer v$php_version
    \n"; } - - print "Copyright © 2002-2006 Balint Kis, © 2005-2007 Solomon Peachy, and is available under the terms of the GNU GPL.\n"; - print "
    \n"; - - if ($framed) { - print "
    \n"; } } -function site_head($page_title) { - global $theme; +function site_logo() { + global $thm_elem; + + print "
    $thm_elem[site_logo]
    \n"; + +} + +function site_credit() { + global $strings; + global $po_version; + + print "
    "; + + print $strings['generic']['po_powered_by'] ." v$po_version
    \n"; + print $strings['generic']['po_copyright']; + + print "
    \n"; +} + +function site_head($page_title, $title_b = "") { global $compress_pages; global $site_title; + global $thm_elem; + global $strings; if ($compress_pages && ini_get('zlib.output_compression') == '' && @@ -134,366 +246,212 @@ function site_head($page_title) { ob_start('ob_gzhandler'); } + header("Content-Type: text/html; charset=".$strings['formats']['encoding']); +/* + header("Content-Type: application/xhtml+xml"); + print "\n"; +*/ print ""; - print ""; + print ""; print "\n"; - print "$site_title : $page_title\n"; - print "\n"; - print "\n"; - print "\n"; + print "$site_title : $page_title". ($title_b != "" ? " : $title_b" : "") ."\n"; - print ""; + print "\n"; + print "\n"; + print "\n"; - print ""; - print ""; - print ""; + // print "\n"; + + print ""; + + print $thm_elem['shortcut_icon']; + print $thm_elem['stylesheets']; + + print ""; + print $thm_elem['javascript']; print "\n"; } -function site_header($page_width, $page_title) { - global $color; +function site_header($page_title, $title_b = "") { global $po_user; - global $user_type; global $install_enabled; + global $strings; - site_head($page_title); + site_head($page_title, $title_b); - print "\n"; + print "\n"; - - if (($po_user['type'] == $user_type['administrator']) && + print "\n"; + + if (($po_user['type'] == PO_USER_TYPE_ADMIN) && ($po_user['username'] == 'admin') && ($po_user['password'] == 'admin')) { - print "

    You are using the default admin account and -have not changed the default password. This is a major security risk!

    \n"; + site_push_error($strings['errors']['default_admin']); } if ($install_enabled) { - print "

    You have the installer script enabled. Please set \$install_enabled=0 in your config_site.php to disable the installer. Continuing with it enabled is a security risk!

    \n"; + site_push_error($strings['errors']['install_enabled']); } - print "\n"; - print "\n\n\n"; - print "\n\n\n"; - print "
    \n"; - site_logo("left"); + site_dump_errors(); + + site_logo(); site_adv(); + + print "
    \n"; } function site_foot() { print "\n"; } +function err_str($error) { + return "$error"; +} + +function site_push_error($error) { + global $po_user; + + session_id($po_user['session_id']); + + session_start(); + $_SESSION['errors'][] = $error; + session_write_close(); +} + +function site_dump_errors() { + global $po_user; + + session_id($po_user['session_id']); + session_start(); + + if (isset($_SESSION['errors']) && count($_SESSION['errors']) > 0) { + print "
    \n"; + print "
      \n"; + foreach ($_SESSION['errors'] as $error) { + print "
    • $error
    • \n"; + } + print "
    \n"; + print "
    \n"; + } + + $_SESSION['errors'] = array(); + session_write_close(); +} + function site_footer($database) { - print "
    \n"; - site_credit("center", true, true); - print "
    \n"; - print " 
    \n"; + print " \n"; + + site_credit(); site_foot(); } function site_navigator_status($left_string, $right_string) { - global $color; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    $left_string$right_string
    \n"; - - print "
    \n"; + print "
    "; + print ""; + print "
    "; + print "$left_string\n"; + print ""; + print "$right_string\n"; + print "
    "; + print "
    "; print "\n"; } function site_navigator_stand_alone($database, $sub_menu) { - site_navigator($sub_menu); } -function site_navigator($sub_menu) { - global $theme; - global $user_type; - global $po_user; - - $type = $po_user['type']; - - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - - print "\n"; - print "\n"; - print "
    \n"; - print "\n"; - print "\n"; - - if ($type >= $user_type['user']) { - print "\n"; - } else if ($type == $user_type['client']) { - print "\n"; - } - - if ($type >= $user_type['client']) { - print "\n"; - } - - if ($type >= $user_type['user']) { - print "\n"; - } - - if ($type >= $user_type['client']) { - print "\n"; - } - - if ($type >= $user_type['user']) { - print "\n"; - } - - if ($user_type['disabled'] < $type && $type < $user_type['administrator']) { - print "\n"; - } - - if ($type == $user_type['administrator']) { - print "\n"; - } - - print "\n"; - - print "\n"; - print "
    "; - if ($sub_menu==5) - { - print "\"My"; - } else { - print "\"My"; - } - print ""; - if ($sub_menu==5) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==8) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==6) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==7) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==10) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==11) - print "\"My"; - else - print "\"My"; - print ""; - if ($sub_menu==9) - print "\"Admin\""; - else - print "\"Admin\""; - print "
    \n"; - print "
    \n"; - - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - print "\n"; - print "
    "; - if ($sub_menu==1) - print "\"Users\""; - else - print "\"Users\""; - print ""; - if ($sub_menu==2) - print "\"Search\""; - else - print "\"Search\""; - print ""; - if ($type == "" || $type == $user_type['disabled']) { - if ($sub_menu==3) - print "\"Login\""; - else - print "\"Login\""; - } - else { - if ($sub_menu==3) - print "\"Logout\""; - else - print "\"Logout\""; - } - print ""; - if ($sub_menu==4) - print "\"Help\""; - else - print "\"Help\""; - print "
    \n"; - print "
    \n"; - print "\n"; -} - function site_search_entry($align, $size) { - global $theme; + global $strings; + global $thm_elem; - print "
    "; + print ""; print ""; print ""; print "
    "; - print ""; + print ""; print ""; - print "\n"; + print $thm_elem['button.search']; print "
    "; print "
    "; } -function site_display_photo($database, $identifier, $framed) { - global $default_popup_enable; - global $default_popup_delay; - global $user_type; +function site_display_photo($database, $identifier, $framed, $version = FALSE) { global $access; global $po_user; + global $po_options; + global $passwords; - if ($po_user['type'] == $user_type['disabled']) { - $my_data[0] = $default_popup_enable; - $my_data[1] = $default_popup_delay; + if ($version === FALSE) { + $version = "photo_version.master = 't'"; } else { - $my_data = pg_fetch_row(pg_query($database, "select popup_enable, popup_delay from users, preferences where users.identifier=$po_user[id] and users.preferences=preferences.identifier")); + $version = "photo_version.identifier = '$version' "; } - $photo_owner_data = pg_fetch_row(pg_query($database, "select users from photo where photo.identifier=$identifier")); - - if (($po_user['id'] == $photo_owner_data[0]) || - ($po_user['type'] == $user_type['administrator'])) { - $sql_query_photo_access_rights_string = ""; - } else { - $client = pg_fetch_row(pg_query($database, "select identifier from client where users=$photo_owner_data[0] and client=$po_user[id] and status=2")); - if ($client == "") { - $sql_query_photo_access_rights_string = "and photo.access_rights = $access[public]"; - } else { - $sql_query_photo_access_rights_string = "and photo.access_rights < $access[private]"; - } - } - - $photo_data = pg_query($database, - "select photo.identifier, photo_version.small_image_path, photo.caption, photo.date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + $query = + "select photo.identifier, photo.caption, photo.date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - views, - (select is_photo_for_sale(photo.identifier)) as for_sale, - photo.title, photo.author, '' as keyword - from photo, photo_dupe, photo_version + views, photo.users, + photo.title, photo.author, photo_version.identifier as version + from photo, photo_version where photo.identifier = '$identifier' and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_dupe.key = 1 - and photo_version.master = 't' - $sql_query_photo_access_rights_string"); + and $version + and can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; + + $photo_data = pg_query($database, $query); if (pg_num_rows($photo_data) < 1) return; - display_photo_slides("folder", 0, 1, "", $photo_data, 1, 1, $my_data[0], $my_data[1], false, $framed, ""); + display_photo_slides("folder", "", $photo_data, 0, 1, $framed, FALSE); } -function site_display_random_photos($database, $type, $identifier, $rows, $columns, $framed) { - global $theme; +function site_display_random_photos($database, $type, $identifier, $num_of_photos, $framed) { global $po_user; - global $default_popup_enable; - global $default_popup_delay; - global $user_type; global $access; - - $num_of_photos = $rows * $columns; - - if ($po_user['type'] == $user_type['disabled']) { - $my_data[0] = $default_popup_enable; - $my_data[1] = $default_popup_delay; - } else { - $my_data = pg_fetch_row(pg_query($database, "select popup_enable, popup_delay from users, preferences where users.identifier=$po_user[id] and users.preferences=preferences.identifier")); - } + global $po_options; + global $passwords; switch ($type) { case "user": $sql_photo_selector = "photo.users = ".$identifier; $sql_extra_tables = ""; $display_type = "folder"; - $owner_data[0] = $identifier; + break; + case "album": + $sql_photo_selector = "photo_version.identifier = album_content.version and photo.identifier = album_content.photo and album_content.album=".$identifier; + $sql_extra_tables = ", album_content"; + $display_type = "album"; break; default: case "folder": $sql_photo_selector = "photo.folder = ".$identifier; $sql_extra_tables = ""; $display_type = "folder"; - $owner_data = pg_fetch_row(pg_query($database, "select users from folder where folder.identifier=$identifier")); - break; - case "album": - $sql_photo_selector = "photo.identifier = album_content.photo and album_content.album=".$identifier; - $sql_extra_tables = ", album_content"; - $display_type = "album"; - $owner_data = pg_fetch_row(pg_query($database, "select users from album where album.identifier=$identifier")); break; } - if (($po_user['id'] == $photo_owner_data[0]) || - ($po_user['type'] == $user_type['administrator'])) { - $sql_query_photo_access_rights_string = ""; - } else { - if ($owner_data[0] != "" && $po_user['type'] > $user_type['disabled']) - $client = pg_fetch_row(pg_query($database, "select identifier from client where users='$owner_data[0]' and client='$po_user[id]' and status=2")); - - if ($client == "") { - $sql_query_photo_access_rights_string = "and photo.access_rights = $access[public]"; - } else { - $sql_query_photo_access_rights_string = "and photo.access_rights < $access[private]"; - } - } - - $photo_data = pg_query($database, - "select photo.identifier, photo_version.small_image_path, photo.caption, photo.date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + $query = + "select photo.identifier, photo.caption, photo.date_of_exposure, photo.date_added, photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - views, - (select is_photo_for_sale(photo.identifier)) as for_sale, - photo.title, photo.author, '' as keyword - from photo, photo_dupe, photo_version $sql_extra_tables + views, photo.users, + photo.title, photo.author, photo_version.identifier as version + from photo, photo_version $sql_extra_tables where $sql_photo_selector and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_dupe.key = 1 - and photo_version.master = 't' - $sql_query_photo_access_rights_string + and can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') order by random() - limit $num_of_photos"); + limit $num_of_photos"; + + $photo_data = pg_query($database, $query); $num_of_photos = pg_num_rows($photo_data); - display_photo_slides($display_type, 0, 1, $identifier, $photo_data, $num_of_photos, $rows, $my_data[0], $my_data[1], false, $framed, ""); + display_photo_slides($display_type, $identifier, $photo_data, 0, $num_of_photos, $framed, FALSE); } function site_display_user_name($database, $identifier, $link) { @@ -505,26 +463,4 @@ function site_display_user_name($database, $identifier, $link) { print "$user_name[0] $user_name[1]"; } -function display_box_with_header($title, $message, $width, $align) { - global $theme; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    $title
    \n$message\n
    \n"; -} - ?> diff --git a/src/include/tools.php b/src/include/tools.php index d442312..728b8c0 100644 --- a/src/include/tools.php +++ b/src/include/tools.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,491 +17,206 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +$tools_data = array(); + +function tools_i18n_data() { + global $strings; + global $tools_data; + global $cbir_host; + + $tools_data = array("bulkupdate" => array("idx" => 1, 'link' => "my.tools.php?selector=1", "alt" => $strings['generic']['bulk_update']), + "generator" => array("idx" => 2, 'link' => "my.tools.php?selector=2", "alt" => $strings['tools']['xml_template_generator']), + "converter" => array("idx" => 3, 'link' => "my.tools.php?selector=3", "alt" => $strings['tools']['xml_converter'])); + + if ($cbir_host != "") { + $tools_data['content_indexer'] = array("idx" => 4, 'link' => "my.tools.php?selector=4", "alt" => $strings['tools']['content_indexer']); + } +} + +$generate_i18n_data[] = "tools_i18n_data"; + include_once "common.php"; include_once "search.2.php"; -$tools_data = array("bulkupdate" => array("idx" => 1, "active_img" => "$theme/navigator.tl.bulkupdate.a.gif", "img" => "$theme/navigator.tl.bulkupdate.gif", 'link' => "my.tools.php?selector=1", "alt" => " Bulk Update "), - "shop_item_maker" => array("idx" => 2, "active_img" => "$theme/navigator.tl.shop.item.generator.a.gif", "img" => "$theme/navigator.tl.shop.item.generator.gif", 'link' => "my.tools.php?selector=2", "alt" => " Shop Item Generator "), - "generator" => array("idx" => 3, "active_img" => "$theme/navigator.tl.xmlgen.a.gif", "img" => "$theme/navigator.tl.xmlgen.gif", 'link' => "my.tools.php?selector=3", "alt" => " XML Template Generator "), - "converter" => array("idx" => 4, "active_img" => "$theme/navigator.tl.xmlconv.a.gif", "img" => "$theme/navigator.tl.xmlconv.gif", 'link' => "my.tools.php?selector=4", "alt" => " XML Converter "), - "content_indexer" => array("idx" => 5, "active_img" => "$theme/navigator.tl.content.indexer.a.gif", "img" => "$theme/navigator.tl.content.indexer.gif", 'link' => "my.tools.php?selector=5", "alt" => " Content Indexer ")); +function display_xml_template_generator($database) { + global $thm_elem; + global $strings; + global $po_user; -function display_xml_template_generator($database, $user_id) { - global $style; - global $color; - global $theme; + print "
    \n"; - $users_location = pg_query($database, "select identifier, country, state, city, place from view_location order by country, state, city, place"); - $users_folder = pg_query($database, "select identifier, caption, parent_folder from folder where users=$user_id and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); - $users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$user_id"); - $users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens where users=$user_id"); - $users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$user_id"); - $users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$user_id"); - $users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$user_id"); - $users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$user_id"); - $users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$user_id"); - - $aperture = pg_query($database, "select identifier, value from aperture"); - $focal_length = pg_query($database, "select identifier, value from focal_length"); - $shutter = pg_query($database, "select identifier, value from shutter"); - $ev_comp = pg_query($database, "select identifier, value from ev_comp"); - $camera_metering = pg_query($database, "select identifier, value from camera_metering"); - $camera_program = pg_query($database, "select identifier, value from camera_program"); - $flash_mode = pg_query($database, "select identifier, value from flash_mode"); - $scan_resolution = pg_query($database, "select identifier, value from scan_resolution"); - $scan_bitdepth = pg_query($database, "select identifier, value from scan_bitdepth"); - $scan_multiscan = pg_query($database, "select identifier, value from scan_multiscan"); - $iso_override = pg_query($database, "select identifier, value from film_iso"); - - print "\n"; - - print " 
    "; - - print "\n"; - print "\n"; - print "\n"; + print "
    Fill in the image details and default values
    \n"; + print "\n"; + print "\n"; print "\n"; - print "\n"; - print "".emit_td($strings['tools']['base_file']); + print "\n\n"; - print "\n\n\n"; - print "\n".emit_td($strings['tools']['start_num'])."\n\n"; - print "".emit_td($strings['tools']['num_photos'])."\n\n"; + print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + display_iptc_form($database, FALSE, "", "", "", "", "", "", "", "", "", + $strings['photo']['copyright']." (c) " . date("Y") . " $po_user[first_name] $po_user[last_name]", + "", "", "", "", "", 0, "t", "t", "", ""); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + +display_photo_tech_form($database, FALSE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + "", "", "", ""); + print "
    ".$strings['tools']['fill_in_image_details']."
    Image file name"; - print ""; + print "
    "; + print ""; - print ""; for ($i=1; $i < 11; $i++) { - print "
    Start number"; - print ""; print "
    Number of frames"; - print ""; + print "
    "; + print ""; print "
    Folder "; - display_folder_combo("folder", $users_folder, $current_folder, ""); + print "
    "; + print ""; + print "
    Folder"; + display_folder_combo("folder", get_users_folder($database), "", ""); print "
    Title"; - print "
    Author"; - print "
    Keywords"; - print "
    Caption"; - print "
    Exposure date"; - display_date_input_form("exposure_timestamp", ""); - print "
    Location"; - display_combo("location", $users_location, 0, ", ", 1); - print "
    Storage Location"; + print "
    ".$strings['import']['storage_location'].""; display_storage_location_combo("storage_location_type", ""); - print " - - : - "; - print "
    Access"; - display_access_combo("access_rights", "t", ""); - print "
    High Resolution Original"; - display_hide_original_combo("hide_original", "t"); - print "
    Camera"; - display_combo("camera", $users_camera, 0, "", 0); - print "
    Camera Metering\n"; - display_combo("camera_metering", $camera_metering, 0, "", 0); - print "
    Camera Program\n"; - display_combo("camera_program", $camera_program, 0, "", 0); - print "
    Lens\n"; - display_lens_combo("lens", $users_lens, 0, 0, 0); - print "
    Focal Length\n"; - display_combo("focal_length", $focal_length, 0, "", 0); - print "
    Filter\n"; - display_combo("filter", $users_filter, 0, "", 0); - print "
    Film\n"; - display_combo("film", $users_film, 0, "", 0); - print "
    Film ISO Override\n"; - display_combo("iso_override", $iso_override, 0, "", 0); - print "
    Aperture\n"; - display_combo("aperture", $aperture, 0, "", 0); - print "
    Shutter Speed\n"; - display_combo("shutter", $shutter, 0, "", 0); - print "
    Exposure Compensation\n"; - display_combo("exp_comp", $ev_comp, 0, "", 0); - print "
    Ev Difference\n"; - display_combo("exp_diff", $ev_comp, 0, "", 0); - print "
    Flash\n"; - display_combo("flash", $users_flash, 0, "", 0); - print "
    Flash Mode\n"; - display_combo("flash_mode", $flash_mode, 0, "", 0); - print "
    Flash Compensation\n"; - display_combo("flash_comp", $ev_comp, 0, "", 0); - print "
    Scanner\n"; - display_combo("scanner", $users_scanner, 0, "", 0); - print "
    Colorspace\n"; - display_colorspace_combo("colorspace", 1); - print "
    Scan Parameters\n"; - display_combo("scan_resolution", $scan_resolution, 0, "", 0); - print "dpi  \n"; - display_combo("scan_bitdepth", $scan_bitdepth, 0, "", 0); - print "bits  \n"; - display_combo("scan_multiscan", $scan_multiscan, 0, "", 0); - print "passes  \n"; - print "
    Support\n"; - display_combo("support", $users_support, 0, "", 0); - print "
    Copyright Statement"; - print "\n"; + print " - + : + "; print "
    \n"; - print " 
    "; - print ""; + print $thm_elem['button.submit']; + print $thm_elem['button.clear']; print "
    \n"; } -function display_bulk_update($database, $user_id, $url, $rule_identifier) { - global $style; - global $color; - global $theme; +function display_bulk_update($database, $url, $type, $selection) { + global $po_user; + global $thm_elem; + global $strings; - $users_location = pg_query($database, "select identifier, country, state, city, place from view_location order by country, state, city, place"); - $users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$user_id"); - $users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens where users=$user_id"); - $users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$user_id"); - $users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$user_id"); - $users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$user_id"); - $users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$user_id"); - $users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$user_id"); + $num_photos = photos_in_spool($database); - $aperture = pg_query($database, "select identifier, value from aperture"); - $focal_length = pg_query($database, "select identifier, value from focal_length"); - $shutter = pg_query($database, "select identifier, value from shutter"); - $ev_comp = pg_query($database, "select identifier, value from ev_comp"); - $camera_metering = pg_query($database, "select identifier, value from camera_metering"); - $camera_program = pg_query($database, "select identifier, value from camera_program"); - $flash_mode = pg_query($database, "select identifier, value from flash_mode"); - $scan_resolution = pg_query($database, "select identifier, value from scan_resolution"); - $scan_bitdepth = pg_query($database, "select identifier, value from scan_bitdepth"); - $scan_multiscan = pg_query($database, "select identifier, value from scan_multiscan"); - $iso_override = pg_query($database, "select identifier, value from film_iso"); + print "
    \n"; - $users_folder = pg_query($database, "select identifier, caption, parent_folder from folder where users=$user_id and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); - $users_album = pg_query($database, "select identifier, caption, parent_album from album where users=$user_id and caption!='Spool' order by date_of_creation desc"); - - /* New spool code, disabled for now - $users_spool = pg_query($database, "select album.identifier from album where caption = 'Spool' and users = $user_id"); - $spool_album=pg_fetch_row($users_spool); - $photos_in_spooler = pg_query($database, "select photo from album_content where album = $spool_album[0] group by photo order by photo"); - $num_photos = pg_num_rows($photos_in_spooler); - */ - - print "\n"; - - print " 
    "; - - print "\n"; - print "\n"; - print "\n"; + print "
    Search Criteria
    \n"; + print "\n"; + print "\n"; print "\n"; - print "\n"; - print "\n"; - - /* New spool code, disabled for now - if ($num_photos > 0) { - print "\n"; + if ($type == "folder") { + $checked = "checked=\"checked\""; + $sel = $selection; + } else { + $checked = ""; + $sel = ""; } - */ - - print "
    ".$strings['generic']['search_criteria']."
    Folder"; - display_folder_combo("select_folder", $users_folder, $current_folder, "all"); - print "
    Album"; - display_album_combo("select_album", $users_album, $current_album, ""); - print "
    Spool"; - print "Photos in spool: $num_photos"; - print ""; - print "
    \n"; - - print "

     

    "; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "
    Action
    Regenerate thumbnail and preview"; - display_yes_no_combo("set_generate_images", ""); - print "
    Title"; - print "
    Author"; - print "
    Set Keywords"; - print "
    Clear Keywords"; - print "
    Headline"; - print "
    Caption Writer"; - print "
    Caption"; - print "
    Category"; - print "
    Supplemental Category"; - print "
    Credit"; - print "
    Copyright Statement "; - print "\n"; - - print "
    Web Statement"; - print "
    Instructions"; - print "
    Source"; - print "
    Transmission Reference"; - print "
    Date of Exposure"; - display_date_input_form("set_date_of_exposure", ""); - print "
    Location"; - display_combo("set_location", $users_location, "0", ", ", 1); - print "
    Access"; - display_access_combo("set_access_rights", "", "null"); - print "
    High Resolution Original"; - display_hide_original_combo("set_hide_original", ""); - print "
    Camera"; - display_combo("set_camera", $users_camera, "", "", 0); - print "
    Camera Metering\n"; - display_combo("set_camera_metering", $camera_metering, "", "", 0); - print "
    Camera Program\n"; - display_combo("set_camera_program", $camera_program, "", "", 0); - print "
    Lens\n"; - display_lens_combo("set_lens", $users_lens, "", 0, 0); - print "
    Focal Length\n"; - display_combo("set_focal_length", $focal_length, "", "", 0); - print "
    Filter\n"; - display_combo("set_filter", $users_filter, "", "", 0); - print "
    Film\n"; - display_combo("set_film", $users_film, "", "", 0); - print "
    Film ISO Override\n"; - display_combo("set_iso_override", $iso_override, "", "", 0); - print "
    Aperture"; - display_combo("set_aperture", $aperture, "", "", 0); - print "
    Shutter Speed\n"; - display_combo("set_shutter", $shutter, "", "", 0); - print "
    Exposure Compensation\n"; - display_combo("set_exp_comp", $ev_comp, "", "", 0); - print "
    Ev Difference\n"; - display_combo("set_exp_diff", $ev_comp, "", "", 0); - print "
    Flash\n"; - display_combo("set_flash", $users_flash, "", "", 0); - print "
    Flash Mode\n"; - display_combo("set_flash_mode", $flash_mode, "", "", 0); - print "
    Flash Compensation\n"; - display_combo("set_flash_comp", $ev_comp, "", "", 0); - print "
    Colorspace\n"; - display_colorspace_combo("colorspace", 1); - print "
    Scanner\n"; - display_combo("set_scanner", $users_scanner, "", "", 0); - print "
    Scan Parameters\n"; - display_combo("set_scan_resolution", $scan_resolution, "", "", 0); - print "dpi  \n"; - display_combo("set_scan_bitdepth", $scan_bitdepth, "", "", 0); - print "bits  \n"; - display_combo("set_scan_multiscan", $scan_multiscan, "", "", 0); - print "passes  \n"; - print "
    Support\n"; - display_combo("set_support", $users_support, "", "", 0); - print "
    \n"; - - print " 
    "; - - print ""; - print "

    \n"; -} - - -function display_shop_item_generator($database, $user_id) { - global $style; - global $color; - global $theme; - - print ""; - - $users_folder = pg_query($database, "select identifier, caption, parent_folder from folder where users=$user_id and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); - $all_user_rules = pg_query($database, " - select identifier, shop_category, shop_item, currency, price, comment, date_of_creation, date_of_last_edit - from view_shop_item_generator_rule - where users=$user_id"); - - print " 
    "; - - print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    Search Criteria
    Folder"; - display_folder_combo("select_folder", $users_folder, $current_folder, "all"); - print "
    \n"; - - print " 
    \n"; - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - for ($f=0; $f < pg_num_rows($all_user_rules); $f++) { - $rules = pg_fetch_row($all_user_rules, $f); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print ""; + print emit_td($strings['generic']['folder'] . " "); + print "\n"; + if ($type == "album") { + $checked = "checked=\"checked\""; + $sel = $selection; + } else { + $checked = ""; + $sel = ""; + } + print ""; + print emit_td($strings['generic']['album'] ." "); + print "\n"; + if ($num_photos > 0) { + if ($type == "spool") + $checked = "checked=\"checked\""; + else + $checked = ""; + print ""; + print emit_td("".$strings['spool']['name'].""); + print emit_td($strings['spool']['photos_in'].": $num_photos");; print "\n"; } - print "\n"; - print "\n"; - print "\n"; - print "\n"; + if ($selection != "" && $type == "list") { + $checked = "checked=\"checked\""; + + print "\n"; + } print "
    Create Shop Items
     CategoryItemCurrencyPriceRemarkAdd Rule
    $rules[1]$rules[2]$rules[3]$rules[4]$rules[5]EditDelete
    "; + display_folder_combo("select_folder", get_users_folder($database), $sel, "all"); + print " ".$strings['generic']['recursive']."
    "; + display_album_combo("select_album", get_users_album($database), $sel, "null"); + print " ".$strings['generic']['recursive']."
    Remove all shop items in the specified folder.
    ".$strings['generic']['selection']." "; + print ""; + $array = explode(",", $selection); + foreach ($array as $item) { + print "# $item "; + } + print "
    \n"; - print " 
    \n"; - print "\n"; + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "".emit_td($strings['tools']['regenerate_thumb']); + print emit_td(emit_yes_no_combo("set_generate_images", 'f')); + print "\n"; + + display_iptc_form($database, TRUE, "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", 0, "", "", "", ""); + + display_photo_tech_form($database, TRUE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + "", "", "", ""); + + print "
    ".$strings['generic']['action']."
    \n"; + print $thm_elem['button.submit']; + print $thm_elem['button.clear']; print "
    \n"; - - print " 
    \n"; - } -function display_content_indexer($database, $user_id, $url, $session_id) { - global $style; - global $color; - global $theme; +function display_content_indexer($database, $url) { + global $po_user; + global $strings; + global $thm_elem; - $users_folder = pg_query($database, "select identifier, caption, parent_folder from folder where users=$user_id and caption!='Trash' and caption!='Orphanage' order by date_of_creation desc"); + $num_photos = photos_in_spool($database); - print " 
    "; + print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "
    Search Criteria
    \n"; + print "\n"; + print "\n"; print "\n"; - print ""; + print emit_td($strings['generic']['folder'] . ""); + print "\n"; + print ""; + print emit_td($strings['generic']['album'] .""); + print "\n"; + if ($num_photos > 0) { + print ""; + print emit_td("".$strings['generic']['spool'].""); + print emit_td($strings['spool']['photos_in'].": $num_photos");; + print "\n"; + } print "
    ".$strings['generic']['search_criteria']."
    Folder"; - display_folder_combo("select_folder", $users_folder, 0, "all"); + print "
    "; + display_folder_combo("select_folder", get_users_folder($database), "", "all"); print "
    "; + display_album_combo("select_album", get_users_album($database), "", "null"); + print "
    \n"; - print " 
    \n"; - - print "\n"; - print ""; - print "
    \n"; display_content_submit("type"); - print "
    \n"; - print " 
    \n"; - print "\n"; - print "
    \n"; - print " 
    \n"; + print $thm_elem['button.submit']; + print $thm_elem['button.clear']; + print "\n"; } ?> diff --git a/src/include/vars.php b/src/include/vars.php index c2869a2..a825e55 100644 --- a/src/include/vars.php +++ b/src/include/vars.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,72 +17,102 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "config.php"; + /*****************************************************/ + /* DO NOT CHANGE ANY OF THE VALUES IN THIS FILE */ + /*****************************************************/ -/* do not change these values! */ -$access = array("public" => 1, - "protected" => 2, - "private" => 3); +define("PO_ACCESS_PUBLIC", 1); +define("PO_ACCESS_PROTECTED", 2); +define("PO_ACCESS_PRIVATE", 3); -/* do not change these values! */ -$user_type = array("disabled" => 1, - "client" => 2, - "user" => 3, - "administrator" => 4); +$access = array("public" => PO_ACCESS_PUBLIC, + "protected" => PO_ACCESS_PROTECTED, + "private" => PO_ACCESS_PRIVATE, + PO_ACCESS_PUBLIC => "public", + PO_ACCESS_PROTECTED => "protected", + PO_ACCESS_PRIVATE => "private", + "Public" => "public", + "Private" => "private", + "Protected" => "protected" ); -/* do not change these values! */ -$client_status = array("pending" => 1, - "accepted" => 2, - "rejectetd" => 3); +define("PO_CLIENT_PENDING", 1); +define("PO_CLIENT_ACCEPTED", 2); +define("PO_CLIENT_REJECTED", 3); + +$client_status = array("pending" => PO_CLIENT_PENDING, + "accepted" => PO_CLIENT_ACCEPTED, + "rejected" => PO_CLIENT_REJECTED, + PO_CLIENT_PENDING => "Pending", + PO_CLIENT_ACCEPTED => "Accepted", + PO_CLIENT_REJECTED => "Rejected", + "Pending" => "pending", + "Accepted" => "accepted", + "Rejected" => "rejected" ); + +define("PO_USER_TYPE_DISABLED", 1); +define("PO_USER_TYPE_CLIENT", 2); +define("PO_USER_TYPE_USER", 3); +define("PO_USER_TYPE_ADMIN", 4); + +$po_user = array("id" => 0, + "type" => PO_USER_TYPE_DISABLED, + "hide" => 'f', + + "last_request" => 0, + "last_updated" => 0, -/* Initial default value for the userid array -- do not change! */ -$po_user = array("id" => FALSE, - "type" => $user_type['disabled'], - "session" => FALSE, - "prefs" => FALSE, "username" => FALSE, - "first_name" => FALSE, - "last_name" => FALSE); + "first_name" => "", + "last_name" => "", + "company" => "", + "address1" => "", + "address2" => "", + "city" => "", + "zipcode" => "", + "state" => "", + "country" => "", + "phone" => "", + "email" => "", + "url" => "", + + "passwords" => array(), + + "spool_album" => FALSE, + "trash_folder" => FALSE, + + "auto_login" => FALSE, + "session_id" => FALSE, + + ); + +$strings = array(); +$thm_elem = array(); +$passwords = ""; -/* do not change these values! */ $realpath = dirname($_SERVER['SCRIPT_FILENAME']) . "/im" ; $icc_profiles = array("1" => array("name" => "sRGB", "file" => $realpath . "/sRGB.icm"), "2" => array("name" => "Adobe RGB 1998", "file" => $realpath. "/AdobeRGB1998.icc"), "3" => array("name" => "Nikon Base NEF", "file" => $realpath . "/NKDBase_NEF.icm"), + "4" => array("name" => "Kodak ProPhoto RGB", "file" => $realpath . "/ProPhoto.icm"), "99" => array("name" => "Embedded", "file" => "")); -if (!function_exists('substr_compare')) { - function substr_compare($main_str, $str, $offset, $length = NULL, $case_insensitivity = false) { - $offset = (int) $offset; +$generate_i18n_data = array(); - // Throw a warning because the offset is invalid - if ($offset >= strlen($main_str)) { - trigger_error('The start position cannot exceed initial string length.', E_USER_WARNING); - return false; - } - // We are comparing the first n-characters of each string, so let's use the PHP function to do it - if ($offset == 0 && is_int($length) && $case_insensitivity === true) { - return strncasecmp($main_str, $str, $length); - } +/* PHP's internal symlink function is unreliable. + Some versions always create absolute symlinks, + while others create relative symlinks. + Sigh. */ - // Get the substring that we are comparing - if (is_int($length)) { - $main_substr = substr($main_str, $offset, $length); - $str_substr = substr($str, 0, $length); - } else { - $main_substr = substr($main_str, $offset); - $str_substr = $str; - } - - // Return a case-insensitive comparison of the two strings - if ($case_insensitivity === true) { - return strcasecmp($main_substr, $str_substr); - } - - // Return a case-sensitive comparison of the two strings - return strcmp($main_substr, $str_substr); - } +function po_symlink($src, $dest) { + chdir(dirname($src)); + $src = escapeshellarg(basename($src)); + $dest = escapeshellarg($dest); + $retval; + system("ln -s $src $dest", $retval); + + return ($retval == 0); } + ?> diff --git a/src/index.php b/src/index.php index e097488..88e5ca9 100644 --- a/src/index.php +++ b/src/index.php @@ -1,101 +1,15 @@ - - +if (is_readable("index_site.php")) { + include "index_site.php"; +} else { + include "index_site.php.dist"; +} - - Photo Organizer Demonstration page - - - - - - - - -
    - - - - - - -
    - - - -
    -

     

    - -

    Welcome to the Photo Organizer demo/test site!

    - -

    This site is running a current snapshot of the code that will make it into the next release of Photo Organizer.

    - -

    As this is a moving target, if something doesn't appear to work, please file a bug ticket.

    - -

    For more information about Photo Organizer's features and releases, see the Photo Organizer web site.

    - -

    Nearly all features are enabled. Feel free to create an account, upload some photos, and generally get a feel for how Photo Organizer works.

    - -

    Please note that inactive accounts will be periodically deleted; this particular installation is for QA/testing, demonstration, and evaluatition only.

    - -
    - -
    - -
    - -
    - -
  • magic_quotes_runtime() turned -on! Workaround present, but we recommend you disable this to prevent -subtle bugs from appearing.
  • "; -} -if ($mquotes) { - print "
    • magic_quotes_gpc() -turned on! Workaround present, but we recommend you disable this to prevent -subtle bugs from appearing.
    "; -} - ?> - - 
    - - - - diff --git a/src/index.store.php b/src/index.store.php deleted file mode 100644 index 1d461bf..0000000 --- a/src/index.store.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - Photo Organizer - - - - - - - - - -
    - - - -

    -Today's featured photographer:

    - - -
    -

    Photo of the Week

    - -
    - -
    -

    Featured Photo

    - -
    - -
    - -
    - diff --git a/src/install.php b/src/install.php index 1756f9a..0ed2965 100644 --- a/src/install.php +++ b/src/install.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -116,6 +116,11 @@ $versions = array("(none)" => array("db_file" => "po.db.02.32.to.02.33.sql", "dat_file" => "po.data.02.32.to.02.33.sql", "post" => "po231_232_upgrade"), + "2.33" => + array("db_file" => "po.db.02.33.to.02.34.sql", + "dat_file" => "po.data.02.33.to.02.34.sql", + "post" => "po233_234_post_migration", + "pre" => "po233_234_pre_migration"), ); /* =============================================================== */ @@ -128,7 +133,7 @@ function po205_new_install($dbh) { $new_install = TRUE; print "
  • Creating initial image repository..."; if (file_exists("$image_repository_path/$first_volume")) { - print "FAILED (directory exists!)
  • \n"; + print "FAILED (repository already exists under $image_repository_path)\n"; return FALSE; } $res = mkdir("$image_repository_path/$first_volume", 0755); @@ -358,10 +363,403 @@ function po232_keyword_migrate($dbh) { } function po231_232_upgrade($dbh) { + + $res = pg_query($dbh, "begin"); + $res = po232_keyword_migrate($dbh); if ($res) $res = po232_iptc_exif($dbh); + if ($res !== FALSE) { + $res = pg_query($dbh, "commit"); + } else { + $res = pg_query($dbh, "rollback"); + return FALSE; + } + + return $res; +} + +function po_symlink($src, $dest) { + chdir(dirname($src)); + $src = escapeshellarg(basename($src)); + $dest = escapeshellarg($dest); + $retval; + system("ln -s $src $dest", $retval); + + return ($retval == 0); +} + +function po233_234_pre_migration($dbh) { + global $po_options_default; + global $image_repository_path; + + $res = TRUE; + + if (!readlink($image_repository_path."/current")) { + /* Migrate the 'current volume' pref into the filesystem directly */ + $system_preferences = pg_fetch_row(pg_query($dbh, "select current_volume from system_preferences")); + $new_volume = $system_preferences[0]; + $res = po_symlink($new_volume, "$image_repository_path/current"); + + if (!$res) + return $res; + } + + /* ... detect bogus images ... */ + $bogus = array(); + $files = array(); + $versions = pg_query($dbh, "SELECT identifier, small_image_path, medium_image_path, large_image_path, photo FROM photo_version order by identifier"); + + for ($i = 0 ; $i < pg_num_rows($versions) ; $i++) { + $row = pg_fetch_row($versions, $i); + + /* Check original file type */ + $file_type = strtolower(substr($row[3], strrpos($row[3], ".") + 1)); + if ( + // ($file_type == "xmp") || + !is_readable("$image_repository_path/$row[1]") || + !is_readable("$image_repository_path/$row[2]") || + !is_readable("$image_repository_path/$row[3]")) { + $bogus[] = $row[4]; + $files[] = "$image_repository_path/$row[1]"; + $files[] = "$image_repository_path/$row[2]"; + $files[] = "$image_repository_path/$row[3]"; + } + } + + /* If we don't find any bogus images ... */ + if (count($bogus) == 0) { + return TRUE; + } + + $list = implode(", ", $bogus); + + print "
    • Deleting bogus images ( $list )...
    • "; + + $res = pg_query($dbh, "begin"); + + /* ... nuke them from the database ... */ + $queries = array("delete from photo_keywords where photo in ($list)", + "delete from photo_spooler where photo in ($list)", + "delete from album_content where photo in ($list)", + "delete from submission where photo_dupe in (select photo_dupe.identifier from photo_dupe where photo_dupe.photo in ($list))", + "delete from photo_dupe where photo in ($list)", + "delete from photo_version where photo in ($list)", + "delete from photo_tech where photo in ($list)", + "delete from rating where photo in ($list)", + "delete from photo where identifier in ($list)"); + + foreach ($queries as $query) { + $res = pg_query($dbh, $query); + if (!$res) { + print "
    • $query
    • "; + break; + } + } + + /* ... then delete the files ... */ + if ($res) { + $err = error_reporting(0); + foreach ($files as $file) { + print "
    • $file
    • "; + unlink("$file"); + } + error_reporting($err); + pg_query($dbh, "commit"); + print "
    • ...done.
    "; + } else { + print "
  • ".pg_last_error($dbh)."
  • "; + pg_query($dbh, "rollback"); + print "
  • ...FAILED!
  • "; + } + + return $res; +} + +function po233_234_post_migration($dbh) { + $res = po233_234_migrateprefs($dbh); + + if ($res) + $res = po233_234_migrate_photo_files($dbh); + + return $res; +} + +function po233_234_migrateprefs($dbh) { + global $po_options_default; + + $user_list = array(); + print("
      "); + + $res = pg_query($dbh, "begin"); + + $users = pg_query($dbh, "select identifier from users order by identifier"); + while (($user = pg_fetch_row($users)) != FALSE) { + $user_list[] = $user[0]; + } + + print("
    • Migrating user preferences...
    • "); + + // XXX loop through each userid, and do this: + foreach ($user_list as $user) { + $po_user = array("id" => $user); + $options = array(); + + $user_data = pg_fetch_row(pg_query($dbh, "select username, password, first_name, last_name, company, contact, preferences, imagemagick_options, imagemagick_composite_options, dcraw_options, type from users where identifier='$po_user[id]'")); + + print("
    • Migrating '$user_data[0]' (# $po_user[id])
    • "); + + $po_user['prefs_id'] = $user_data[6]; + $po_user['im_id'] = $user_data[7]; + $po_user['im_composite_id'] = $user_data[8]; + $po_user['dcraw_id'] = $user_data[9]; + + /* Basic preferences */ + $preferences = pg_fetch_row(pg_query($dbh, " + select print_out, start_hour, end_hour, start_day, + folder_view, paper, label, popup_enable, popup_delay, search_enable_stemming, + search_default_mode, download_counter, download_expiry_period, shop_enable, + bulk_upload_enable, quota_size, quota_count + from preferences + where identifier=$po_user[prefs_id]")); + + $options['print_out'] = $preferences[0]; + $options['start_hour'] = $preferences[1]; + $options['end_hour'] = $preferences[2]; + $options['start_day'] = $preferences[3]; + $options['photo_view'] = $preferences[4]; + $options['paper'] = $preferences[5]; + $options['label'] = $preferences[6]; + $options['popup_enable'] = $preferences[7]; + $options['popup_delay'] = $preferences[8]; + $options['search_enable_stemming'] = $preferences[9]; + $options['search_engine_type'] = $preferences[10]; + $options['bulk_upload_enable'] = $preferences[14]; + $options['quota_size'] = $preferences[15]; + $options['quota_count'] = $preferences[16]; + + /* Raw imports */ + $dcraw_options = pg_fetch_row(pg_query($dbh, " + select gamma, brightness, white_balance, bitdepth + from dcraw_options + where dcraw_options.identifier = $po_user[dcraw_id]")); + + $options['dcraw_gamma'] = $dcraw_options[0]; + $options['dcraw_brightness'] = $dcraw_options[1]; + $options['dcraw_white_balance'] = $dcraw_options[2]; + $options['dcraw_bitdepth'] = $dcraw_options[3]; + + /* Watermarking */ + $imagemagick_composite_options = pg_fetch_row(pg_query($dbh, " + select gravity, watermark, (select photo from photo_version where identifier = imagemagick_composite_options.photo_version) + from imagemagick_composite_options + where imagemagick_composite_options.identifier=$po_user[im_composite_id]")); + + $options['watermark_location'] = $imagemagick_composite_options[0]; + $options['watermark_brightness'] = $imagemagick_composite_options[1]; + $options['watermark_photo'] = $imagemagick_composite_options[2]; + + /* Preview & Thumbnail stuffs */ + $imagemagick_options = pg_fetch_row(pg_query($dbh, " + select preview_quality, preview_colorspace, preview_gamma, + preview_sharpen_radius, preview_sharpen_sigma, + preview_sharpen_amount, preview_sharpen_threshold, + preview_border_width, preview_border_height, preview_border_color, + thumb_quality, thumb_colorspace, thumb_gamma, + thumb_sharpen_radius, thumb_sharpen_sigma, + thumb_sharpen_amount, thumb_sharpen_threshold, + thumb_border_width, thumb_border_height, thumb_border_color + from imagemagick_options + where identifier=$po_user[im_id]")); + + $options['preview_quality'] = $imagemagick_options[0]; + $options['preview_color_space'] = $imagemagick_options[1]; + $options['preview_gamma'] = $imagemagick_options[2]; + $options['preview_sharpen_radius'] = $imagemagick_options[3]; + $options['preview_sharpen_sigma'] = $imagemagick_options[4]; + $options['preview_sharpen_amount'] = $imagemagick_options[5]; + $options['preview_sharpen_threshold'] = $imagemagick_options[6]; + $options['preview_border_width'] = $imagemagick_options[7]; + $options['preview_border_height'] = $imagemagick_options[8]; + $options['preview_border_color'] = $imagemagick_options[9]; + + $options['thumb_quality'] = $imagemagick_options[10]; + $options['thumb_color_space'] = $imagemagick_options[11]; + $options['thumb_gamma'] = $imagemagick_options[12]; + $options['thumb_sharpen_radius'] = $imagemagick_options[13]; + $options['thumb_sharpen_sigma'] = $imagemagick_options[14]; + $options['thumb_sharpen_amount'] = $imagemagick_options[15]; + $options['thumb_sharpen_threshold'] = $imagemagick_options[16]; + $options['thumb_border_width'] = $imagemagick_options[17]; + $options['thumb_border_height'] = $imagemagick_options[18]; + $options['thumb_border_color'] = $imagemagick_options[19]; + + /* Now dump the preference crap into the new table */ + + foreach ($options as $key => $value) { + $key = pg_escape_string($key); + $value = pg_escape_string($value); + if ($value == "") continue; + if ($po_options_default[$key] == $value) continue; // Only migrate if they're not default! + $res = pg_query($dbh, "INSERT INTO user_preferences(owner, key, value) VALUES ($po_user[id], '$key', '$value')"); + if ($res === FALSE) { + print("
      Can't migrate prefs: $owner, $key, $value
      "); + break; + } + } + } + + print "
    • All users migrated
    • "; + print("
    "); + + if ($res) { + $res = pg_query($dbh, "ALTER TABLE users DROP preferences"); + } + if ($res) { + $res = pg_query($dbh, "ALTER TABLE users DROP imagemagick_options"); + } + if ($res) { + $res = pg_query($dbh, "ALTER TABLE users DROP imagemagick_composite_options"); + } + if ($res) { + $res = pg_query($dbh, "ALTER TABLE users DROP dcraw_options"); + } + if ($res) { + $res = pg_query($dbh, "DROP TABLE imagemagick_options"); + } + if ($res) { + $res = pg_query($dbh, "DROP TABLE imagemagick_composite_options"); + } + if ($res) { + $res = pg_query($dbh, "DROP TABLE dcraw_options"); + } + if ($res) { + $res = pg_query($dbh, "DROP TABLE preferences"); + } + if ($res) { + $res = pg_query($dbh, "DROP SEQUENCE imagemagick_options_id_sequence"); + } + if ($res) { + $res = pg_query($dbh, "DROP SEQUENCE imagemagick_composite_options_id_sequence"); + } + if ($res) { + $res = pg_query($dbh, "DROP SEQUENCE dcraw_options_id_sequence"); + } + if ($res) { + $res = pg_query($dbh, "DROP SEQUENCE preferences_id_sequence"); + } + + if ($res) { + $res = pg_query($dbh, "commit"); + return TRUE; + } + + $res = pg_query($dbh, "rollback"); + print "
  • !!!" . pg_last_error($dbh) . "
  • \n"; + return FALSE; +} + + +function po_get_image_size($file) { + global $sys_exiftool; + + $width = 0; + $height = 0; + + $handle = popen("$sys_exiftool -ImageWidth -ImageHeight $file", "r"); + if ($handle) { + while (!feof($handle)) { + $line = fgets($handle); + $parts = explode(":", $line, 2); + $parts[0] = trim($parts[0]); + if (!isset($parts[1])) continue; + $parts[1] = trim($parts[1]); + if ($parts[0] == "Image Width") $width = $parts[1]; + if ($parts[0] == "Image Height") $height = $parts[1]; + //print "\n"; + } + pclose($handle); + } + + if (!$width || !$height) { + print "
  • File $file not recognisable as an image!
  • "; + } + + return array($width,$height); +} + +function po233_234_migrate_photo_files($dbh) { + global $image_repository_path; + + $res = TRUE; + + print("
      "); + + print "
    • Migrating photo file table....
    • "; + + $versions = pg_query($dbh, "SELECT identifier, small_image_path, medium_image_path, large_image_path, date_changed, photo FROM photo_version WHERE identifier not in (select distinct version from files) order by identifier"); + for ($i = 0 ; $i < pg_num_rows($versions) ; $i++) { + $row = pg_fetch_row($versions, $i); + + print "
    • Migrating photo $row[5] version $row[0]
    • "; + + $res = pg_query($dbh, "begin"); + + /* Small image */ + $image_dimension = po_get_image_size($image_repository_path."/".$row[1]); + $size = filesize($image_repository_path."/".$row[1]); + $query = "INSERT INTO files (identifier, version, size, x_res, y_res, path, created, filesize, params, comments, watermark) VALUES ((select nextval('files_id_sequence')), $row[0], 1, $image_dimension[0], $image_dimension[1], '$row[1]', '$row[4]', $size, '', '', null)"; + $res = pg_query($dbh, $query); + + /* Preview image */ + if ($res) { + $image_dimension = po_get_image_size($image_repository_path."/".$row[2]); + $size = filesize($image_repository_path."/".$row[2]); + $query = "INSERT INTO files (identifier, version, size, x_res, y_res, path, created, filesize, params, comments, watermark) VALUES ((select nextval('files_id_sequence')), $row[0], 2, $image_dimension[0], $image_dimension[1], '$row[2]', '$row[4]', $size, '', '', null)"; + $res = pg_query($dbh, $query); + } + + /* Original image */ + if ($res) { + $image_dimension = po_get_image_size($image_repository_path."/".$row[3]); + $size = filesize($image_repository_path."/".$row[3]); + $query = "INSERT INTO files (identifier, version, size, x_res, y_res, path, created, filesize, params, comments, watermark) VALUES ((select nextval('files_id_sequence')), $row[0], 3, $image_dimension[0], $image_dimension[1], '$row[3]', '$row[4]', $size, '', '', null)"; + $res = pg_query($dbh, $query); + } + + if ($res) { + $res = pg_query($dbh, "commit"); + } else { + print "
    • $query
    • "; + pg_query($dbh, "abort"); + break; + } + flush(); + } + + if ($res || $i == 0) { + /* Ensure we have something left */ + $res = pg_query($dbh, "begin"); + $res = pg_fetch_row(pg_query($dbh, "SELECT count(*) from photo_version where identifier not in (select distinct version from files)")); + if ($res[0] == 0) { + $res = pg_query($dbh, "drop view view_random_photo"); + $res = pg_query($dbh, "drop view view_photo"); + $res = pg_query($dbh, "alter table photo_version drop small_image_path"); + $res = pg_query($dbh, "alter table photo_version drop medium_image_path"); + $res = pg_query($dbh, "alter table photo_version drop large_image_path"); + } + if ($res) { + $res = pg_query($dbh, "commit"); + $res = TRUE; + } else { + pg_query($dbh, "abort"); + $res = FALSE; + } + } + + print "
    "; + return $res; } @@ -400,9 +798,10 @@ function po_process_db_file($dbh, $file) { $offset = strrpos($buffer, ";"); if (($quot == 0) && ($offset === (strlen($buffer)-1))) { $buffer = substr($buffer, 0, $offset); -# print ("EXEC:
    $buffer

    "); + # print ("
    $buffer

    \n"); $res = pg_query($dbh, $buffer); if ($res === FALSE) { + print ("
    -- FAILED: $buffer
    $res

    \n"); return FALSE; } $buffer = ""; @@ -411,6 +810,7 @@ function po_process_db_file($dbh, $file) { } fclose($fh); if ($quot == 1) { + print "
    Quoting problem...
    "; return FALSE; } @@ -467,6 +867,7 @@ $go = $_REQUEST['go']; $first_volume = "v0000"; $new_install = FALSE; +include "lang/en_US.php"; include "themes/aqua/theme.php"; print "Photo Organizer Installer"; @@ -488,8 +889,14 @@ if (!$install_enabled) { exit(0); } +if (phpversion() < "5.0") { + $x = phpversion(); + print "

    You are running PHP $x but Photo Organizer needs PHP >= 5.0

    \n"; + $go = 0; + } + if (!$image_repository_path || !is_writable($image_repository_path)) { - print "

    The image repository '$image_repository_path' not present or not writable by webserver. Please ensure the \$image_repository_path setting points to a valid directory.

    \n"; + print "

    The image repository '$image_repository_path' is not present or not writable by webserver. Please ensure the \$image_repository_path setting points to a valid directory.

    \n"; $go = 0; } @@ -552,7 +959,8 @@ if (!is_executable($sys_composite)) { $go = 0; } if (!is_executable($sys_exiftool)) { - print "

    ExifTool's exiftool utility is not installed at $sys_exiftool. This tool is optional, but we recommend its use for decoding image metadata. If it is installed, please enxure the \$sys_exif setting is correct.

    \n"; + print "

    ExifTool's exiftool utility is not installed at $sys_exiftool. This utility is required to decode image metadata, so please ensure it is installed, and that the \$sys_exiftool setting is correct.

    \n"; + $go = 0; } if (!is_executable($sys_dcraw)) { print "

    The dcraw utility is not installed at $sys_dcraw. This tool is required if you wish to work with RAW images, although ExifTool can be used in some circumstances. If it is installed, please ensure the \$sys_dcraw setting is correct.

    \n"; @@ -590,6 +998,8 @@ if (!$go) { exit(0); } +ini_set('max_execution_time', 0); /* Unlimited execution time! */ + $dbh = pg_connect($db_dsn); if ($dbh === FALSE) { @@ -599,6 +1009,14 @@ if ($dbh === FALSE) { exit(0); } +$pg_ver = pg_version($dbh); + +if ($pg_ver['server'] < "8.0") { + print "

    PostgreSQL 8.0 or newer is required! (Current is $pg_ver[server])

    "; + print ""; + exit(0); + } + # Installation steps: # su - postgres -c "psql template1 -c \"CREATE USER po_user WITH PASSWORD 'po_password' NOCREATEDB NOCREATEUSER;\"" @@ -614,6 +1032,14 @@ $version = po_get_version($dbh); print "

    Current Photo Organizer DB version: $version

    \n"; $res = TRUE; +/* XXXX + +if (po233_234_pre_migration($dbh)) { + po233_234_migrate_photo_files($dbh); + } +exit(); +*/ + while ($res) { $version = po_get_version($dbh); $row = $versions[$version]; @@ -661,6 +1087,7 @@ while ($res) { print "\n"; } + if ($res === TRUE) { print "

    Install/Upgrade to version $version complete.

    \n"; print "

    \n"; @@ -669,6 +1096,10 @@ if ($res === TRUE) { print "

    Correct the above errors, and try again. We will pick up where we left off.

    \n"; } +// po233_234_migrate_photo_files($dbh); + +/*********/ + print ""; exit(0); diff --git a/src/java/search.color/ColorSearch.java b/src/java/search.color/ColorSearch.java index 4d39c6a..f05d4db 100755 --- a/src/java/search.color/ColorSearch.java +++ b/src/java/search.color/ColorSearch.java @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/java/search.layout/LayoutSearch.java b/src/java/search.layout/LayoutSearch.java index 61d5428..a35e48a 100755 --- a/src/java/search.layout/LayoutSearch.java +++ b/src/java/search.layout/LayoutSearch.java @@ -3,7 +3,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, diff --git a/src/javascript/jscalendar/calendar.js b/src/javascript/jscalendar/calendar.js index 9088e0e..1d4f4bc 100644 --- a/src/javascript/jscalendar/calendar.js +++ b/src/javascript/jscalendar/calendar.js @@ -88,6 +88,7 @@ Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) ); Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) ); +Calendar.is_ie7up = ( Calendar.is_ie && parseFloat(navigator.userAgent.replace(/.*msie ([0-9]+).*/i, "$1" )) >= 7 ); /// detect Opera browser Calendar.is_opera = /opera/i.test(navigator.userAgent); @@ -1389,7 +1390,7 @@ Calendar.prototype.showAtElement = function (el, opts) { document.body.appendChild(cp); var br = Calendar.getAbsolutePos(cp); document.body.removeChild(cp); - if (Calendar.is_ie) { + if (Calendar.is_ie && !Calendar.is_ie7up) { br.y += document.body.scrollTop; br.x += document.body.scrollLeft; } else { diff --git a/src/javascript/jscalendar/lang/calendar-de.js b/src/javascript/jscalendar/lang/calendar-de.js index 4bc1137..754250c 100644 --- a/src/javascript/jscalendar/lang/calendar-de.js +++ b/src/javascript/jscalendar/lang/calendar-de.js @@ -43,6 +43,10 @@ Calendar._SDN = new Array "Sa", "So"); +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 0; + // full month names Calendar._MN = new Array ("Januar", diff --git a/src/javascript/jscalendar/lang/calendar-fr.js b/src/javascript/jscalendar/lang/calendar-fr.js index 2a9e0b2..1fca70e 100644 --- a/src/javascript/jscalendar/lang/calendar-fr.js +++ b/src/javascript/jscalendar/lang/calendar-fr.js @@ -1,125 +1,127 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// Translator: David Duret, from previous french version - -// full day names -Calendar._DN = new Array -("Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dim", - "Lun", - "Mar", - "Mar", - "Jeu", - "Ven", - "Sam", - "Dim"); - -// full month names -Calendar._MN = new Array -("Janvier", - "Février", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Août", - "Septembre", - "Octobre", - "Novembre", - "Décembre"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Avr", - "Mai", - "Juin", - "Juil", - "Aout", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A propos du calendrier"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Heure Selecteur\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" + -"Distribué par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." + -"\n\n" + -"Selection de la date :\n" + -"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" + -"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" + -"- Garder la souris sur n'importe quels boutons pour une selection plus rapide"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selection de l\'heure :\n" + -"- Cliquer sur heures ou minutes pour incrementer\n" + -"- ou Maj-clic pour decrementer\n" + -"- ou clic et glisser-deplacer pour une selection plus rapide"; - -Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; -Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; -Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; -Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; -Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; -Calendar._TT["SEL_DATE"] = "Sélectionner une date"; -Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; -Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fermer"; -Calendar._TT["TODAY"] = "Aujourd'hui"; -Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Sem."; -Calendar._TT["TIME"] = "Heure :"; +// ** I18N + +// Calendar FR language +// Author: Simon Billette, +// Encoding: any +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi", + "Dimanche"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Dim", + "Lun", + "Mar", + "Mar", + "Jeu", + "Ven", + "Sam", + "Dim"); + +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 1; + +// full month names +Calendar._MN = new Array +("Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Fev", + "Mar", + "Avr", + "Mai", + "Juin", + "Juil", + "Aout", + "Sep", + "Oct", + "Nov", + "Dec"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "A propos du calendrier"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; +Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; +Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; +Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; +Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; +Calendar._TT["SEL_DATE"] = "Sélectionner une date"; +Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; +Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Fermer"; +Calendar._TT["TODAY"] = "Aujourd'hui"; +Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%A %e %B %Y"; + +Calendar._TT["WK"] = "Sem."; +Calendar._TT["TIME"] = "Heure :"; diff --git a/src/javascript/jscalendar/lang/calendar-nl.js b/src/javascript/jscalendar/lang/calendar-nl.js index a1dea94..543d367 100644 --- a/src/javascript/jscalendar/lang/calendar-nl.js +++ b/src/javascript/jscalendar/lang/calendar-nl.js @@ -1,73 +1,127 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); - -Calendar._SDN_len = 2; - -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Info"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/Tijd Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + -"Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." + -"\n\n" + -"Datum selectie:\n" + -"- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + -"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + -"- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tijd selectie:\n" + -"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + -"- of Shift-klik om het te verlagen\n" + -"- of klik en sleep voor een snellere selectie."; - -//Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; -Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -//Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -//Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; - -Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "(vandaag)"; -Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Tijd:"; \ No newline at end of file +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Encoding: any +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag", + "Zondag"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Zo", + "Ma", + "Di", + "Wo", + "Do", + "Vr", + "Za", + "Zo"); + +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 1; + +// full month names +Calendar._MN = new Array +("Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "Over de kalendar"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + +"Verspreid onder GNU LGPL. See http://gnu.org/licenses/lgpl.html voor details." + +"\n\n" + +"Datum selectie:\n" + +"- Gebruik de \xab \xbb knoppen om het jaar te selecteren\n" + +"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om de maand te selecteren\n" + +"- Houd de muis ingedrukt op de boven genoemde knoppen voor een snellere selectie."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Tijd selectie:\n" + +"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + +"- of Shift-klik om het te verlagen\n" + +"- of klik en sleep voor een snellere selectie."; + +Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; +Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; +Calendar._TT["GO_TODAY"] = "Naar vandaag"; +Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; +Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; +Calendar._TT["SEL_DATE"] = "Selecteer datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; +Calendar._TT["PART_TODAY"] = " (vandaag)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Sluiten"; +Calendar._TT["TODAY"] = "Vandaag"; +Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om waarde te veranderen"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; + +Calendar._TT["WK"] = "wk"; +Calendar._TT["TIME"] = "Tijd:"; diff --git a/src/javascript/select.js b/src/javascript/select.js index 862e1d1..1adb654 100644 --- a/src/javascript/select.js +++ b/src/javascript/select.js @@ -3,7 +3,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,31 +16,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -var checked = false; - -function setChecked() { - dml = document.photoList; - len = dml.elements.length; - if (checked) { - checked = false; - } - else { - checked = true; - } - for(i = 0 ; i < len; i++) { - dml.elements[i].checked = checked; - } -} - -function changeImage(image, checkedImage, uncheckedImage) { - if (checked) { - document.images[image].src = checkedImage; - return; - } - - document.images[image].src = uncheckedImage; -} - function selectSkip() { if (!document.photoAdd.decode_exif[1].checked && !document.photoAdd.decode_exif[2].checked && @@ -120,19 +95,3 @@ function disabler3() { selectSkip(); } } - -function sig_uncheck_create() { - if (document.shop_item_generator.delete_all.checked) { - dml = document.shop_item_generator; - len = dml.elements.length; - for(i = 0 ; i < len; i++) { - if (document.shop_item_generator.delete_all != dml.elements[i]) { - dml.elements[i].checked = false; - } - } - } -} - -function sig_uncheck_del() { - document.shop_item_generator.delete_all.checked = false; -} diff --git a/src/javascript/util.js b/src/javascript/util.js deleted file mode 100644 index 0eaf7a8..0000000 --- a/src/javascript/util.js +++ /dev/null @@ -1,25 +0,0 @@ -/* -// Copyright (C) 2002, 2003, 2004, 2005, 2006 Balint Kis (balint@k-i-s.net) - - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - - -/* Contribted by Thomas Wenrich */ - -function tooltip_text(id) { - elem = document.getElementById(id); - return elem.innerHTML; -} diff --git a/src/javascript/wz_tooltip.js b/src/javascript/wz_tooltip.js index 031f652..fc32f1d 100644 --- a/src/javascript/wz_tooltip.js +++ b/src/javascript/wz_tooltip.js @@ -1,22 +1,28 @@ /* This notice must be untouched at all times. -wz_tooltip.js v. 3.27 +wz_tooltip.js v. 4.12 The latest version is available at http://www.walterzorn.com or http://www.devira.com or http://www.walterzorn.de -Copyright (c) 2002-2004 Walter Zorn. -Created 1. 12. 2002 by Walter Zorn (Web: http://www.walterzorn.com ) -Last modified: 14. 2. 2005 +Copyright (c) 2002-2007 Walter Zorn. All rights reserved. +Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com ) +Last modified: 13.7.2007 -Cross-browser tooltips working even in Opera 5 and 6, -as well as in NN 4, Gecko-Browsers, IE4+, Opera 7 and Konqueror. -No onmouseouts required. +Easy-to-use cross-browser tooltips. +Just include the script at the beginning of the section, and invoke +Tip('Tooltip text') from within the desired HTML onmouseover eventhandlers. +No container DIV, no onmouseouts required. +By default, width of tooltips is automatically adapted to content. +Is even capable of dynamically converting arbitrary HTML elements to tooltips +by calling TagToTip('ID_of_HTML_element_to_be_converted') instead of Tip(), +which means you can put important, search-engine-relevant stuff into tooltips. Appearance of tooltips can be individually configured -via commands within the onmouseovers. +via commands passed to Tip() or TagToTip(). +Tab Width: 4 LICENSE: LGPL This library is free software; you can redistribute it and/or @@ -32,477 +38,1112 @@ For more details on the GNU Lesser General Public License, see http://www.gnu.org/copyleft/lesser.html */ +var config = new Object(); -//////////////// GLOBAL TOOPTIP CONFIGURATION ///////////////////// -var ttBgColor = "#e6ecff"; -var ttBgImg = ""; // path to background image; -var ttBorderColor = "#003399"; -var ttBorderWidth = 1; -var ttDelay = 500; // time span until tooltip shows up [milliseconds] -var ttFontColor = "#000066"; -var ttFontFace = "arial,helvetica,sans-serif"; -var ttFontSize = "11px"; -var ttFontWeight = "normal"; // alternative is "bold"; -var ttOffsetX = 12; // horizontal offset of left-top corner from mousepointer -var ttOffsetY = 15; // vertical offset " -var ttPadding = 3; // spacing between border and content -var ttShadowColor = ""; -var ttShadowWidth = 0; -var ttTemp = 0; // time span after which the tooltip disappears; 0 (zero) means "infinite timespan" -var ttTextAlign = "left"; -var ttTitleColor = "#ffffff"; // color of caption text -var ttWidth = 300; -//////////////////// END OF TOOLTIP CONFIG //////////////////////// +//=================== GLOBAL TOOPTIP CONFIGURATION =========================// +var tt_Debug = true // false or true - recommended: false once you release your page to the public +var tt_Enabled = true // Allows to (temporarily) suppress tooltips, e.g. by providing the user with a button that sets this global variable to false +var TagsToTip = true // false or true - if true, the script is capable of converting HTML elements to tooltips + +// For each of the following config variables there exists a command, which is +// just the variablename in uppercase, to be passed to Tip() or TagToTip() to +// configure tooltips individually. Individual commands override global +// configuration. Order of commands is arbitrary. +// Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)" + +config. Above = false // false or true - tooltip above mousepointer? +config. BgColor = '#E4E7FF' // Background color +config. BgImg = '' // Path to background image, none if empty string '' +config. BorderColor = '#002299' +config. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed' +config. BorderWidth = 1 +config. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer +config. ClickClose = false // false or true - close tooltip if the user clicks somewhere +config. CloseBtn = false // false or true - closebutton in titlebar +config. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colors +config. CloseBtnText = ' X ' // Close button text (may also be an image tag) +config. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own +config. Delay = 400 // Time span in ms until tooltip shows up +config. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration +config. FadeIn = 0 // Fade-in duration in ms, e.g. 400; 0 for no animation +config. FadeOut = 0 +config. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load +config. Fix = null // Fixated position - x- an y-oordinates in brackets, e.g. [210, 480], or null for no fixation +config. FollowMouse = true // false or true - tooltip follows the mouse +config. FontColor = '#000044' +config. FontFace = 'Verdana,Geneva,sans-serif' +config. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory +config. FontWeight = 'normal' // 'normal' or 'bold'; +config. Left = false // false or true - tooltip on the left of the mouse +config. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer +config. OffsetY = 8 // Vertical offset +config. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent +config. Padding = 3 // Spacing between border and content +config. Shadow = false // false or true +config. ShadowColor = '#C0C0C0' +config. ShadowWidth = 5 +config. Sticky = false // Do NOT hide tooltip on mouseout? false or true +config. TextAlign = 'left' // 'left', 'right' or 'justify' +config. Title = '' // Default title text applied to all tips (no default title: empty string '') +config. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar +config. TitleBgColor = '' // If empty string '', BorderColor will be used +config. TitleFontColor = '#ffffff' // Color of title text - if '', BgColor (of tooltip body) will be used +config. TitleFontFace = '' // If '' use FontFace (boldified) +config. TitleFontSize = '' // If '' use FontSize +config. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// -////////////// TAGS WITH TOOLTIP FUNCTIONALITY //////////////////// -// List may be extended or shortened: -var tt_tags = new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s","small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer"); -///////////////////////////////////////////////////////////////////// - - -///////// DON'T CHANGE ANYTHING BELOW THIS LINE ///////////////////// -var tt_obj, // current tooltip -tt_objW = 0, tt_objH = 0, // width and height of tt_obj -tt_objX = 0, tt_objY = 0, -tt_offX = 0, tt_offY = 0, -xlim = 0, ylim = 0, // right and bottom borders of visible client area -tt_sup = false, // true if T_ABOVE cmd -tt_sticky = false, // tt_obj sticky? -tt_wait = false, -tt_vis = false, // tooltip visibility flag -tt_sub = false, // true while tooltip below mousepointer -tt_u = "undefined", -tt_inputs = new Array(), // drop-down-boxes to be hidden in IE -// Opera: disable href when hovering -tt_tag = null; // stores hovered dom node, href and previous statusbar txt - - -var tt_db = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null, -tt_n = navigator.userAgent.toLowerCase(); - -// Browser flags -var tt_op = !!(window.opera && document.getElementById), -tt_op6 = tt_op && !document.defaultView, -tt_op7 = tt_op && !tt_op6, -tt_ie = tt_n.indexOf("msie") != -1 && document.all && tt_db && !tt_op, -tt_n4 = (document.layers && typeof document.classes != tt_u), -tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != tt_u), -tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById; - -tt_n = ""; - - -function tt_Int(t_x) +//====================== PUBLIC ============================================// +function Tip() { - var t_y; - return isNaN(t_y = parseInt(t_x))? 0 : t_y; + tt_Tip(arguments, null); +} +function TagToTip() +{ + if(TagsToTip) + { + var t2t = tt_GetElt(arguments[0]); + if(t2t) + tt_Tip(arguments, t2t); + } } -function wzReplace(t_x, t_y) -{ - var t_ret = "", - t_str = this, - t_xI; - while((t_xI = t_str.indexOf(t_x)) != -1) - { - t_ret += t_str.substring(0, t_xI) + t_y; - t_str = t_str.substring(t_xI + t_x.length); - } - return t_ret+t_str; -} -String.prototype.wzReplace = wzReplace; +//================== PUBLIC EXTENSION API ==================================// +// Extension eventhandlers currently supported: +// OnLoadConfig, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore, +// OnMoveAfter, OnHideInit, OnHide, OnKill -function tt_N4Tags(tagtyp, t_d, t_y) -{ - t_d = t_d || document; - t_y = t_y || new Array(); - var t_x = (tagtyp=="a")? t_d.links : t_d.layers; - for(var z = t_x.length; z--;) t_y[t_y.length] = t_x[z]; - for(var z = t_d.layers.length; z--;) t_y = tt_N4Tags(tagtyp, t_d.layers[z].document, t_y); - return t_y; -} +var tt_aElt = new Array(10), // Container DIV, outer title & body DIVs, inner title & body TDs, closebutton SPAN, shadow DIVs, and IFRAME to cover windowed elements in IE +tt_aV = new Array(), // Caches and enumerates config data for currently active tooltip +tt_sContent, // Inner tooltip text or HTML +tt_scrlX = 0, tt_scrlY = 0, +tt_musX, tt_musY, +tt_over, +tt_x, tt_y, tt_w, tt_h; // Position, width and height of currently displayed tooltip -function tt_GetSelects() +function tt_Extension() { - if (!tt_op6 && !tt_ie) return; - var t_s = tt_op6? "input" : "select"; - if (document.all) + tt_ExtCmdEnum(); + tt_aExt[tt_aExt.length] = this; + return this; +} +function tt_SetTipPos(x, y) +{ + var css = tt_aElt[0].style; + + tt_x = x; + tt_y = y; + css.left = x + "px"; + css.top = y + "px"; + if(tt_ie56) { - var t_i = document.all.tags(t_s).length; while(t_i--) - tt_inputs[t_i] = document.all.tags(t_s)[t_i]; - } - else if (document.getElementsByTagName) - { - var t_i = document.getElementsByTagName(t_s).length; while(t_i--) - tt_inputs[t_i] = document.getElementsByTagName(t_s)[t_i]; - } - var t_i = tt_inputs.length; while(t_i--) - { - tt_inputs[t_i].x = 0; - tt_inputs[t_i].y = 0; - var t_o = tt_inputs[t_i]; - while(t_o) + var ifrm = tt_aElt[tt_aElt.length - 1]; + if(ifrm) { - tt_inputs[t_i].x += t_o.offsetLeft || 0; - tt_inputs[t_i].y += t_o.offsetTop|| 0; - t_o = t_o.offsetParent; + ifrm.style.left = css.left; + ifrm.style.top = css.top; } } } - -function tt_Htm(tt, t_id, txt) +function tt_Hide() { - var t_bgc = (typeof tt.T_BGCOLOR != tt_u)? tt.T_BGCOLOR : ttBgColor, - t_bgimg = (typeof tt.T_BGIMG != tt_u)? tt.T_BGIMG : ttBgImg, - t_bc = (typeof tt.T_BORDERCOLOR != tt_u)? tt.T_BORDERCOLOR : ttBorderColor, - t_bw = (typeof tt.T_BORDERWIDTH != tt_u)? tt.T_BORDERWIDTH : ttBorderWidth, - t_ff = (typeof tt.T_FONTFACE != tt_u)? tt.T_FONTFACE : ttFontFace, - t_fc = (typeof tt.T_FONTCOLOR != tt_u)? tt.T_FONTCOLOR : ttFontColor, - t_fsz = (typeof tt.T_FONTSIZE != tt_u)? tt.T_FONTSIZE : ttFontSize, - t_fwght = (typeof tt.T_FONTWEIGHT != tt_u)? tt.T_FONTWEIGHT : ttFontWeight, - t_padd = (typeof tt.T_PADDING != tt_u)? tt.T_PADDING : ttPadding, - t_shc = (typeof tt.T_SHADOWCOLOR != tt_u)? tt.T_SHADOWCOLOR : (ttShadowColor || 0), - t_shw = (typeof tt.T_SHADOWWIDTH != tt_u)? tt.T_SHADOWWIDTH : (ttShadowWidth || 0), - t_algn = (typeof tt.T_TEXTALIGN != tt_u)? tt.T_TEXTALIGN : ttTextAlign, - t_tit = (typeof tt.T_TITLE != tt_u)? tt.T_TITLE : "", - t_titc = (typeof tt.T_TITLECOLOR != tt_u)? tt.T_TITLECOLOR : ttTitleColor, - t_w = (typeof tt.T_WIDTH != tt_u)? tt.T_WIDTH : ttWidth; - if (t_shc || t_shw) + if(tt_db && tt_iState) { - t_shc = t_shc || "#cccccc"; - t_shw = t_shw || 5; - } - if (tt_n4 && (t_fsz == "10px" || t_fsz == "11px")) t_fsz = "12px"; - - - var t_y = '
    ' + - ''; - if (t_tit) - { - t_y += '
    ' + - (tt_n4? ' ' : '')+t_tit+'<\/b><\/font><\/td><\/tr>'; - } - t_y += '
    ' + - ''; - if (t_fwght == 'bold') t_y += ''; - t_y += txt; - if (t_fwght == 'bold') t_y += '<\/b>'; - t_y += '<\/font><\/td><\/tr><\/table><\/td><\/tr><\/table>'; - if (t_shw) - { - var t_spct = Math.round(t_shw*1.3); - if (tt_n4) + if(tt_iState & 0x2) { - t_y += '<\/layer>' + - '<\/layer>'; + tt_aElt[0].style.visibility = "hidden"; + tt_ExtCallFncs(0, "Hide"); } + tt_tShow.EndTimer(); + tt_tHide.EndTimer(); + tt_tDurt.EndTimer(); + tt_tFade.EndTimer(); + if(!tt_op && !tt_ie) + { + tt_tWaitMov.EndTimer(); + tt_bWait = false; + } + if(tt_aV[CLICKCLOSE]) + tt_RemEvtFnc(document, "mouseup", tt_HideInit); + tt_AddRemOutFnc(false); + tt_ExtCallFncs(0, "Kill"); + // In case of a TagToTip tooltip, hide converted DOM node and + // re-insert it into document + if(tt_t2t && !tt_aV[COPYCONTENT]) + { + tt_t2t.style.display = "none"; + tt_MovDomNode(tt_t2t, tt_aElt[6], tt_t2tDad); + } + tt_iState = 0; + tt_over = null; + tt_ResetMainDiv(); + if(tt_aElt[tt_aElt.length - 1]) + tt_aElt[tt_aElt.length - 1].style.display = "none"; + } +} +function tt_GetElt(id) +{ + return(document.getElementById ? document.getElementById(id) + : document.all ? document.all[id] + : null); +} +function tt_GetDivW(el) +{ + return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0); +} +function tt_GetDivH(el) +{ + return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0); +} +function tt_GetScrollX() +{ + return(window.pageXOffset || (tt_db ? (tt_db.scrollLeft || 0) : 0)); +} +function tt_GetScrollY() +{ + return(window.pageYOffset || (tt_db ? (tt_db.scrollTop || 0) : 0)); +} +function tt_GetClientW() +{ + return(document.body && (typeof(document.body.clientWidth) != tt_u) ? document.body.clientWidth + : (typeof(window.innerWidth) != tt_u) ? window.innerWidth + : tt_db ? (tt_db.clientWidth || 0) + : 0); +} +function tt_GetClientH() +{ + // Exactly this order seems to yield correct values in all major browsers + return(document.body && (typeof(document.body.clientHeight) != tt_u) ? document.body.clientHeight + : (typeof(window.innerHeight) != tt_u) ? window.innerHeight + : tt_db ? (tt_db.clientHeight || 0) + : 0); +} +function tt_GetEvtX(e) +{ + return (e ? ((typeof(e.pageX) != tt_u) ? e.pageX : (e.clientX + tt_scrlX)) : 0); +} +function tt_GetEvtY(e) +{ + return (e ? ((typeof(e.pageY) != tt_u) ? e.pageY : (e.clientY + tt_scrlY)) : 0); +} +function tt_AddEvtFnc(el, sEvt, PFnc) +{ + if(el) + { + if(el.addEventListener) + el.addEventListener(sEvt, PFnc, false); else - { - var t_opa = tt_n6? '-moz-opacity:0.85;' : tt_ie? 'filter:Alpha(opacity=85);' : ''; - t_y += '
    <\/div>' + - '
    <\/div>'; - } + el.attachEvent("on" + sEvt, PFnc); } - t_y += '<\/div>'; - return t_y; } +function tt_RemEvtFnc(el, sEvt, PFnc) +{ + if(el) + { + if(el.removeEventListener) + el.removeEventListener(sEvt, PFnc, false); + else + el.detachEvent("on" + sEvt, PFnc); + } +} + +//====================== PRIVATE ===========================================// +var tt_aExt = new Array(), // Array of extension objects + +tt_db, tt_op, tt_ie, tt_ie56, tt_bBoxOld, // Browser flags +tt_body, +tt_flagOpa, // Opacity support: 1=IE, 2=Khtml, 3=KHTML, 4=Moz, 5=W3C +tt_maxPosX, tt_maxPosY, +tt_iState = 0, // Tooltip active |= 1, shown |= 2, move with mouse |= 4 +tt_opa, // Currently applied opacity +tt_bJmpVert, // Tip above mouse (or ABOVE tip below mouse) +tt_t2t, tt_t2tDad, // Tag converted to tip, and its parent element in the document +tt_elDeHref, // The tag from which Opera has removed the href attribute +// Timer +tt_tShow = new Number(0), tt_tHide = new Number(0), tt_tDurt = new Number(0), +tt_tFade = new Number(0), tt_tWaitMov = new Number(0), +tt_bWait = false, +tt_u = "undefined"; + function tt_Init() { - if (!(tt_op || tt_n4 || tt_n6 || tt_ie || tt_w3c)) return; - - var htm = tt_n4? '
    <\/div>' : '', - tags, - t_tj, - over, - esc = 'return escape('; - var i = tt_tags.length; while(i--) - { - tags = tt_ie? (document.all.tags(tt_tags[i]) || 1) - : document.getElementsByTagName? (document.getElementsByTagName(tt_tags[i]) || 1) - : (!tt_n4 && tt_tags[i]=="a")? document.links - : 1; - if (tt_n4 && (tt_tags[i] == "a" || tt_tags[i] == "layer")) tags = tt_N4Tags(tt_tags[i]); - var j = tags.length; while(j--) + tt_MkCmdEnum(); + // Send old browsers instantly to hell + if(!tt_Browser() || !tt_MkMainDiv()) + return; + tt_IsW3cBox(); + tt_OpaSupport(); + tt_AddEvtFnc(document, "mousemove", tt_Move); + // In Debug mode we search for TagToTip() calls in order to notify + // the user if they've forgotten to set the TagsToTip config flag + if(TagsToTip || tt_Debug) + tt_SetOnloadFnc(); + tt_AddEvtFnc(window, "scroll", + function() { - if (typeof (t_tj = tags[j]).onmouseover == "function" && t_tj.onmouseover.toString().indexOf(esc) != -1 && !tt_n6 || tt_n6 && (over = t_tj.getAttribute("onmouseover")) && over.indexOf(esc) != -1) - { - if (over) t_tj.onmouseover = new Function(over); - var txt = unescape(t_tj.onmouseover()); - htm += tt_Htm( - t_tj, - "tOoLtIp"+i+""+j, - txt.wzReplace("& ","&") - ); - - t_tj.onmouseover = new Function('e', - 'tt_Show(e,'+ - '"tOoLtIp' +i+''+j+ '",'+ - (typeof t_tj.T_ABOVE != tt_u)+','+ - ((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay)+','+ - ((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""')+','+ - (typeof t_tj.T_LEFT != tt_u)+','+ - ((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX)+','+ - ((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY)+','+ - (typeof t_tj.T_STATIC != tt_u)+','+ - (typeof t_tj.T_STICKY != tt_u)+','+ - ((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+ - ');' - ); - t_tj.onmouseout = tt_Hide; - if (t_tj.alt) t_tj.alt = ""; - if (t_tj.title) t_tj.title = ""; - } - } - } - document.write(htm); + tt_scrlX = tt_GetScrollX(); + tt_scrlY = tt_GetScrollY(); + if(tt_iState && !(tt_aV[STICKY] && (tt_iState & 2))) + tt_HideInit(); + } ); + // Ensure the tip be hidden when the page unloads + tt_AddEvtFnc(window, "unload", tt_Hide); + tt_Hide(); } - -function tt_EvX(t_e) +// Creates command names by translating config variable names to upper case +function tt_MkCmdEnum() { - var t_y = tt_Int(t_e.pageX || t_e.clientX || 0) + - tt_Int(tt_ie? tt_db.scrollLeft : 0) + - tt_offX; - if (t_y > xlim) t_y = xlim; - var t_scr = tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0); - if (t_y < t_scr) t_y = t_scr; - return t_y; + var n = 0; + for(var i in config) + eval("window." + i.toString().toUpperCase() + " = " + n++); + tt_aV.length = n; } - -function tt_EvY(t_e) +function tt_Browser() { - var t_y = tt_Int(t_e.pageY || t_e.clientY || 0) + - tt_Int(tt_ie? tt_db.scrollTop : 0); - if (tt_sup) t_y -= (tt_objH + tt_offY - 15); - else if (t_y > ylim || !tt_sub && t_y > ylim-24) + var n, nv, n6, w3c; + + n = navigator.userAgent.toLowerCase(), + nv = navigator.appVersion; + tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_u); + tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op; + if(tt_ie) { - t_y -= (tt_objH + 5); - tt_sub = false; + var ieOld = (!document.compatMode || document.compatMode == "BackCompat"); + tt_db = !ieOld ? document.documentElement : (document.body || null); + if(tt_db) + tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5 + && typeof document.body.style.maxHeight == tt_u; } else { - t_y += tt_offY; - tt_sub = true; - } - return t_y; -} - -function tt_ReleasMov() -{ - if (document.onmousemove == tt_Move) - { - if (document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE); - document.onmousemove = null; - } -} - -function tt_HideInput() -{ - if (!(tt_ie || tt_op6) || !tt_inputs) return; - var t_o; - var t_i = tt_inputs.length; while(t_i--) - { - t_o = tt_inputs[t_i]; - if (tt_vis && tt_objX+tt_objW > t_o.x && tt_objX < t_o.x+t_o.offsetWidth && tt_objY+tt_objH > t_o.y && tt_objY < t_o.y+t_o.offsetHeight) - t_o.style.visibility = 'hidden'; - else t_o.style.visibility = 'visible'; - } -} - -function tt_GetDiv(t_id) -{ - return( - tt_n4? (document.layers[t_id] || null) - : tt_ie? (document.all[t_id] || null) - : (document.getElementById(t_id) || null) - ); -} - -function tt_GetDivW() -{ - return tt_Int( - tt_n4? tt_obj.clip.width - : tt_obj.style.pixelWidth? tt_obj.style.pixelWidth - : tt_obj.offsetWidth - ); -} - -function tt_GetDivH() -{ - return tt_Int( - tt_n4? tt_obj.clip.height - : tt_obj.style.pixelHeight? tt_obj.style.pixelHeight - : tt_obj.offsetHeight - ); -} - -// Compat with DragDrop Lib: Ensure that z-index of tooltip is lifted beyond toplevel dragdrop element -function tt_SetDivZ() -{ - var t_i = tt_obj.style || tt_obj; - if (window.dd && dd.z) - t_i.zIndex = Math.max(dd.z+1, t_i.zIndex); -} - -function tt_SetDivPos(t_x, t_y) -{ - var t_i = tt_obj.style || tt_obj; - var t_px = (tt_op6 || tt_n4)? '' : 'px'; - t_i.left = (tt_objX = t_x) + t_px; - t_i.top = (tt_objY = t_y) + t_px; - tt_HideInput(); -} - -function tt_ShowDiv(t_x) -{ - if (tt_n4) tt_obj.visibility = t_x? 'show' : 'hide'; - else tt_obj.style.visibility = t_x? 'visible' : 'hidden'; - tt_vis = t_x; - tt_HideInput(); -} - -function tt_OpDeHref(t_e) -{ - if (t_e && t_e.target.hasAttribute("href")) - { - tt_tag = t_e.target; - tt_tag.t_href = tt_tag.getAttribute("href"); - tt_tag.removeAttribute("href"); - tt_tag.style.cursor = "hand"; - tt_tag.onmousedown = tt_OpReHref; - tt_tag.stats = window.status; - window.status = tt_tag.t_href; - } -} - -function tt_OpReHref() -{ - if (tt_tag) - { - tt_tag.setAttribute("href", tt_tag.t_href); - window.status = tt_tag.stats; - tt_tag = null; - } -} - -function tt_Show(t_e, t_id, t_sup, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky, t_temp) -{ - if (tt_obj) tt_Hide(); - var t_mf = document.onmousemove || null; - if (window.dd && (window.DRAG && t_mf == DRAG || window.RESIZE && t_mf == RESIZE)) return; - var t_uf = document.onmouseup || null; - if (t_mf && t_uf) t_uf(t_e); - - tt_obj = tt_GetDiv(t_id); - if (tt_obj) - { - t_e = t_e || window.event; - tt_sub = !(tt_sup = t_sup); - tt_sticky = t_sticky; - tt_objW = tt_GetDivW(); - tt_objH = tt_GetDivH(); - tt_offX = t_left? -(tt_objW+t_offx) : t_offx; - tt_offY = t_offy; - if (tt_op7) tt_OpDeHref(t_e); - if (tt_n4) + tt_db = document.documentElement || document.body || + (document.getElementsByTagName ? document.getElementsByTagName("body")[0] + : null); + if(!tt_op) { - if (tt_obj.document.layers.length) - { - var t_sh = tt_obj.document.layers[0]; - t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3); - } + n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_u; + w3c = !n6 && document.getElementById; + } + } + tt_body = (document.getElementsByTagName ? document.getElementsByTagName("body")[0] + : (document.body || null)); + if(tt_ie || n6 || tt_op || w3c) + { + if(tt_body && tt_db) + { + if(document.attachEvent || document.addEventListener) + return true; } else + tt_Err("wz_tooltip.js must be included INSIDE the body section," + + " immediately after the opening tag."); + } + tt_db = null; + return false; +} +function tt_MkMainDiv() +{ + // Create the tooltip DIV + if(tt_body.insertAdjacentHTML) + tt_body.insertAdjacentHTML("afterBegin", tt_MkMainDivHtm()); + else if(typeof tt_body.innerHTML != tt_u && document.createElement && tt_body.appendChild) + tt_body.appendChild(tt_MkMainDivDom()); + // FireFox Alzheimer bug + if(window.tt_GetMainDivRefs && tt_GetMainDivRefs()) + return true; + tt_db = null; + return false; +} +function tt_MkMainDivHtm() +{ + return('
    ' + + (tt_ie56 ? ('') + : '')); +} +function tt_MkMainDivDom() +{ + var el = document.createElement("div"); + if(el) + el.id = "WzTtDiV"; + return el; +} +function tt_GetMainDivRefs() +{ + tt_aElt[0] = tt_GetElt("WzTtDiV"); + if(tt_ie56 && tt_aElt[0]) + { + tt_aElt[tt_aElt.length - 1] = tt_GetElt("WzTtIfRm"); + if(!tt_aElt[tt_aElt.length - 1]) + tt_aElt[0] = null; + } + if(tt_aElt[0]) + { + var css = tt_aElt[0].style; + + css.visibility = "hidden"; + css.position = "absolute"; + css.overflow = "hidden"; + return true; + } + return false; +} +function tt_ResetMainDiv() +{ + var w = (window.screen && screen.width) ? screen.width : 10000; + + tt_SetTipPos(-w, 0); + tt_aElt[0].innerHTML = ""; + tt_aElt[0].style.width = (w - 1) + "px"; +} +function tt_IsW3cBox() +{ + var css = tt_aElt[0].style; + + css.padding = "10px"; + css.width = "40px"; + tt_bBoxOld = (tt_GetDivW(tt_aElt[0]) == 40); + css.padding = "0px"; + tt_ResetMainDiv(); +} +function tt_OpaSupport() +{ + var css = tt_body.style; + + tt_flagOpa = (typeof(css.filter) != tt_u) ? 1 + : (typeof(css.KhtmlOpacity) != tt_u) ? 2 + : (typeof(css.KHTMLOpacity) != tt_u) ? 3 + : (typeof(css.MozOpacity) != tt_u) ? 4 + : (typeof(css.opacity) != tt_u) ? 5 + : 0; +} +// Ported from http://dean.edwards.name/weblog/2006/06/again/ +// (Dean Edwards et al.) +function tt_SetOnloadFnc() +{ + tt_AddEvtFnc(document, "DOMContentLoaded", tt_HideSrcTags); + tt_AddEvtFnc(window, "load", tt_HideSrcTags); + if(tt_body.attachEvent) + tt_body.attachEvent("onreadystatechange", + function() { + if(tt_body.readyState == "complete") + tt_HideSrcTags(); + } ); + if(/WebKit|KHTML/i.test(navigator.userAgent)) + { + var t = setInterval(function() { + if(/loaded|complete/.test(document.readyState)) + { + clearInterval(t); + tt_HideSrcTags(); + } + }, 10); + } +} +function tt_HideSrcTags() +{ + if(!window.tt_HideSrcTags || window.tt_HideSrcTags.done) + return; + window.tt_HideSrcTags.done = true; + if(!tt_HideSrcTagsRecurs(tt_body)) + tt_Err("To enable the capability to convert HTML elements to tooltips," + + " you must set TagsToTip in the global tooltip configuration" + + " to true."); +} +function tt_HideSrcTagsRecurs(dad) +{ + var a, ovr, asT2t; + + // Walk the DOM tree for tags that have an onmouseover attribute + // containing a TagToTip('...') call. + // (.childNodes first since .children is bugous in Safari) + a = dad.childNodes || dad.children || null; + for(var i = a ? a.length : 0; i;) + {--i; + if(!tt_HideSrcTagsRecurs(a[i])) + return false; + ovr = a[i].getAttribute ? a[i].getAttribute("onmouseover") + : (typeof a[i].onmouseover == "function") ? a[i].onmouseover + : null; + if(ovr) { - var t_sh = tt_GetDiv(t_id+'R'); - if (t_sh) + asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/); + if(asT2t && asT2t.length) { - var t_h = tt_objH - tt_Int(t_sh.style.pixelTop || t_sh.style.top || 0); - if (typeof t_sh.style.pixelHeight != tt_u) t_sh.style.pixelHeight = t_h; - else t_sh.style.height = t_h+'px'; + if(!tt_HideSrcTag(asT2t[0])) + return false; } } + } + return true; +} +function tt_HideSrcTag(sT2t) +{ + var id, el; - tt_GetSelects(); + // The ID passed to the found TagToTip() call identifies an HTML element + // to be converted to a tooltip, so hide that element + id = sT2t.replace(/.+'([^'.]+)'.+/, "$1"); + el = tt_GetElt(id); + if(el) + { + if(tt_Debug && !TagsToTip) + return false; + else + el.style.display = "none"; + } + else + tt_Err("Invalid ID\n'" + id + "'\npassed to TagToTip()." + + " There exists no HTML element with that ID."); + return true; +} +function tt_Tip(arg, t2t) +{ + if(!tt_db) + return; + if(tt_iState) + tt_Hide(); + if(!tt_Enabled) + return; + tt_t2t = t2t; + if(!tt_ReadCmds(arg)) + return; + tt_iState = 0x1 | 0x4; + tt_AdaptConfig1(); + tt_MkTipContent(arg); + tt_MkTipSubDivs(); + tt_FormatTip(); + tt_bJmpVert = false; + tt_maxPosX = tt_GetClientW() + tt_scrlX - tt_w - 1; + tt_maxPosY = tt_GetClientH() + tt_scrlY - tt_h - 1; + tt_AdaptConfig2(); + // We must fake the first mousemove in order to ensure the tip + // be immediately shown and positioned + tt_Move(); + tt_ShowInit(); +} +function tt_ReadCmds(a) +{ + var i; - xlim = tt_Int((tt_db && tt_db.clientWidth)? tt_db.clientWidth : window.innerWidth) + - tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0) - - tt_objW - - (tt_n4? 21 : 0); - ylim = tt_Int(window.innerHeight || tt_db.clientHeight) + - tt_Int(window.pageYOffset || (tt_db? tt_db.scrollTop : 0) || 0) - - tt_objH - tt_offY; + // First load the global config values, to initialize also values + // for which no command has been passed + i = 0; + for(var j in config) + tt_aV[i++] = config[j]; + // Then replace each cached config value for which a command has been + // passed (ensure the # of command args plus value args be even) + if(a.length & 1) + { + for(i = a.length - 1; i > 0; i -= 2) + tt_aV[a[i - 1]] = a[i]; + return true; + } + tt_Err("Incorrect call of Tip() or TagToTip().\n" + + "Each command must be followed by a value."); + return false; +} +function tt_AdaptConfig1() +{ + tt_ExtCallFncs(0, "LoadConfig"); + // Inherit unspecified title formattings from body + if(!tt_aV[TITLEBGCOLOR].length) + tt_aV[TITLEBGCOLOR] = tt_aV[BORDERCOLOR]; + if(!tt_aV[TITLEFONTCOLOR].length) + tt_aV[TITLEFONTCOLOR] = tt_aV[BGCOLOR]; + if(!tt_aV[TITLEFONTFACE].length) + tt_aV[TITLEFONTFACE] = tt_aV[FONTFACE]; + if(!tt_aV[TITLEFONTSIZE].length) + tt_aV[TITLEFONTSIZE] = tt_aV[FONTSIZE]; + if(tt_aV[CLOSEBTN]) + { + // Use title colors for non-specified closebutton colors + if(!tt_aV[CLOSEBTNCOLORS]) + tt_aV[CLOSEBTNCOLORS] = new Array("", "", "", ""); + for(var i = 4; i;) + {--i; + if(!tt_aV[CLOSEBTNCOLORS][i].length) + tt_aV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_aV[TITLEFONTCOLOR] : tt_aV[TITLEBGCOLOR]; + } + // Enforce titlebar be shown + if(!tt_aV[TITLE].length) + tt_aV[TITLE] = " "; + } + // Circumvents broken display of images and fade-in flicker in Geckos < 1.8 + if(tt_aV[OPACITY] == 100 && typeof tt_aElt[0].style.MozOpacity != tt_u && !Array.every) + tt_aV[OPACITY] = 99; + // Smartly shorten the delay for fade-in tooltips + if(tt_aV[FADEIN] && tt_flagOpa && tt_aV[DELAY] > 100) + tt_aV[DELAY] = Math.max(tt_aV[DELAY] - tt_aV[FADEIN], 100); +} +function tt_AdaptConfig2() +{ + if(tt_aV[CENTERMOUSE]) + tt_aV[OFFSETX] -= ((tt_w - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0)) >> 1); +} +// Expose content globally so extensions can modify it +function tt_MkTipContent(a) +{ + if(tt_t2t) + { + if(tt_aV[COPYCONTENT]) + tt_sContent = tt_t2t.innerHTML; + else + tt_sContent = ""; + } + else + tt_sContent = a[0]; + tt_ExtCallFncs(0, "CreateContentString"); +} +function tt_MkTipSubDivs() +{ + var sCss = 'position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;', + sTbTrTd = ' cellspacing=0 cellpadding=0 border=0 style="' + sCss + '">
    0) t_txt += 'window.tt_rtm = window.setTimeout(\'tt_sticky = false; tt_Hide();\','+t_temp+');'; - window.tt_rdl = window.setTimeout(t_txt, t_delay); - - if (!t_fix) + tt_aElt[0].innerHTML = + ('' + + (tt_aV[TITLE].length ? + ('
    ' + + '' + + tt_aV[TITLE] + + '' + + (tt_aV[CLOSEBTN] ? + ('') + : '') + + '
    ' + + '' + + tt_aV[CLOSEBTNTEXT] + + '
    ') + : '') + + '
    ' + + '' + + tt_sContent + + '
    ' + + (tt_aV[SHADOW] + ? ('
    ' + + '
    ') + : '') + ); + tt_GetSubDivRefs(); + // Convert DOM node to tip + if(tt_t2t && !tt_aV[COPYCONTENT]) + { + // Store the tag's parent element so we can restore that DOM branch + // once the tooltip is hidden + tt_t2tDad = tt_t2t.parentNode || tt_t2t.parentElement || tt_t2t.offsetParent || null; + if(tt_t2tDad) { - if (document.captureEvents) document.captureEvents(Event.MOUSEMOVE); - document.onmousemove = tt_Move; + tt_MovDomNode(tt_t2t, tt_t2tDad, tt_aElt[6]); + tt_t2t.style.display = "block"; + } + } + tt_ExtCallFncs(0, "SubDivsCreated"); +} +function tt_GetSubDivRefs() +{ + var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR"); + + for(var i = aId.length; i; --i) + tt_aElt[i] = tt_GetElt(aId[i - 1]); +} +function tt_FormatTip() +{ + var css, w, iOffY, iOffSh; + + //--------- Title DIV ---------- + if(tt_aV[TITLE].length) + { + css = tt_aElt[1].style; + css.background = tt_aV[TITLEBGCOLOR]; + css.paddingTop = (tt_aV[CLOSEBTN] ? 2 : 0) + "px"; + css.paddingBottom = "1px"; + css.paddingLeft = css.paddingRight = tt_aV[PADDING] + "px"; + css = tt_aElt[3].style; + css.color = tt_aV[TITLEFONTCOLOR]; + css.fontFamily = tt_aV[TITLEFONTFACE]; + css.fontSize = tt_aV[TITLEFONTSIZE]; + css.fontWeight = "bold"; + css.textAlign = tt_aV[TITLEALIGN]; + // Close button DIV + if(tt_aElt[4]) + { + css.paddingRight = (tt_aV[PADDING] << 1) + "px"; + css = tt_aElt[4].style; + css.background = tt_aV[CLOSEBTNCOLORS][0]; + css.color = tt_aV[CLOSEBTNCOLORS][1]; + css.fontFamily = tt_aV[TITLEFONTFACE]; + css.fontSize = tt_aV[TITLEFONTSIZE]; + css.fontWeight = "bold"; + } + if(tt_aV[WIDTH] > 0) + tt_w = tt_aV[WIDTH] + ((tt_aV[PADDING] + tt_aV[BORDERWIDTH]) << 1); + else + { + tt_w = tt_GetDivW(tt_aElt[3]) + tt_GetDivW(tt_aElt[4]); + // Some spacing between title DIV and closebutton + if(tt_aElt[4]) + tt_w += tt_aV[PADDING]; + } + // Ensure the top border of the body DIV be covered by the title DIV + iOffY = -tt_aV[BORDERWIDTH]; + } + else + { + tt_w = 0; + iOffY = 0; + } + + //-------- Body DIV ------------ + css = tt_aElt[5].style; + css.top = iOffY + "px"; + if(tt_aV[BORDERWIDTH]) + { + css.borderColor = tt_aV[BORDERCOLOR]; + css.borderStyle = tt_aV[BORDERSTYLE]; + css.borderWidth = tt_aV[BORDERWIDTH] + "px"; + } + if(tt_aV[BGCOLOR].length) + css.background = tt_aV[BGCOLOR]; + if(tt_aV[BGIMG].length) + css.backgroundImage = "url(" + tt_aV[BGIMG] + ")"; + css.padding = tt_aV[PADDING] + "px"; + css.textAlign = tt_aV[TEXTALIGN]; + // TD inside body DIV + css = tt_aElt[6].style; + css.color = tt_aV[FONTCOLOR]; + css.fontFamily = tt_aV[FONTFACE]; + css.fontSize = tt_aV[FONTSIZE]; + css.fontWeight = tt_aV[FONTWEIGHT]; + css.background = ""; + css.textAlign = tt_aV[TEXTALIGN]; + if(tt_aV[WIDTH] > 0) + w = tt_aV[WIDTH] + ((tt_aV[PADDING] + tt_aV[BORDERWIDTH]) << 1); + else + // We measure the width of the body's inner TD, because some browsers + // expand the width of the container and outer body DIV to 100% + w = tt_GetDivW(tt_aElt[6]) + ((tt_aV[PADDING] + tt_aV[BORDERWIDTH]) << 1); + if(w > tt_w) + tt_w = w; + + //--------- Shadow DIVs ------------ + if(tt_aV[SHADOW]) + { + tt_w += tt_aV[SHADOWWIDTH]; + iOffSh = Math.floor((tt_aV[SHADOWWIDTH] * 4) / 3); + // Bottom shadow + css = tt_aElt[7].style; + css.top = iOffY + "px"; + css.left = iOffSh + "px"; + css.width = (tt_w - iOffSh - tt_aV[SHADOWWIDTH]) + "px"; + css.height = tt_aV[SHADOWWIDTH] + "px"; + css.background = tt_aV[SHADOWCOLOR]; + // Right shadow + css = tt_aElt[8].style; + css.top = iOffSh + "px"; + css.left = (tt_w - tt_aV[SHADOWWIDTH]) + "px"; + css.width = tt_aV[SHADOWWIDTH] + "px"; + css.background = tt_aV[SHADOWCOLOR]; + } + else + iOffSh = 0; + + //-------- Container DIV ------- + tt_SetTipOpa(tt_aV[FADEIN] ? 0 : tt_aV[OPACITY]); + tt_FixSize(iOffY, iOffSh); +} +// Fixate the size so it can't dynamically change while the tooltip is moving. +function tt_FixSize(iOffY, iOffSh) +{ + var wIn, wOut, i; + + tt_aElt[0].style.width = tt_w + "px"; + tt_aElt[0].style.pixelWidth = tt_w; + wOut = tt_w - ((tt_aV[SHADOW]) ? tt_aV[SHADOWWIDTH] : 0); + // Body + wIn = wOut; + if(!tt_bBoxOld) + wIn -= ((tt_aV[PADDING] + tt_aV[BORDERWIDTH]) << 1); + tt_aElt[5].style.width = wIn + "px"; + // Title + if(tt_aElt[1]) + { + wIn = wOut - (tt_aV[PADDING] << 1); + if(!tt_bBoxOld) + wOut = wIn; + tt_aElt[1].style.width = wOut + "px"; + tt_aElt[2].style.width = wIn + "px"; + } + tt_h = tt_GetDivH(tt_aElt[0]) + iOffY; + // Right shadow + if(tt_aElt[8]) + tt_aElt[8].style.height = (tt_h - iOffSh) + "px"; + i = tt_aElt.length - 1; + if(tt_aElt[i]) + { + tt_aElt[i].style.width = tt_w + "px"; + tt_aElt[i].style.height = tt_h + "px"; + } +} +function tt_DeAlt(el) +{ + var aKid; + + if(el.alt) + el.alt = ""; + if(el.title) + el.title = ""; + aKid = el.childNodes || el.children || null; + if(aKid) + { + for(var i = aKid.length; i;) + tt_DeAlt(aKid[--i]); + } +} +// This hack removes the annoying native tooltips over links in Opera +function tt_OpDeHref(el) +{ + if(!tt_op) + return; + if(tt_elDeHref) + tt_OpReHref(); + while(el) + { + if(el.hasAttribute("href")) + { + el.t_href = el.getAttribute("href"); + el.t_stats = window.status; + el.removeAttribute("href"); + el.style.cursor = "hand"; + tt_AddEvtFnc(el, "mousedown", tt_OpReHref); + window.status = el.t_href; + tt_elDeHref = el; + break; + } + el = el.parentElement; + } +} +function tt_ShowInit() +{ + tt_tShow.Timer("tt_Show()", tt_aV[DELAY], true); + if(tt_aV[CLICKCLOSE]) + tt_AddEvtFnc(document, "mouseup", tt_HideInit); +} +function tt_OverInit(e) +{ + tt_over = e.target || e.srcElement; + tt_DeAlt(tt_over); + tt_OpDeHref(tt_over); + tt_AddRemOutFnc(true); +} +function tt_Show() +{ + var css = tt_aElt[0].style; + + // Override the z-index of the topmost wz_dragdrop.js D&D item + css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010); + if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE]) + tt_iState &= ~0x4; + if(tt_aV[DURATION] > 0) + tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true); + tt_ExtCallFncs(0, "Show") + css.visibility = "visible"; + tt_iState |= 0x2; + if(tt_aV[FADEIN]) + tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL])); + tt_ShowIfrm(); +} +function tt_ShowIfrm() +{ + if(tt_ie56) + { + var ifrm = tt_aElt[tt_aElt.length - 1]; + if(ifrm) + { + var css = ifrm.style; + css.zIndex = tt_aElt[0].style.zIndex - 1; + css.display = "block"; } } } - -var tt_area = false; -function tt_Move(t_ev) +function tt_Move(e) { - if (!tt_obj) return; - if (tt_n6 || tt_w3c) + e = window.event || e; + if(e) { - if (tt_wait) return; - tt_wait = true; - setTimeout('tt_wait = false;', 5); + tt_musX = tt_GetEvtX(e); + tt_musY = tt_GetEvtY(e); } - var t_e = t_ev || window.event; - tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e)); - if (tt_op6) + if(tt_iState) { - if (tt_area && t_e.target.tagName != 'AREA') tt_Hide(); - else if (t_e.target.tagName == 'AREA') tt_area = true; + if(!tt_over && e) + tt_OverInit(e); + if(tt_iState & 0x4) + { + // Protect some browsers against jam of mousemove events + if(!tt_op && !tt_ie) + { + if(tt_bWait) + return; + tt_bWait = true; + tt_tWaitMov.Timer("tt_bWait = false;", 1, true); + } + if(tt_aV[FIX]) + { + tt_iState &= ~0x4; + tt_SetTipPos(tt_aV[FIX][0], tt_aV[FIX][1]); + } + else if(!tt_ExtCallFncs(e, "MoveBefore")) + tt_SetTipPos(tt_PosX(), tt_PosY()); + tt_ExtCallFncs([tt_musX, tt_musY], "MoveAfter") + } } } - -function tt_Hide() +function tt_PosX() { - if (window.tt_obj) + var x; + + x = tt_musX; + if(tt_aV[LEFT]) + x -= tt_w + tt_aV[OFFSETX] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0); + else + x += tt_aV[OFFSETX]; + // Prevent tip from extending past right/left clientarea boundary + if(x > tt_maxPosX) + x = tt_maxPosX; + return((x < tt_scrlX) ? tt_scrlX : x); +} +function tt_PosY() +{ + var y; + + // Apply some hysteresis after the tip has snapped to the other side of the + // mouse. In case of insufficient space above and below the mouse, we place + // the tip below. + if(tt_aV[ABOVE] && (!tt_bJmpVert || tt_CalcPosYAbove() >= tt_scrlY + 16)) + y = tt_DoPosYAbove(); + else if(!tt_aV[ABOVE] && tt_bJmpVert && tt_CalcPosYBelow() > tt_maxPosY - 16) + y = tt_DoPosYAbove(); + else + y = tt_DoPosYBelow(); + // Snap to other side of mouse if tip would extend past window boundary + if(y > tt_maxPosY) + y = tt_DoPosYAbove(); + if(y < tt_scrlY) + y = tt_DoPosYBelow(); + return y; +} +function tt_DoPosYBelow() +{ + tt_bJmpVert = tt_aV[ABOVE]; + return tt_CalcPosYBelow(); +} +function tt_DoPosYAbove() +{ + tt_bJmpVert = !tt_aV[ABOVE]; + return tt_CalcPosYAbove(); +} +function tt_CalcPosYBelow() +{ + return(tt_musY + tt_aV[OFFSETY]); +} +function tt_CalcPosYAbove() +{ + var dy = tt_aV[OFFSETY] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0); + if(tt_aV[OFFSETY] > 0 && dy <= 0) + dy = 1; + return(tt_musY - tt_h - dy); +} +function tt_OnOut() +{ + tt_AddRemOutFnc(false); + if(!(tt_aV[STICKY] && (tt_iState & 0x2))) + tt_HideInit(); +} +function tt_HideInit() +{ + tt_ExtCallFncs(0, "HideInit"); + tt_iState &= ~0x4; + if(tt_flagOpa && tt_aV[FADEOUT]) { - if (window.tt_rdl) window.clearTimeout(tt_rdl); - if (!tt_sticky || !tt_vis) + tt_tFade.EndTimer(); + if(tt_opa) { - if (window.tt_rtm) window.clearTimeout(tt_rtm); - tt_ShowDiv(false); - tt_SetDivPos(-tt_objW, -tt_objH); - tt_obj = null; - if (typeof window.tt_upFunc != tt_u) document.onmouseup = window.tt_upFunc; + var n = Math.round(tt_aV[FADEOUT] / (tt_aV[FADEINTERVAL] * (tt_aV[OPACITY] / tt_opa))); + tt_Fade(tt_opa, tt_opa, 0, n); + return; } - tt_sticky = false; - if (tt_op6 && tt_area) tt_area = false; - tt_ReleasMov(); - if (tt_op7) tt_OpReHref(); - tt_HideInput(); } + tt_tHide.Timer("tt_Hide();", 1, false); +} +function tt_OpReHref() +{ + if(tt_elDeHref) + { + tt_elDeHref.setAttribute("href", tt_elDeHref.t_href); + tt_RemEvtFnc(tt_elDeHref, "mousedown", tt_OpReHref); + window.status = tt_elDeHref.t_stats; + tt_elDeHref = null; + } +} +function tt_Fade(a, now, z, n) +{ + if(n) + { + now += Math.round((z - now) / n); + if((z > a) ? (now >= z) : (now <= z)) + now = z; + else + tt_tFade.Timer("tt_Fade(" + + a + "," + now + "," + z + "," + (n - 1) + + ")", + tt_aV[FADEINTERVAL], + true); + } + now ? tt_SetTipOpa(now) : tt_Hide(); +} +// To circumvent the opacity nesting flaws of IE, we set the opacity +// for each sub-DIV separately, rather than for the container DIV. +function tt_SetTipOpa(opa) +{ + tt_SetOpa(tt_aElt[5].style, opa); + if(tt_aElt[1]) + tt_SetOpa(tt_aElt[1].style, opa); + if(tt_aV[SHADOW]) + { + opa = Math.round(opa * 0.8); + tt_SetOpa(tt_aElt[7].style, opa); + tt_SetOpa(tt_aElt[8].style, opa); + } +} +function tt_OnCloseBtnOver(iOver) +{ + var css = tt_aElt[4].style; + + iOver <<= 1; + css.background = tt_aV[CLOSEBTNCOLORS][iOver]; + css.color = tt_aV[CLOSEBTNCOLORS][iOver + 1]; +} +function tt_Int(x) +{ + var y; + + return(isNaN(y = parseInt(x)) ? 0 : y); +} +// Adds or removes the document.mousemove or HoveredElem.mouseout handler +// conveniently. Keeps track of those handlers to prevent them from being +// set or removed redundantly. +function tt_AddRemOutFnc(bAdd) +{ + var PSet = bAdd ? tt_AddEvtFnc : tt_RemEvtFnc; + + if(bAdd != tt_AddRemOutFnc.bOn) + { + PSet(tt_over, "mouseout", tt_OnOut); + tt_AddRemOutFnc.bOn = bAdd; + if(!bAdd) + tt_OpReHref(); + } +} +tt_AddRemOutFnc.bOn = false; +Number.prototype.Timer = function(s, iT, bUrge) +{ + if(!this.value || bUrge) + this.value = window.setTimeout(s, iT); +} +Number.prototype.EndTimer = function() +{ + if(this.value) + { + window.clearTimeout(this.value); + this.value = 0; + } +} +function tt_SetOpa(css, opa) +{ + tt_opa = opa; + if(tt_flagOpa == 1) + { + // Hack for bugs of IE: + // A DIV cannot be made visible in a single step if an opacity < 100 + // has been applied while the DIV was hidden. + // Moreover, in IE6, applying an opacity < 100 has no effect if the + // concerned element has no layout (position, size, zoom, ...). + if(opa < 100) + { + var bVis = css.visibility != "hidden"; + css.zoom = "100%"; + if(!bVis) + css.visibility = "visible"; + css.filter = "alpha(opacity=" + opa + ")"; + if(!bVis) + css.visibility = "hidden"; + } + else + css.filter = ""; + } + else + { + opa /= 100.0; + switch(tt_flagOpa) + { + case 2: + css.KhtmlOpacity = opa; break; + case 3: + css.KHTMLOpacity = opa; break; + case 4: + css.MozOpacity = opa; break; + case 5: + css.opacity = opa; break; + } + } +} +function tt_MovDomNode(el, dadFrom, dadTo) +{ + if(dadFrom) + dadFrom.removeChild(el); + if(dadTo) + dadTo.appendChild(el); +} +function tt_Err(sErr) +{ + if(tt_Debug) + alert("Tooltip Script Error Message:\n\n" + sErr); +} + +//=========== DEALING WITH EXTENSIONS ==============// +function tt_ExtCmdEnum() +{ + var s; + + // Add new command(s) to the commands enum + for(var i in config) + { + s = "window." + i.toString().toUpperCase(); + if(eval("typeof(" + s + ") == tt_u")) + { + eval(s + " = " + tt_aV.length); + tt_aV[tt_aV.length] = null; + } + } +} +function tt_ExtCallFncs(arg, sFnc) +{ + var b = false; + for(var i = tt_aExt.length; i;) + {--i; + var fnc = tt_aExt[i]["On" + sFnc]; + // Call the method the extension has defined for this event + if(fnc && fnc(arg)) + b = true; + } + return b; } tt_Init(); diff --git a/src/label.add.2.php b/src/label.add.2.php index 1e70264..c7cb09d 100644 --- a/src/label.add.2.php +++ b/src/label.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,20 +17,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $label_name = pg_escape_string($_REQUEST['label_name']); $manufacturer = pg_escape_string($_REQUEST['manufacturer']); @@ -48,11 +42,11 @@ if ($manufacturer == "" || $label_name == "" || $paper == "" || $left_margin == $top_margin == "" || $x_space == "" || $y_space == "" || $x_size == "" || $y_size == "" || $columns == "" || $rows == "") { - header("location: label.add.php?manufacturer=$manufacturer&label_name=$label_name&paper=$paper&left_margin=$left_margin&top_margin=$top_margin&x_space=$x_space&y_space=$y_space&x_size=$x_size&y_size=$y_size&columns=$columns&rows=$rows"); + header("Location: label.add.php?manufacturer=$manufacturer&label_name=$label_name&paper=$paper&left_margin=$left_margin&top_margin=$top_margin&x_space=$x_space&y_space=$y_space&x_size=$x_size&y_size=$y_size&columns=$columns&rows=$rows"); exit(); } -pg_query($database, " +$result = pg_query($database, " insert into label (identifier, users, manufacturer, name, space_x, space_y, size_x, size_y, offset_x, offset_y, columns, rows, paper, date_of_creation, last_modified_date) @@ -60,6 +54,10 @@ pg_query($database, " $x_space, $y_space, $x_size, $y_size, $left_margin, $top_margin, $columns, $rows, $paper, now(), now())"); +if ($result) { + site_push_error($strings['errors']['db_insert_failed']); + } + site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['label']['idx']); +header("Location: my.profile.php?selector=".$profile_data['label']['idx']); ?> diff --git a/src/label.add.php b/src/label.add.php index c711049..b6e1fc2 100644 --- a/src/label.add.php +++ b/src/label.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,20 +17,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$type = 'label'; +$database = site_prolog(PO_USER_TYPE_USER); $manufacturer = $_REQUEST['manufacturer']; $label_name = $_REQUEST['label_name']; @@ -44,43 +38,43 @@ $y_size = $_REQUEST['y_size']; $columns = $_REQUEST['columns']; $rows = $_REQUEST['rows']; -site_header($page_width, "Add Label"); +site_header(sprintf($strings['profile']['add'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Add new label", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic'][$type]), ""); $all_manufacturers = pg_query($database, "select identifier, name from manufacturer order by name"); $all_papers = pg_query($database, "select identifier, name from paper order by name"); -print " 
    "; display_navigator_box_top($profile_data['label']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; +print "
    Add New Label
    ManufacturerNamePaper
    \n"; +print ""; +print emit_td($strings['generic']['add']." ".$strings['generic'][$type], 'colspan="5"'); print ""; print ""; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['generic']['name']); +print emit_th($strings['generic']['paper']); +print ""; +print ""; +print "\n"; +print "\n"; +print "\n"; print ""; print "
    "; display_combo("manufacturer", $all_manufacturers, $manufacturer, ", ", 0); print""; display_combo("paper", $all_papers, $paper, ", ", 1); print"
    "; display_combo("manufacturer", $all_manufacturers, $manufacturer, ", ", 0); print""; display_combo("paper", $all_papers, $paper, ", ", 1); print"
    "; -print " 
    "; display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_space, $y_space, $columns, $rows, FALSE); -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    "; +display_label($database, "*"); + display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/label.del.2.php b/src/label.del.2.php deleted file mode 100644 index 7fcab62..0000000 --- a/src/label.del.2.php +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/src/label.del.php b/src/label.del.php index 6008f8e..c3dbff6 100644 --- a/src/label.del.php +++ b/src/label.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$type = 'label'; +$database = site_prolog(PO_USER_TYPE_USER); $item = pg_escape_string($_REQUEST['item']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from label where identifier=$item and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -56,53 +51,48 @@ $label = pg_fetch_row(pg_query($database, " where label.paper=paper.identifier and label.identifier=$item")); -site_header($page_width, "Delete Label"); +site_header(sprintf($strings['profile']['delete'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Delete lens", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['label']['idx'], $profile_data, "100%"); -print " 
    "; -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "
    Remove Label
    \n"; +print "\n"; +print emit_td($strings['generic']['delete']." ".$strings['generic'][$type], 'colspan="12"'); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['model']); +print emit_th($strings['label']['h_space']); +print emit_th($strings['label']['v_space']); +print emit_th($strings['label']['width']); +print emit_th($strings['label']['height']); +print emit_th($strings['label']['h_offset']); +print emit_th($strings['label']['v_offset']); +print emit_th($strings['label']['rows']); +print emit_th($strings['label']['columns']); +print emit_th($strings['generic']['created']); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; print "\n"; print "
    ModelH SpaceV SpaceWidthHeightH OffsetV OffsetRowsColumsCreated
    $label[2] $label[3], $label[4]$label[5]$label[6]$label[7]$label[8]$label[9]$label[10]$label[11]$label[12]".generate_date_html($label[13], 'date', 1). "$label[2] $label[3], $label[4]$label[5]$label[6]$label[7]$label[8]$label[9]$label[10]$label[11]$label[12]".emit_date_html($label[13], 'date'). "
    \n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; print "
    \n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/label.edit.2.php b/src/label.edit.2.php index 02fa21a..5198a5e 100644 --- a/src/label.edit.2.php +++ b/src/label.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,24 +17,17 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +; +$database = site_prolog(PO_USER_TYPE_USER); $label_name = pg_escape_string($_REQUEST['label_name']); $item = pg_escape_string($_REQUEST['item']); $manufacturer = pg_escape_string($_REQUEST['manufacturer']); -$paper = pg_esacpe_string($_REQUEST['paper']); +$paper = pg_escape_string($_REQUEST['paper']); $left_margin = pg_escape_string($_REQUEST['left_margin']); $top_margin = pg_escape_string($_REQUEST['top_margin']); $x_space = pg_escape_string($_REQUEST['x_space']); @@ -45,17 +38,18 @@ $columns = pg_escape_string($_REQUEST['columns']); $rows = pg_escape_string($_REQUEST['columns']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from label where identifier=$item and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } -pg_query($database, " +$result = pg_query($database, " update label set manufacturer = $manufacturer, name = '$label_name', @@ -71,6 +65,10 @@ pg_query($database, " last_modified_date = now() where identifier = $item"); +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } + site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['label']['idx']); +header("Location: my.profile.php?selector=".$profile_data['label']['idx']); ?> diff --git a/src/label.edit.php b/src/label.edit.php index 160fa0c..bbe2cfc 100644 --- a/src/label.edit.php +++ b/src/label.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); +$type = 'label'; +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$item = pg_esacpe_string($_REQUEST['item']) +$item = pg_escape_string($_REQUEST['item']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from label where identifier=$item and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -49,47 +44,45 @@ $label_data = pg_fetch_row(pg_query($database, " select manufacturer.identifier, label.name, paper.identifier, space_x, space_y, label.size_x, label.size_y, offset_x, offset_y, columns, rows - from label, paper + from label, paper, manufacturer where label.paper=paper.identifier and label.identifier=$item")); -site_header($page_width, "Edit Label"); +site_header(sprintf($strings['profile']['edit'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit label", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic'][$type]), ""); $all_manufacturers = pg_query($database, "select identifier, name from manufacturer order by name"); $all_papers = pg_query($database, "select identifier, name from paper order by name"); -print " 
    "; display_navigator_box_top($profile_data['label']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; print ""; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; +print "
    Edit Label
    ManufacturerNamePaper
    \n"; +print ""; +print "\n"; print ""; print ""; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['generic']['name']); +print emit_th($strings['generic']['paper']); +print ""; +print ""; +print "\n"; +print "\n"; +print "\n"; print ""; print "
    ".sprintf($strings['profile']['edit_type'], $strings['generic'][$type])."
    "; display_combo("manufacturer", $all_manufacturers, $label_data[0], ", ", 0); print""; display_combo("paper", $all_papers, $label_data[2], ", ", 1); print"
    "; display_combo("manufacturer", $all_manufacturers, $label_data[0], ", ", 0); print""; display_combo("paper", $all_papers, $label_data[2], ", ", 1); print"
    "; -print " 
    "; display_label_layout($label_data[7], $label_data[8], $label_data[5], $label_data[6], $label_data[3], $label_data[4], $label_data[9], $label_data[10], FALSE); -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/lens.add.2.php b/src/lens.add.2.php index 476a834..e3f0546 100644 --- a/src/lens.add.2.php +++ b/src/lens.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,11 +17,11 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/calendar.php"; function add_lens($database, $user_id, @@ -30,41 +30,40 @@ function add_lens($database, $user_id, $lens_purchase_timestamp, $lens_purchased_new, $lens_access_rights) { + global $strings; + $lens_date_of_purchase = check_date_validity($lens_purchase_timestamp); $lens_model = pg_escape_string($lens_model); $lens_variation = pg_escape_string($lens_variation); $lens_serial_number = pg_escape_string($lens_serial_number); + $result = TRUE; + + pg_query($database, "begin"); if ($lens_type_id=='custom') { $new_lens_type_id = pg_fetch_row(pg_query($database, "select nextval('lens_type_id_sequence')")); $lens_type_id = $new_lens_type_id[0]; $result = pg_query($database, "insert into lens_type (identifier, manufacturer, model, variation, min_focal_length, max_focal_length, min_aperture, max_aperture, last_modified_date, last_modifying_users) values ($lens_type_id, $lens_manufacturer_id, '$lens_model', '$lens_variation', '$lens_min_focal_length_id', '$lens_max_focal_length_id', '$lens_min_aperture_id', '$lens_max_aperture_id', now(), '$user_id')"); - if (!$result) { - print "Failed to create new lens type"; - return; - } } - - $result = pg_query($database, "insert into lens (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights) + if ($result) { + $result = pg_query($database, "insert into lens (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights) values (nextval('lens_id_sequence'), '$lens_type_id', '$user_id', '$lens_serial_number', $lens_date_of_purchase, '$lens_purchased_new', '$lens_access_rights')"); - if (!$result) { - print "Failed to create new lens"; + } + if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); } } -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); add_lens($database, $po_user['id'], pg_escape_string($_REQUEST['lens_type_id']), - pg_escape_string($_REQUEST['lens_manufacturer_id']), + pg_escape_string($_REQUEST['manufacturer_id']), pg_escape_string($_REQUEST['lens_model']), pg_escape_string($_REQUEST['lens_variation']), pg_escape_string($_REQUEST['lens_min_aperture_id']), @@ -77,5 +76,5 @@ add_lens($database, $po_user['id'], pg_escape_string($_REQUEST['lens_access_rights'])); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['lens']['idx']); +header("Location: my.profile.php?selector=".$profile_data['lens']['idx']); ?> diff --git a/src/lens.add.php b/src/lens.add.php index 478aae7..9c6caff 100644 --- a/src/lens.add.php +++ b/src/lens.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,22 +17,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; -$database = site_prolog(); +$type = 'lens'; +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); $manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); switch ($manufacturer_filter) { @@ -51,61 +45,31 @@ switch ($manufacturer_filter) { $focal_length = pg_query($database, "select identifier, value from focal_length order by value"); $aperture = pg_query($database, "select identifier, value from aperture"); -site_header($page_width, "Add Lens"); +site_header(sprintf($strings['profile']['add'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Add new lens", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['lens']['idx'], $profile_data, "100%"); -print " 
    "; - if (pg_num_rows($manufacturer) == 0) { - print "\n"; - print "\n"; - print "
    \n"; - print "You must add manufacturers, before adding lenses"; - print "
     

    \n"; - print "\"Add\n"; - print "

    \n"; - + print emit_manuf_add_needed($type); display_navigator_box_bottom("100%"); - print " 
    "; site_footer($database); site_epilog($database); exit; } - -print "\n"; -print "\n"; -print "\n"; -print "\n"; - print "\n"; +print "
    \n"; -print "\n\n"; -print "\n"; -print "\n
    Lens Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; -print "
    \n"; + +emit_profile_manuf_combo("lens.add.php?type=$type", $type, 4, $manufacturer, $manufacturer_filter); + print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"20%\""); +print emit_th($strings['profile']['model'], "width=\"20%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); +print emit_th($strings['profile']['aperture_focal'], "width=\"36%\""); print "\n"; $num = pg_num_rows($lens_type); @@ -113,118 +77,105 @@ if ($num > 0) { for ($i=0; $i < $num; $i++) { $r = pg_fetch_row($lens_type, $i); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; } -} -else -print "\n"; + } else { + print "\n"; + } print "
    ManufacturerModelVariationAperture/Focal Length
    $r[1]$r[2]$r[3]"; - display_lens_string($r[4], $r[5], $r[6], $r[7]); + print "$r[1]$r[2]$r[3]"; + print emit_lens_string($r[4], $r[5], $r[6], $r[7]); print "
    No lens types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    New Lens Type
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"20%\""); +print emit_th($strings['profile']['model'], "width=\"20%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); +print emit_th($strings['generic']['aperture'], "width=\"18%\""); +print emit_th($strings['generic']['focal_length'], "width=\"18%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; print "\n"; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    ManufacturerModelVariationApertureFocal Length
    "; -print ""; +print ""; +print ""; print "\n"; -print ""; +print "\n"; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, ""); print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; +print "\n"; print "-"; print "\n"; print "\n"; +print "\n"; print "-"; print ""; print "
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; +print "
    Lens Specific Data
    \n"; +print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); print "\n"; print "\n"; -print "\n"; -print "\n"; +print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Serial NumberPurchase DatePurchased NewAccess
    \n"; -display_date_input_form("lens_purchase_timestamp", ""); +print "\n"; +print emit_date_input_form("lens_purchase_timestamp", ""); print "\n"; display_yes_no_combo("lens_purchased_new", "t"); print "\n"; display_access_combo("lens_access_rights", "t", ""); print "\n"; display_yes_no_combo("lens_purchased_new", "t"); print "\n"; display_access_combo("lens_access_rights", "t", ""); print "
    \n"; - - -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; -print "\n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/lens.del.php b/src/lens.del.php index 0362702..93101de 100644 --- a/src/lens.del.php +++ b/src/lens.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,29 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); +$type = 'lens'; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $lens_id = pg_escape_string($_REQUEST['item']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from lens where identifier=$lens_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -50,61 +46,49 @@ $lens_to_be_removed = pg_fetch_row(pg_query($database, "select name, model, vari date_of_purchase, purchased_new, url, access_rights from view_lens where identifier=$lens_id")); -site_header($page_width, "Delete Lens"); +site_header(sprintf($strings['profile']['delete'], $strings['generic'][$type])); + site_navigator(6); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete lens", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this lens. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this lens. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['lens']['idx'], $profile_data, "100%"); -print " 
    "; - -print "
    \n"; -print "\n"; +print "\n"; +print "
    \n"; +print "\n"; +print emit_td($strings['generic']['delete']." ".$strings['generic'][$type], 'colspan="6"'); print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); +print emit_th($strings['generic']['refs']); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print emit_td(emit_yes_no_text($lens_to_be_removed[9])); +print emit_td($strings['generic'][$access[$lens_to_be_removed[11]]]); +print "\n"; print "\n"; print "
    Remove Lens
    ModelSerial NumberPurchase DateNewAccess
    $lens_to_be_removed[0]\n"; +print "$lens_to_be_removed[0]\n"; print " $lens_to_be_removed[1] $lens_to_be_removed[2] "; -display_lens_string($lens_to_be_removed[3], $lens_to_be_removed[4], $lens_to_be_removed[5], $lens_to_be_removed[6]); +print emit_lens_string($lens_to_be_removed[3], $lens_to_be_removed[4], $lens_to_be_removed[5], $lens_to_be_removed[6]); print "$lens_to_be_removed[7]".generate_date_html($lens_to_be_removed[8], 'date', 1). ""; display_yes_no_text($lens_to_be_removed[9]); print"$lens_to_be_removed[11]$lens_to_be_removed[7]".emit_date_html($lens_to_be_removed[8], 'date'). "$number_of_references[0]
    \n"; -print " 
    "; if ($number_of_references[0]==0) { - print "\n"; - print "\"Cancel\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; } else { - print "\"Back\"/\n"; + print $thm_elem['button.back']; } print "
    \n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/lens.edit.2.php b/src/lens.edit.2.php index 031d681..2cb1cd4 100644 --- a/src/lens.edit.2.php +++ b/src/lens.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,22 +17,24 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/calendar.php"; function update_lens($database, $user_id, $lens_id, $lens_type_id, $lens_manufacturer_id, $lens_model, $lens_variation, $lens_min_aperture_id, $lens_max_aperture_id, $lens_min_focal_length_id, $lens_max_focal_length_id, - $lens_serial_number, $lens_purchase_timestamp, $lens_purchased_new, $lens_access_rights) { + $lens_serial_number, $lens_purchase_timestamp, $lens_purchased_new, $lens_access_rights, $exiftool_lens_id) { global $po_user; - + global $strings; + /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from lens where identifier=$lens_id and users=$po_user[id]")); if ($result[0] == 0) { + site_push_error($strings['errors']['not_owner']); return FALSE; } } @@ -54,48 +56,38 @@ function update_lens($database, $user_id, $lens_id, $lens_type_id, $lens_manufac /* create new type */ $new_lens_type_id = pg_fetch_row(pg_query($database, "select nextval('lens_type_id_sequence')")); $lens_type_id = $new_lens_type_id[0]; - $result = pg_query($database, "insert into lens_type (identifier, manufacturer, model, variation, min_focal_length, max_focal_length, min_aperture, max_aperture, last_modified_date, last_modifying_users) - values ($lens_type_id, $lens_manufacturer_id, '$lens_model', '$lens_variation', '$lens_min_focal_length_id', '$lens_max_focal_length_id', '$lens_min_aperture_id', '$lens_max_aperture_id', now(), '$user_id')"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to create new lens type"; - return FALSE; - } + $result = pg_query($database, "insert into lens_type (identifier, manufacturer, model, variation, min_focal_length, max_focal_length, min_aperture, max_aperture, last_modified_date, last_modifying_users, exiftool_lens_id) + values ($lens_type_id, $lens_manufacturer_id, '$lens_model', '$lens_variation', '$lens_min_focal_length_id', '$lens_max_focal_length_id', '$lens_min_aperture_id', '$lens_max_aperture_id', now(), '$user_id', '$exiftool_lens_id')"); } /* add lens */ - $result = pg_query($database, "update lens set type='$lens_type_id', serial_number='$lens_serial_number', date_of_purchase=$lens_date_of_purchase, purchased_new='$lens_purchased_new', access_rights='$lens_access_rights' where identifier='$lens_id'"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to create new lens"; - return FALSE; + if ($result) { + $result = pg_query($database, "update lens set type='$lens_type_id', serial_number='$lens_serial_number', date_of_purchase=$lens_date_of_purchase, purchased_new='$lens_purchased_new', access_rights='$lens_access_rights' where identifier='$lens_id'"); } /* remove old type */ - if ($lens_type_to_remove) { + if ($result && $lens_type_to_remove) { $result = pg_query($database, "delete from lens_type where identifier='$lens_type_to_remove[0]'"); - if (!$result) { - pg_query($database, "rollback"); - // print "Failed to delete lens type: $lens_type"; - return FALSE; - } } - pg_query($database, "commit"); - return TRUE; + + if ($result) { + pg_query($database, "commit"); + return TRUE; + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + return FALSE; + } + + return FALSE; } -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); update_lens($database, $po_user['id'], pg_escape_string($_REQUEST['item_id']), pg_escape_string($_REQUEST['lens_type_id']), - pg_escape_string($_REQUEST['lens_manufacturer_id']), + pg_escape_string($_REQUEST['manufacturer_id']), pg_escape_string($_REQUEST['lens_model']), pg_escape_string($_REQUEST['lens_variation']), pg_escape_string($_REQUEST['lens_min_aperture_id']), @@ -105,7 +97,8 @@ update_lens($database, $po_user['id'], pg_escape_string($_REQUEST['lens_serial_number']), pg_escape_string($_REQUEST['lens_purchase_timestamp']), pg_escape_string($_REQUEST['lens_purchased_new']), - pg_escape_string($_REQUEST['lens_access_rights'])); + pg_escape_string($_REQUEST['lens_access_rights']), + pg_escape_string($_REQUEST['exiftool_lens_id'])); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['lens']['idx']); +header("Location: my.profile.php?selector=".$profile_data['lens']['idx']); ?> diff --git a/src/lens.edit.php b/src/lens.edit.php index 2a28489..26a44e1 100644 --- a/src/lens.edit.php +++ b/src/lens.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,34 +17,29 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; -$database = site_prolog(); +$type = 'lens'; -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); $lens_id = pg_escape_string($_REQUEST['item']); $lens_current_value = pg_fetch_row(pg_query($database, "select name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, - serial_number, date_of_purchase, purchased_new, access_rights, users + serial_number, date_of_purchase, purchased_new, access_rights, users, exiftool_lens_id from view_lens where identifier='$lens_id'")); /* Ensure the user owns it !*/ if (($po_user['id'] != $lens_current_value[11]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -57,53 +52,33 @@ switch ($manufacturer_filter) { case 'All': case '': $lens_type = pg_query($database, "select identifier, name, model, variation, s_min_aperture, - s_max_aperture, s_min_focal_length, s_max_focal_length, url + s_max_aperture, s_min_focal_length, s_max_focal_length, url, exiftool_lens_id from view_lens_type order by name"); break; default: $lens_type = pg_query($database, "select identifier, name, model, variation, s_min_aperture, - s_max_aperture, s_min_focal_length, s_max_focal_length, url + s_max_aperture, s_min_focal_length, s_max_focal_length, url, exiftool_lens_id from view_lens_type where name='$manufacturer_filter' or identifier='$lens_type_current_value[0]' order by name"); } -site_header($page_width, "Edit Lens"); +site_header(sprintf($strings['profile']['edit'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit lens", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data['lens']['idx'], $profile_data, "100%"); -print " 
    "; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; - print "\n"; +print "
    \n"; -print "\n\n"; -print "\n"; -print "\n
    Lens Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; -print "
    \n"; + +emit_profile_manuf_combo("lens.edit.php?type=$type&item=$lens_id", $type, 5, $manufacturer, $manufacturer_filter); + print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"15%\""); +print emit_th($strings['profile']['model'], "width=\10%\""); +print emit_th($strings['profile']['variation'], "width=\"10%\""); +print emit_th($strings['profile']['aperture_focal'], "width=\"20%\""); +print emit_th($strings['profile']['exiftool_id'], "width=\"30%\""); print "\n"; $num = pg_num_rows($lens_type); @@ -111,131 +86,113 @@ if ($num > 0) { for ($i=0; $i < $num; $i++) { $r = pg_fetch_row($lens_type, $i); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; } -} -else -print "\n"; + } else { + print "\n"; + } + print "
    ManufacturerModelVariationAperture/Focal Length
    $r[1]$r[2]$r[3]"; - display_lens_string($r[4], $r[5], $r[6], $r[7]); + print "$r[1]$r[2]$r[3]"; + print emit_lens_string($r[4], $r[5], $r[6], $r[7]); print "$r[9]
    No lens types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    Edit Lens Type
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"15%\""); +print emit_th($strings['profile']['model'], "width=\"10%\""); +print emit_th($strings['profile']['variation'], "width=\"10%\""); +print emit_th($strings['generic']['aperture'], "width=\"15%\""); +print emit_th($strings['generic']['focal_length'], "width=\"15%\""); +print emit_th($strings['profile']['exiftool_id'], "width=\"15%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    ".sprintf($strings['profile']['edit_type'], $strings['generic'][$type])."
    ManufacturerModelVariationApertureFocal Length
    "; -print ""; +print ""; +print ""; print ""; -print ""; - +print ""; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, $lens_current_value[0]); print ""; -print "\n"; +print ""; +print "\n"; print "\n"; +print "\n"; print "\n"; print ""; +print ""; print "-"; print "\n"; print ""; +print ""; print "-"; print ""; print "
    \n"; - -print " 
    \n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n";$date_of_purchase= substr($lens_current_value[8], 0, 10); -print "\n"; -print "\n"; -print "\n"; print "\n"; print "
    Lens Specific Data
    Serial NumberPurchase DatePurchased NewAccess
    \n"; -display_date_input_form("lens_purchase_timestamp", "$date_of_purchase"); +print ""; +print "\n"; print "\n"; display_yes_no_combo("lens_purchased_new", $lens_current_value[9]); print "\n"; display_access_combo("lens_access_rights", $lens_current_value[10], ""); print "
    \n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print "\n"; +print ""; +print "\n"; + +print "\n"; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); +print "\n"; + +print "\n"; +print "\n"; +$date_of_purchase= substr($lens_current_value[8], 0, 10); +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    \n"; +print emit_date_input_form("lens_purchase_timestamp", $date_of_purchase); +print "\n"; display_yes_no_combo("lens_purchased_new", $lens_current_value[9]); print "\n"; display_access_combo("lens_access_rights", $lens_current_value[10], ""); print "
    \n"; + +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/location.add.2.php b/src/location.add.2.php index e54ad04..92eb35b 100644 --- a/src/location.add.2.php +++ b/src/location.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $location_name = pg_escape_string($_REQUEST['location_name']); $location_city = pg_escape_string($_REQUEST['location_city']); @@ -42,9 +36,9 @@ $location_private = pg_escape_string($_REQUEST['private']); $result = pg_query($database, "insert into location (identifier, place, state, country, last_modified_date, users, city, latitude, longitude, private) values (nextval('location_id_sequence'), '$location_name', $location_state, $location_country, now(), '$po_user[id]', '$location_city', '$location_latitude', '$location_longitude', '$location_private')"); if (!$result) { - // print "Failed to create new location: $location_name"; + site_push_error($strings['errors']['db_insert_failed']); } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['location']['idx']); +header("Location: my.profile.php?selector=".$profile_data['location']['idx']); ?> diff --git a/src/location.add.php b/src/location.add.php index b41b268..55e0adb 100644 --- a/src/location.add.php +++ b/src/location.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,67 +17,57 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/profile.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $all_states = pg_query($database, "select identifier, value from state order by value"); $all_countries = pg_query($database, "select identifier, value from country order by value"); -site_header($page_width, "Add Location"); +site_header(sprintf($strings['profile']['add'], $strings['generic']['location'])); site_navigator(8); -site_navigator_status("Users : My Profile : Add new location", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php?", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic']['location']), ""); -print " 
    "; display_navigator_box_top($profile_data['location']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "\n"; +print "
    \n"; print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['location'], "width=\"30%\""); +print emit_th($strings['user']['city'], "width=\"15%\""); +print emit_th($strings['user']['state'], "width=\"10%\""); +print emit_th($strings['user']['country'], "width=\"10%\""); +print emit_th($strings['photo']['latitude'], "width=\"10%\""); +print emit_th($strings['photo']['longitude'], "width=\"10%\""); +print emit_th($strings['generic']['private'], "width=\"5%\""); print ""; print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; +print ""; +print "\n"; +print "\n"; +print ""; +print ""; +print ""; print ""; print "
    LocationCityStateCountryLatitudeLongitudePrivate
    "; display_combo("location_state", $all_states, "", "", 0); print""; display_combo("location_country", $all_countries, "", "", 0); print""; +print ""; display_combo("location_state", $all_states, "", "", 0); print""; display_combo("location_country", $all_countries, "", "", 0); print""; display_yes_no_combo("private", 'f'); print "
    "; -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    "; -print " 
    "; display_location($database, "*"); display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/location.del.2.php b/src/location.del.2.php index 64bebb8..8fd35a7 100644 --- a/src/location.del.2.php +++ b/src/location.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,42 +17,35 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $location_id = pg_escape_string($_REQUEST['location']); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); if ($location_id!="") { /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from location where identifier=$location_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } $result = pg_query($database, "delete from location where identifier='$location_id'"); + if (!$result) { - // print "Failed to delete location: $location_id"; - site_epilog($database); - header("location: login.php"); - exit(); + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['location']['idx']); +header("Location: my.profile.php?selector=".$profile_data['location']['idx']); ?> diff --git a/src/location.del.php b/src/location.del.php index 1b4d043..180673e 100644 --- a/src/location.del.php +++ b/src/location.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,91 +17,71 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $location_id = pg_escape_string($_REQUEST['item']); -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from location where identifier=$location_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } -site_header($page_width, "Delete Location"); +site_header(sprintf($strings['profile']['delete'], $strings['generic']['location'])); site_navigator(8); $location = pg_fetch_row(pg_query($database, "select place, city, state, country, latitude, longitude from view_location where identifier='$location_id'")); $number_of_references = pg_fetch_row(pg_query($database, "select number_of_location_references($location_id)")); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete location", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this location. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this location. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic']['location']), ""); -print " 
    "; display_navigator_box_top($profile_data['location']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "

    "; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print ""; +print "
    Remove Location
    \n"; +print "\n"; +print "\n"; print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['location'], "width=\"30%\""); +print emit_th($strings['user']['city'], "width=\"15%\""); +print emit_th($strings['user']['state'], "width=\"10%\""); +print emit_th($strings['user']['country'], "width=\"10%\""); +print emit_th($strings['photo']['latitude'], "width=\"10%\""); +print emit_th($strings['photo']['longitude'], "width=\"10%\""); +print emit_th($strings['generic']['images_here'], "width=\"15%\""); print ""; print ""; -print ""; -print "\n"; -print "\n"; -print ""; -print "\n"; -print "\n"; -print "\n"; +print ""; +print "\n"; +print "\n"; +print ""; +print "\n"; +print "\n"; +print "\n"; print ""; print "
    ".sprintf($strings['profile']['delete'], $strings['generic']['location'])."
    LocationCityStateCountryLatitudeLongitudePhotos Here
    $location[0]$location[1]$location[2]$location[3]$location[4]$location[5]$number_of_references[0]$location[0]$location[1]$location[2]$location[3]$location[4]$location[5]$number_of_references[0]
    "; -print " 
    "; if ($number_of_references[0]==0) { - print ""; - print "Cancel/"; -} -else { - print "\"Back\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; +} else { + print $thm_elem['button.back']; } print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/location.edit.2.php b/src/location.edit.2.php index 55ea197..d6c4c54 100644 --- a/src/location.edit.2.php +++ b/src/location.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,11 +17,11 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $location_id = $_REQUEST['location']; $location_name = pg_escape_string($_REQUEST['location_name']); @@ -31,9 +31,21 @@ $location_country = $_REQUEST['location_country']; $location_latitude = pg_escape_string($_REQUEST['location_latitude']); $location_longitude = pg_escape_string($_REQUEST['location_longitude']); $location_private = pg_escape_string($_REQUEST['private']); -$database = site_prolog(); + +$database = site_prolog(PO_USER_TYPE_USER); if ($location_id!="") { + /* Ensure the user owns it !*/ + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + $result = pg_fetch_row(pg_query($database, "select count(identifier) from location where identifier=$location_id and users=$po_user[id]")); + if ($result[0] == 0) { + site_epilog($database); + site_push_error($strings['errors']['not_owner']); + header("Location: my.profile.php?selector=".$profile_data['location']['idx']); + exit(); + } + } + $result = pg_query($database, " update location set place= '$location_name', @@ -45,9 +57,9 @@ if ($location_id!="") { private = '$location_private' where identifier = '$location_id'"); if (!$result) { - print "Failed to edit location: $location_name"; + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['location']['idx']); +header("Location: my.profile.php?selector=".$profile_data['location']['idx']); ?> diff --git a/src/location.edit.php b/src/location.edit.php index 575f246..7f8e2cb 100644 --- a/src/location.edit.php +++ b/src/location.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,77 +17,71 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $location_id = pg_escape_string($_REQUEST['item']); $all_states = pg_query($database, "select identifier, value from state order by value"); $all_countries = pg_query($database, "select identifier, value from country order by value"); - $location = pg_fetch_row(pg_query($database, "select place, city, state, country, latitude, longitude, private, users from location where identifier=$location_id")); - /* Ensure the user owns it !*/ if (($po_user['id'] != $location[7]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -site_header($page_width, "Edit Location"); -site_navigator(8); -site_navigator_status("Users : My Profile : Edit Location", ""); +$number_of_references = pg_fetch_row(pg_query($database, "select number_of_location_references($location_id)")); + +site_header(sprintf($strings['profile']['edit'], $strings['generic']['location'])); +site_navigator(8); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic']['location']), ""); -print " 
    "; display_navigator_box_top($profile_data['location']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "

    "; -print "\n"; +print ""; +print "
    \n"; print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_th($strings['generic']['location'], "width=\"30%\""); +print emit_th($strings['user']['city'], "width=\"15%\""); +print emit_th($strings['user']['state'], "width=\"10%\""); +print emit_th($strings['user']['country'], "width=\"10%\""); +print emit_th($strings['photo']['latitude'], "width=\"10%\""); +print emit_th($strings['photo']['longitude'], "width=\"10%\""); +print emit_th($strings['generic']['images_here'], "width=\"5%\""); +print emit_th($strings['generic']['private'], "width=\"5%\""); print ""; print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; +print ""; +print "\n"; +print "\n"; +print ""; +print ""; +print ""; +print ""; print ""; print "
    LocationCityStateCountryLatitudeLongitudePrivate
    "; display_combo("location_state", $all_states, $location[2], "", 0); print""; display_combo("location_country", $all_countries, $location[3], "", 0); print""; +print ""; display_combo("location_state", $all_states, $location[2], "", 0); print""; display_combo("location_country", $all_countries, $location[3], "", 0); print"$number_of_references[0]"; display_yes_no_combo("private", $location[6]); print "
    "; -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/login.php b/src/login.php index 7242e1f..5bdd3ed 100644 --- a/src/login.php +++ b/src/login.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,185 +17,257 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/mail.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; -$username = pg_escape_string($_REQUEST['username']); -$password = pg_escape_string($_REQUEST['password']); -$auto_login = $_REQUEST['auto_login']; -$operation = isset($_REQUEST['operation'])? $_REQUEST['operation'] : "login"; +$username = isset($_REQUEST['username']) ? pg_escape_string($_REQUEST['username']) : ""; +$password = isset($_REQUEST['password']) ? pg_escape_string($_REQUEST['password']) : ""; +$auto_login = isset($_REQUEST['auto_login']) ? $_REQUEST['auto_login'] : ""; + +$operation = isset($_REQUEST['operation']) ? $_REQUEST['operation'] : "login"; + +/* Login reason */ +$reason = isset($_REQUEST['reason']) ? $_REQUEST['reason'] : FALSE; + +/* Referer */ +$orig = isset($_REQUEST['orig']) ? $_REQUEST['orig'] : (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""); $database = site_prolog(); $error_code = 0; +/* Initialize the language stuff here */ +$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : $po_options['lang']; +$po_options['lang'] = $lang; + +if ($reason != FALSE) + $error_code = 99; + if ($operation == "send_info") { $email = $_REQUEST['email']; if (send_login_information($database, $email)) $error_code = 2; /* success */ - else - $error_code = 3; /* failure */ + else { + $reason = "invalid_email"; + $error_code = 99; /* failure */ + } } elseif ($operation == "logout") { - setcookie($po_cookie, "", 0, "", "", 0); + if ($po_user['session_id']) + session_id($po_user['session_id']); + + session_start(); + setcookie(session_name(), '', time()-3600); + session_destroy(); + $operation = ""; - /* Clear the session ID */ - if ($po_user['id'] != FALSE) { - pg_query($database, "update users set session_id = null where identifier='$po_user[id]'"); - } - - $po_user['id'] = FALSE; - $po_user['type'] = $user_type['disabled']; + $po_user['id'] = 0; + $po_user['type'] = PO_USER_TYPE_DISABLED; $po_user['session'] = FALSE; } elseif ($operation == "login") { - if ($po_user['type'] == $user_type['disabled']) { - /* log in, first check if a username was entered */ - if ($username) { - $res = pg_query($database, "select identifier, type, shared, session_id from users where username='$username' and password='$password'"); - if ($res != FALSE && pg_num_rows($res)) { - $user_data = pg_fetch_row($res); - /* Allow simultaneous logins by using the same sessionid... */ - if (($user_data[2] == "t") && ($user_data[3] != null)) - $po_user['session'] = $user_data[3]; - else - $po_user['session'] = md5(mt_rand() . $user_data[0]); + /* log in, first check if a username was entered */ + if ($username) { + $res = pg_query($database, "SELECT identifier, type, username, first_name, last_name + FROM users + WHERE username='$username' + AND password='$password'"); + if (($res != FALSE) && pg_num_rows($res)) { + $row = pg_fetch_assoc($res); + $po_user['id'] = $row['identifier']; + $po_user['type'] = $row['type']; + $po_user['username'] = $row['username']; + $po_user['first_name'] = $row['first_name']; + $po_user['last_name'] = $row['last_name']; + $po_options['lang'] = $lang; + $po_user['auto_login'] = ($auto_login != ""); - $po_user['id'] = $user_data[0]; - $po_user['type'] = $user_data[1]; + refresh_user_prefs($database); - pg_query($database, "update users set session_id='$po_user[session]' where identifier='$user_data[0]'"); - if ($auto_login == "on") - setcookie($po_cookie, $po_user['session'], time()+157680000, "", "", 0); /* valid for 5 years */ - else - setcookie($po_cookie, $po_user['session'], 0, "", "", 0); /* valid until the end of session */ - } else { - $error_code = 1; - $operation = "logout"; + site_update_session(); + + if ($po_user['type'] == PO_USER_TYPE_DISABLED) { + $error_code = 99; + $reason = "disabled_account"; } + } else { + $error_code = 99; + $reason="invalid_login"; + $operation = "logout"; } } } /* Ensure we have a valid session! */ -$res = pg_query($database, "SELECT identifier, type - FROM users - WHERE session_id='$po_user[session]'"); -if (($res != FALSE) && pg_num_rows($res)) { - $row = pg_fetch_assoc($res); - $po_user['id'] = $row['identifier']; - $po_user['type'] = $row['type']; - } else { - $po_user['id'] = FALSE; - $po_user['type'] = $user_type['disabled']; - $po_user['session'] = FALSE; - /* Clear the cookie */ - setcookie($po_cookie, "", 0, "", "", 0); +if (!isset($_SESSION['po_user'])) { + + if ($po_user['session_id']) + session_id($po_user['session_id']); + session_start(); + setcookie(session_name(), '', time()-3600); + session_destroy(); } -site_header($page_width, "Login"); +if ($operation == "password" && $password != "") { + $found = FALSE; + foreach ($po_user['passwords'] as $pwd) { + if ($password == $pwd) { + $found = TRUE; + break; + } + } + foreach ($po_options['passwords'] as $pwd) { + if ($password == $pwd) { + $found = TRUE; + break; + } + } + if (!$found) { + if ($po_user['id']) { + array_push($po_options['passwords'], $password); + $store_user_pref($database, $po_user['id'], + 'passwords', serialize($po_options['passwords'])); + } else { + array_push($po_user['passwords'], $password); + } + } + + site_update_session(); + // print_r($po_user['passwords']); + header("Location: $orig"); + exit(); + } + +if ($po_user['type'] > PO_USER_TYPE_DISABLED) + site_header($strings['generic']['logout']); + else + site_header($strings['generic']['login']); + site_navigator(3); if ($operation == "get_email") { - site_navigator_status("Login : Preparing your login information request.", ""); - print " 
    \n"; + site_navigator_status("Login : ".$strings['login']['email_prep'], ""); print "
    \n"; - print "Please enter below the email address you have used at registration.
    "; - print "The system will look up in the database for that email address,
    "; - print "and will send you a message containing your login information.
    \n"; - print " 
    \n"; + print "

    "; + print $strings['login']['email_prompt']; + print "

    "; print "
    \n"; - print "\n"; + print "\n"; print "
    \n"; - print " 
    \n"; - print ""; + print $thm_elem['button.submit']; + print $thm_elem['button.reset']; print "
    \n"; print "

    \n"; } elseif (($operation == "login") && - ($po_user['type'] > $user_type['disabled'])) { + ($po_user['type'] > PO_USER_TYPE_DISABLED)) { $name = pg_fetch_row(pg_query($database, "select first_name, last_name, username, user_type.identifier from users, user_type where users.identifier='$po_user[id]' and users.type=user_type.identifier")); switch ($name[3]) { - case $user_type['disabled']: - $status_string = "Your account is disabled"; + case PO_USER_TYPE_DISABLED: + $status_string = $strings['login']['disabled_account']; break; - case $user_type['client']: - $status_string = "Your account is a client account."; + case PO_USER_TYPE_CLIENT: + $status_string = $strings['login']['client_account']; break; - case $user_type['user']: - $status_string = "Your account is a user account."; + case PO_USER_TYPE_USER: + $status_string = $strings['login']['user_account']; break; - case $user_type['administrator']: - $status_string = "Your account is an administrator account."; + case PO_USER_TYPE_ADMIN: + $status_string = $strings['login']['admin_account']; break; } if ($name[0] != "" || $name[1] != "") - site_navigator_status("You are logged in as $name[0] $name[1], username: $name[2]", $status_string); + site_navigator_status($strings['login']['logged_in_as'] ."$name[0] $name[1], ".$strings['generic']['username'].": $name[2]", $status_string); else - site_navigator_status("You are logged in as $name[2]", ""); - print " 
    \n"; + site_navigator_status($strings['login']['logged_in_as'] ."$name[2]", ""); + if ($reason != FALSE) { + print "

    ".$strings['errors'][$reason]."

    \n"; + if ($orig != "") { + print "

    ".$strings['generic']['return']."

    \n"; + } + } print "
    \n"; - print "

    If you wish to log out press the button below.
    - This will remove all cookies set by Photo Organizer,
    - and next time you will need to enter
    - your username and password to log in.

    \n"; + print "

    "; + print $strings['login']['logout_prompt']; + print "

    "; print "
    \n"; - print "\n"; - print ""; + print "\n"; + print "\n"; + print $thm_elem['button.logout']; print "
    \n"; - print "

    \n"; -} else { + + if ($orig != "" && $reason == 'protected') { + print " 
    \n"; + print "

    \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
    ".$strings['generic']['resource_password']."
    \n"; + print $thm_elem['button.submit']; + print "
    \n"; + } + + print "\n"; + } else { switch ($error_code) { case 0: - site_navigator_status("Login to gain full access.", ""); - break; - case 1: - site_navigator_status("Invalid login, try again.", ""); + site_navigator_status($strings['login']['login_prompt'], ""); break; case 2: - site_navigator_status("Your login information has been sent to: $email.", ""); + site_navigator_status($strings['login']['email_sent'] . " $email.", ""); break; - case 3: - site_navigator_status("No user found with email address: $email", ""); + case 99: + site_navigator_status("".$strings['errors'][$reason]."", $orig != "" ? "".$strings['generic']['return']."" : ""); break; } - print "
     
    \n"; - - print "\n"; + print "
    \n"; print "\n"; - print "
    \n"; print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "
    Username 
    Password 
    Log me in automatically in the future

    "; - print ""; - print "\"Clear\"/"; - print "
    \n"; + print "". emit_td($strings['generic']['username']). "\n"; + print "" . emit_td($strings['generic']['password'])."\n"; + print emit_language_combo($lang); + print "\n"; print "
    ".$strings['login']['auto_login']."
    \n"; + print $thm_elem['button.login']; + print $thm_elem['button.clear']; print "
    \n"; - $system_preferences = pg_fetch_row(pg_query($database, "select new_user_type from system_preferences")); - if ($system_preferences[0] != $user_type['disabled']) { + if ($orig != "" && $reason == 'protected') { print " 
    \n"; - print "If you have no username register here:
    "; + print "
    \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
    ".$strings['generic']['resource_password']."
    \n"; + print $thm_elem['button.submit']; + print "
    \n"; + } + + if ($po_options_default['new_user_type'] != PO_USER_TYPE_DISABLED) { print " 
    \n"; - print "\"Register\"/"; + print $strings['login']['user_register'] . "
    "; + print " 
    \n"; + print "
    "; + print "
    "; + print $thm_elem['button.register']; + print "
    "; + print "
    "; } print "
    "; print " 
    \n"; - print "If you forgot your username or password click here.

    "; - print " 
    \n"; + print $strings['login']['forgot_password'] ." ".$strings['generic']['here']."."; print "

    \n"; + print "
    \n"; } site_footer($database); diff --git a/src/manufacturer.add.2.php b/src/manufacturer.add.2.php index af87222..1576684 100644 --- a/src/manufacturer.add.2.php +++ b/src/manufacturer.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,19 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $manufacturer_name = pg_escape_string($_REQUEST['manufacturer_name']); $manufacturer_url = pg_escape_string($_REQUEST['manufacturer_url']); @@ -38,10 +32,10 @@ if ($manufacturer_name!="") { $result = pg_query($database, "insert into manufacturer (identifier, name, url, last_modified_date, last_modifying_users) values (nextval('manufacturer_id_sequence'), '$manufacturer_name', '$manufacturer_url', now(), '$po_user[id]')"); if (!$result) { - print "Failed to create new manufacturer: $manufacturer_name"; + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); +header("Location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); ?> diff --git a/src/manufacturer.add.php b/src/manufacturer.add.php index b72a8ec..40ad488 100644 --- a/src/manufacturer.add.php +++ b/src/manufacturer.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,52 +17,42 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -site_header($page_width, "Add Manufacturer"); +site_header(sprintf($strings['profile']['add'], $strings['generic']['manufacturer'])); site_navigator(6); -site_navigator_status("
    Users : My Profile : Add new manufacturer", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php?", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic']['manufacturer']), ""); -print " 
    "; display_navigator_box_top($profile_data['manufacturer']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "\n"; -print "\n"; +print "
    New Manufacturer
    \n"; +print "\n"; print ""; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print ""; print ""; -print ""; -print ""; +print ""; +print ""; print ""; print "
    ".sprintf($strings['profile']['add'], $strings['generic']['manufacturer'])."
    NameURL".$strings['generic']['name']."".$strings['user']['web']."
    "; -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    "; -print " 
    "; display_manufacturer($database, $po_user['id'], "*"); display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/manufacturer.del.2.php b/src/manufacturer.del.2.php index 79dd22d..588d383 100644 --- a/src/manufacturer.del.2.php +++ b/src/manufacturer.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,39 +17,33 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $manufacturer_id = pg_escape_string($_REQUEST['manufacturer']); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); if ($manufacturer_id!="") { /* Ensure the user owns it !*/ - if ($po_user['type'] < $user_type['administrator']) { + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); exit(); } } $result = pg_query($database, "delete from manufacturer where identifier='$manufacturer_id'"); if (!$result) { - print "Failed to delete manufacturer: $manufacturer_id"; + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); +header("Location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); ?> diff --git a/src/manufacturer.del.php b/src/manufacturer.del.php index caef3e2..9e90d27 100644 --- a/src/manufacturer.del.php +++ b/src/manufacturer.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,82 +17,63 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $manufacturer_id=pg_escape_string($_REQUEST['item']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { - $result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and users=$po_user[id]")); +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + $result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and last_modifying_users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); exit(); } } -site_header($page_width, "Delete Manufacturer"); +site_header(sprintf($strings['profile']['delete'], $strings['generic']['manufacturer'])); site_navigator(6); $manufacturer = pg_fetch_row(pg_query($database, "select name, url from manufacturer where identifier='$manufacturer_id'")); $number_of_references = pg_fetch_row(pg_query($database, "select number_of_manufacturer_ref($manufacturer_id)")); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete manufacturer", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this manufacturer. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this manufacturer. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic']['manufacturer']), ""); -print " 
    "; display_navigator_box_top($profile_data['manufacturer']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "

    "; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print ""; +print "
    Remove Manufacturer
    \n"; +print "\n"; +print "\n"; print ""; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; print ""; print ""; -print ""; -print ""; +print ""; +print ""; +print ""; print ""; print "
    ".sprintf($strings['profile']['delete'], $strings['generic']['manufacturer'])."
    NameURL".$strings['generic']['name']."".$strings['user']['web']."".$strings['generic']['refs']."
    $manufacturer[0]$manufacturer[1]$manufacturer[0]$manufacturer[1]$number_of_references[0]
    "; -print " 
    "; if ($number_of_references[0]==0) { - print ""; - print "\"Cancel\"/"; -} -else { - print "\"Back\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; +} else { + print $thm_elem['button.back']; } print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/manufacturer.edit.2.php b/src/manufacturer.edit.2.php index 5d8e14f..85e7fc2 100644 --- a/src/manufacturer.edit.2.php +++ b/src/manufacturer.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; @@ -26,29 +26,24 @@ $manufacturer_id = pg_escape_string($_REQUEST['manufacturer']); $manufacturer_name = pg_escape_string($_REQUEST['manufacturer_name']); $manufacturer_url = pg_escape_string($_REQUEST['manufacturer_url']); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); if (($manufacturer_id!="") && ($manufacturer_name!="")) { - if ($po_user['type'] < $user_type['administrator']) { - $result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and users=$po_user[id]")); + if ($po_user['type'] < PO_USER_TYPE_ADMIN) { + $result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and last_modifying_users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); exit(); } } $result = pg_query($database, "update manufacturer set name='$manufacturer_name', url='$manufacturer_url' where identifier='$manufacturer_id'"); if (!$result) { - print "Failed to edit manufacturer: $manufacturer_name"; + site_push_error($strings['errors']['db_insert_failed']); } } site_epilog($database); -header("location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); +header("Location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); ?> diff --git a/src/manufacturer.edit.php b/src/manufacturer.edit.php index a0e54c4..ce1b202 100644 --- a/src/manufacturer.edit.php +++ b/src/manufacturer.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,61 +17,52 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $manufacturer_id=pg_escape_string($_REQUEST['item']); -$manufacturer = pg_fetch_row(pg_query($database, "select name, url, users from manufacturer where identifier=$manufacturer_id")); +$manufacturer = pg_fetch_row(pg_query($database, "select name, url, last_modifying_users from manufacturer where identifier=$manufacturer_id")); /* Ensure the user owns it !*/ if (($po_user['id'] != $manufacturer[2]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: my.profile.php?selector=".$profile_data['manufacturer']['idx']); exit(); } -site_header($page_width, "Edit Manufacturer"); +site_header(sprintf($strings['profile']['edit'], $strings['generic']['manufacturer'])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit Manufacturer", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php?", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic']['manufacturer']), ""); - -print " 
    "; display_navigator_box_top($profile_data['manufacturer']['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "

    "; -print "\n"; +print ""; +print "
    \n"; print ""; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print ""; print ""; -print ""; -print ""; +print ""; +print ""; print ""; print "
    NameURL".$strings['generic']['name']."".$strings['user']['web']."
    "; -print " 
    "; -print ""; -print "\"Cancel\"/"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/my.datebook.php b/src/my.datebook.php index e3fac41..5b90624 100644 --- a/src/my.datebook.php +++ b/src/my.datebook.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,130 +17,138 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "include/datebook.php"; -include_once "$theme/theme.php"; -include_once "include/common.php"; include_once "include/site.php"; +include_once "include/datebook.php"; +include_once "include/common.php"; include_once "include/contacts.php"; -$selector = $_REQUEST['selector']; -if (!$selector) { - $selector = 1; -} +$showcounts = TRUE; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$calendar_view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 1; +$calendar_year = (int) isset($_REQUEST['year']) ? $_REQUEST['year'] : FALSE; +$calendar_month = (int) isset($_REQUEST['month']) ? $_REQUEST['month'] : FALSE; +$calendar_day = (int) isset($_REQUEST['day']) ? $_REQUEST['day'] : FALSE; -$user_pref = pg_fetch_row(pg_query($database, "select start_day, start_hour, end_hour, shop_enable from users, preferences where preferences.identifier=users.preferences and users.identifier=$po_user[id]")); -$calendar_view = $_REQUEST['view']; -$calendar_year = (int)$_REQUEST['year']; -$calendar_month = (int)$_REQUEST['month']; -if ($calendar_month < 1 || $calendar_month > 12) { - $calendar_month = 1; -} -$calendar_day = (int)$_REQUEST['day']; -$day_in_month = getDaysInMonth($calendar_year, $calendar_month); -if ($calendar_day < 1 || $calendar_day > $day_in_month) { - $calendar_day = 1; -} -$calendar_week = getWeekNumber($calendar_year, $calendar_month, $calendar_day, $user_pref[0]); - -site_header($page_width, "Display Datebook"); +site_header($strings['generic']['my_datebook']); site_navigator(8); -site_navigator_status("Users : My Date Book", ""); -print " 
    "; +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['my_datebook'], ""); -switch ($calendar_view) { - default: $calendar_view = 3; - case 3: $calendar_view_string = "Month View"; break; - case 1: $calendar_view_string = "Day View"; break; - case 2: $calendar_view_string = "Week View"; break; - case 4: $calendar_view_string = "Go To"; break; +print "
    "; + +print "
    "; +print "
      "; + +$day_in_month = getDaysInMonth($calendar_year, $calendar_month); +if ($calendar_day === FALSE || $calendar_day < 1 || $calendar_day > $day_in_month) { + $today = getdate(time()); + $calendar_day = $today["mday"]; + } +if ($calendar_month === FALSE || $calendar_month < 1 || $calendar_month > 12) { + $today = getdate(time()); + $calendar_month = $today["mon"]; + } +if ($calendar_year === FALSE) { + $today = getdate(time()); + $calendar_year = $today["year"]; + } + +$calendar_week = getWeekNumber($calendar_year, $calendar_month, $calendar_day, $po_options['start_day']); +if ($calendar_week=="") { + $today = getdate(time()); + $calendar_week = getWeekNumber($calendar_year, $today["mon"], $today["mday"], $po_options['start_day']); + } + +if ($calendar_view == "" || $calendar_view == 1) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } + print "
    • ".$strings['datebook']['day']."
    • "; + +$week = getWeekNumber($calendar_year, $calendar_month, $calendar_day, $po_options['start_day']); +if ($calendar_view == 2) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } +print "
    • ".$strings['datebook']['week']."
    • "; +if ($calendar_view == 3) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } +print "
    • ".$strings['datebook']['month']."
    • "; +if ($calendar_view == 4) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } +print "
    • ".$strings['datebook']['goto']."
    • "; + +// get correct YMD. +{ + $today = getdate(time()); + $day = $today["mday"]; + $month = $today["mon"]; + $year = $today["year"]; + + print "
    • ".$strings['datebook']['today']."
    • "; + print "
    • ".$strings['datebook']['this_week']."
    • "; + print "
    • ".$strings['datebook']['this_month']."
    • "; } +print "
    "; +print "
    "; + switch ($calendar_view) { default: case 1: - if ($calendar_day=="" || $calendar_month=="" || $calendar_year=="") { - $today = getdate(time()); - $calendar_year = $today["year"]; - $calendar_month = $today["mon"]; - $calendar_day = $today["mday"]; - } + displayDayHTML($database, $po_user['id'], $calendar_year, $calendar_month, $calendar_day, $po_options['start_hour'], $po_options['end_hour'], $calendar_view, $showcounts); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - $yesterday = adjustDay($calendar_year, $calendar_month, $calendar_day - 1); - print ""; - print "\"Previous"; - print "\n"; $timestamp = mktime(12, 0, 0, $calendar_month, $calendar_day, $calendar_year); $date = getdate($timestamp); $dayNameIndex = $date["wday"]; - print "  $dayNames[$dayNameIndex], $monthNames[$calendar_month] $calendar_day, $calendar_year  "; - print "\n"; - $tomorrow = adjustDay($calendar_year, $calendar_month, $calendar_day + 1); - print ""; - print "\"Next"; - print "
    \n"; - print " 
    "; - displayDayHTML($database, $po_user['id'], $calendar_year, $calendar_month, $calendar_day, $user_pref[1], $user_pref[2], $dayNames, $user_pref[0], $calendar_view); + print "
    "; + $yesterday = adjustDay($calendar_year, $calendar_month, $calendar_day - 1); + + print sprintf($thm_elem['button.previous'], "my.datebook.php?view=1&year=$yesterday[0]&month=$yesterday[1]&day=$yesterday[2]", $strings['generic']['day'], ""); + + print "   $dayNames[$dayNameIndex] ".strftime($strings['formats']['date'], $timestamp)."  "; + $tomorrow = adjustDay($calendar_year, $calendar_month, $calendar_day + 1); + print sprintf($thm_elem['button.next'], "my.datebook.php?view=1&year=$tomorrow[0]&month=$tomorrow[1]&day=$tomorrow[2]", $strings['generic']['day'], ""); + + print "
    "; + break; case 2: - if ($calendar_week=="" || $calendar_year=="") { - $today = getdate(time()); - $calendar_year = $today["year"]; - $calendar_week = getWeekNumber($calendar_year, $today["mon"], $today["mday"], $user_pref[0]); - } - $firstDayOfWeek = getFirstDayOfWeek($calendar_year, $calendar_week, $user_pref[0]); + displayWeekHTML($database, $po_user['id'], $calendar_year, $calendar_week, $dayNames, $po_options['start_day'], $calendar_view, $showcounts); + + $firstDayOfWeek = getFirstDayOfWeek($calendar_year, $calendar_week, $po_options['start_day']); $lastDayOfWeek = adjustDay($firstDayOfWeek[0], $firstDayOfWeek[1], $firstDayOfWeek[2]+7); $month1 = $firstDayOfWeek[1]; $month2 = $lastDayOfWeek[1]; - print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; + print "
    "; $prev_week = adjustDay($calendar_year, $calendar_month, $calendar_day - 7); - print ""; - print "\"Previous"; - print "
    \n"; + print sprintf($thm_elem['button.previous'], "my.datebook.php?view=2&year=$prev_week[0]&month=$prev_week[1]&day=$prev_week[2]", $strings['generic']['week'], ""); if ($firstDayOfWeek[0] != $lastDayOfWeek[0]) - print "  Week $calendar_week, $monthNames[$month1] $firstDayOfWeek[0] - $monthNames[$month2] $lastDayOfWeek[0]  "; + print "  ".$strings['datebook']['week2']." $calendar_week, $monthNames[$month1] $firstDayOfWeek[0] - $monthNames[$month2] $lastDayOfWeek[0]  "; else { if ($firstDayOfWeek[1] != $lastDayOfWeek[1]) - print "  Week $calendar_week, $monthNames[$month1] - $monthNames[$month2] $lastDayOfWeek[0]  "; + print "  ".$strings['datebook']['week2']." $calendar_week, $monthNames[$month1] - $monthNames[$month2] $lastDayOfWeek[0]  "; else - print "  Week $calendar_week, $monthNames[$month2] $lastDayOfWeek[0]  "; + print "  ".$strings['datebook']['week2']." $calendar_week, $monthNames[$month2] $lastDayOfWeek[0]  "; } - print "\n"; $next_week = adjustDay($calendar_year, $calendar_month, $calendar_day + 7); - print ""; - print "\"Next"; - print "
    \n"; - print "

    \n"; + print sprintf($thm_elem['button.next'], "my.datebook.php?view=2&year=$next_week[0]&month=$next_week[1]&day=$next_week[2]", $strings['generic']['week'], ""); + print "

    "; - print " 
    "; - displayWeekHTML($database, $po_user['id'], $calendar_year, $calendar_week, $dayNames, $user_pref[0], $calendar_view); break; case 3: if ($calendar_month=="" || $calendar_year=="") { @@ -149,76 +157,59 @@ switch ($calendar_view) { $calendar_month = $today["mon"]; } - print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - $next_month = adjustMonth($calendar_year, $calendar_month - 1); - print ""; - print "\"Previous"; - print "\n"; - print "  $monthNames[$calendar_month], $calendar_year  "; - print "\n"; - $previous_month = adjustMonth($calendar_year, $calendar_month + 1); - print ""; - print "\"Next"; - print "
    \n"; - print "

    \n"; + displayMonthHTML($database, $po_user['id'], $calendar_year, $calendar_month, $dayNames, $po_options['start_day'], $calendar_view, $showcounts); + + print "

    "; + $next_month = adjustMonth($calendar_year, $calendar_month - 1); + print sprintf($thm_elem['button.previous'], "my.datebook.php?view=3&year=$next_month[0]&month=$next_month[1]", $strings['generic']['month'], ""); + + print "  $monthNames[$calendar_month] $calendar_year  "; + $previous_month = adjustMonth($calendar_year, $calendar_month + 1); + print sprintf($thm_elem['button.next'], "my.datebook.php?view=3&year=$previous_month[0]&month=$previous_month[1]", $strings['generic']['month'], ""); + print "
    "; - print " 
    "; - displayMonthHTML($database, $po_user['id'], $calendar_year, $calendar_month, $dayNames, $user_pref[0], $calendar_view); break; case 4: - print "
    \n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    \n"; - $next_year = $calendar_year - 1; - print ""; - print "\"Previous"; - print "\n"; - print "   $calendar_year   "; - print "\n"; - $previous_year = $calendar_year + 1; - print ""; - print "\"Next"; - print "

    \n"; - - print "\n"; + print "
    "; + print "
    \n"; print "\n"; for ($month_index=1; $month_index < 13; $month_index++) { if ($month_index == $calendar_month) - $bgcolor = $color[highlight]; + $bgcolor = "class=\"selected\""; else - $bgcolor = $color[table_body]; - print "\n"; - if ($month_index==6) - print "\n"; } print "\n"; - print "
    \n"; + $bgcolor = ""; + print "\n"; print "  $monthNames[$month_index]  "; print "

    \n"; + print "

    \n"; - print "\n"; + print "
    "; + + print "
    "; + $next_year = $calendar_year - 1; + + print sprintf($thm_elem['button.previous'], "my.datebook.php?view=4&year=$next_year&month=$calendar_month", $strings['generic']['year'], ""); + + print "   $calendar_year   "; + $previous_year = $calendar_year + 1; + + print sprintf($thm_elem['button.next'], "my.datebook.php?view=4&year=$previous_year&month=$calendar_month", $strings['generic']['year'], ""); + + print "
    "; + + print "
    \n"; print "\n"; - print "\n"; + print emit_th($strings['datebook']['week2']); for ($dayIncrement = 0; $dayIncrement < 7; $dayIncrement++) - print "\n"; + print "\n"; print "\n"; // get timestamp of first day of month at noon $timestamp = mktime(12, 0, 0, $calendar_month, 1, $calendar_year); // get first day index 0 Sunday $date = getdate($timestamp); - $day = $user_pref[0] + 1 - $date["wday"]; + $day = $po_options['start_day'] + 1 - $date["wday"]; if ($day > 1) $day -= 7; @@ -229,129 +220,53 @@ switch ($calendar_view) { while ($day <= $daysInMonth) { print "\n"; $curDate = adjustDay($calendar_year, $calendar_month, $day); - $weekNumber=getWeekNumber($curDate[0], $curDate[1], $curDate[2], $user_pref[0]); - print "\n"; + $weekNumber=getWeekNumber($curDate[0], $curDate[1], $curDate[2], $po_options['start_day']); + print "\n"; for ($i = 0; $i < 7; $i++) { $curDate = adjustDay($calendar_year, $calendar_month, $day); - $bgcolor = $color[highlight]; + $num_photos = 0; + if ($showcounts) { + $num_photos = photos_between_dates($database, $po_user['id'], + mktime(0,0,0,$curDate[1],$curDate[2],$curDate[0]), + mktime(0,0,0,$curDate[1],$curDate[2]+1,$curDate[0])); + } + + $bgcolor = ""; if ($curDate[2]!=$day) - $bgcolor = $color[table_body]; - if ($calendar_year == $today["year"] && $calendar_month == $today["mon"] && $day == $today["mday"]) - $bgcolor = $color[selected]; - print "\n"; + $bgcolor = "class=\"inactive\""; + if (($calendar_year == $today["year"]) && + ($calendar_month == $today["mon"]) && + ($day == $today["mday"])) { + $bgcolor = "class=\"selected\""; + } + + print "\n"; $day++; } print "\n"; } - print "
    Week" . $dayNames[($user_pref[0] + $dayIncrement) % 7] . "" . $dayNames[($po_options['start_day'] + $dayIncrement) % 7] . "
    "; - print "$weekNumber"; + print "$weekNumber$curDate[2]$curDate[2]"; + if ($showcounts && $num_photos > 0) { + print " ($num_photos)"; + } + print "

    \n"; - - $today = getdate(time()); - $year = $today["year"]; - $month = $today["mon"]; - $day = $today["mday"]; - $week = getWeekNumber($year, $month, $day, $user_pref[0]); - - print "\"Today\"/\n"; - print "\"This\n"; - print "\"This\n"; - print "

    \n"; - print "\n"; - print "\n"; - print "\n"; - print ""; print "
     
    \n"; + print "\n"; + + print ""; + print "
    "; + break; } -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    \n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    \n"; -if ($calendar_view == 1) { - print "\"Day"; -} -else { - print ""; - print "\"Day"; -} -print "\n"; -$week = getWeekNumber($calendar_year, $calendar_month, $calendar_day, $user_pref[0]); -if ($calendar_view == 2) { - print "\"Week"; -} -else { - print ""; - print "\"Week"; -} -print "\n"; -if ($calendar_view == 3) { - print "\"Month"; -} -else { - print ""; - print "\"Month"; -} -print "\n"; -if ($calendar_view == 4) { - print "\"Go"; -} -else { - print ""; - print "\"Ratings\"/"; -} -print "
    \n"; -print "
    \n"; - -print " 
    "; -display_navigator_box_top($selector, $datebook_data, "100%"); - print " 
    "; -switch ($selector) { - case $datebook_data['clients']['idx']: - if ($po_user['type'] > $user_type['client']) { - display_clients($database, $po_user['id'], $user_type); - print " 
    "; - } - - display_protected_photographers($database, $po_user['id']); - - /* if shop is disabled return here */ - if ($user_pref[3]=='f') { - display_navigator_box_bottom("100%"); - site_footer($database); - site_epilog($database); - exit(); - } - break; - case $datebook_data['orders']['idx']: - if ($po_user['type'] > $user_type['client']) { - displayMerchandiserTransaction($database, $po_user['id'], 1); - } - displayClientTransaction($database, $po_user['id'], 1); - break; - case $datebook_data['shipments']['idx']: - if ($po_user['type'] > $user_type['client']) { - displayMerchandiserTransaction($database, $po_user['id'], 2); - } - displayClientTransaction($database, $po_user['id'], 2); - break; +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + display_clients($database, $po_user['id']); } -display_navigator_box_bottom("100%"); -print " 
    "; - +display_protected_photographers($database, $po_user['id']); site_footer($database); site_epilog($database); + ?> diff --git a/src/my.folder.php b/src/my.folder.php deleted file mode 100644 index 50af847..0000000 --- a/src/my.folder.php +++ /dev/null @@ -1,56 +0,0 @@ - $user_type['client']) { - site_navigator_status("Users : My Folders and Albums", ""); -} else { - site_navigator_status("Users : My Albums", ""); -} - -print " 
    "; -if ($po_user['type'] > $user_type['client']) { - display_folders($database, "", $po_user['id'], $po_user['type'], $po_user['id'], "with_header"); - print " 
    "; -} -display_albums($database, "", $po_user['id'], $po_user['type'], $po_user['id'], $po_user['type'], "with_header"); -print " 
    "; -site_footer($database); -site_epilog($database); - -?> diff --git a/src/my.profile.php b/src/my.profile.php index 2207422..73bab4a 100644 --- a/src/my.profile.php +++ b/src/my.profile.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,33 +17,21 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/profile.php"; +; -$selector = $_REQUEST['selector']; -if (!$selector) { - $selector = 1; -} +$selector = isset($_REQUEST['selector']) ? $_REQUEST['selector'] : 1; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -site_header($page_width, "Display Profile"); +site_header($strings['generic']['my_profile']); site_navigator(6); -site_navigator_status("Users : My Profile", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['my_profile'], ""); -print " 
    "; display_navigator_box_top($selector, $profile_data, "100%"); -print " 
    "; switch ($selector) { case $profile_data['lens']['idx']: @@ -71,12 +59,7 @@ switch ($selector) { display_manufacturer($database, $po_user['id'], $po_user['id']); break; case $profile_data['label']['idx']: - display_label($database, $po_user['id'], $po_user['id']); - break; - case $profile_data['shop']['idx']: - display_shop_categories($database, $po_user['id'], $po_user['id']); - print "

    "; - display_shop_items($database, $po_user['id'], $po_user['id']); + display_label($database, $po_user['id']); break; case $profile_data['location']['idx']: display_location($database, $po_user['id']); @@ -84,7 +67,7 @@ switch ($selector) { } display_navigator_box_bottom("100%"); -print " 
    "; + site_footer($database); site_epilog($database); ?> diff --git a/src/my.settings.php b/src/my.settings.php index edc1918..2c6730d 100644 --- a/src/my.settings.php +++ b/src/my.settings.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,139 +17,212 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/color.php"; -include_once "include/settings.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; -include_once "include/profile.php"; +include_once "include/orderby.php"; include_once "include/site.php"; -$database = site_prolog(); +$settings_user_data = array(); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); +function settings_i18n_data() { + global $settings_user_data; + global $strings; + + $settings_user_data = array("identification" => array("idx" => 1, 'link' => "my.settings.php?selector=1", "alt" => $strings['user']['identification']), + "contact" => array("idx" => 2, 'link' => "my.settings.php?selector=2", "alt" => $strings['user']['contact']), + "calendar" => array("idx" => 3, 'link' => "my.settings.php?selector=3", "alt" => $strings['user']['calendar']), + "search" => array("idx" => 4, 'link' => "my.settings.php?selector=4", "alt" => $strings['user']['search_engine']), + "photo_browser" => array("idx" => 5, 'link' => "my.settings.php?selector=5", "alt" => $strings['user']['photo_browser']), + "photo_upload" => array("idx" => 6, 'link' => "my.settings.php?selector=6", "alt" => $strings['user']['photo_upload']), + "printer" => array("idx" => 7, 'link' => "my.settings.php?selector=7", "alt" => $strings['user']['printing'])); } -$selector = $_REQUEST['selector']; -if (!$selector) { - $selector = 1; -} +$generate_i18n_data[] = "settings_i18n_data"; -$registrsation_error = 0; +$database = site_prolog(PO_USER_TYPE_CLIENT); -$save_settings = $_REQUEST['save_settings']; -$username = $_REQUEST['username']; -$password_1 = $_REQUEST['password_1']; -$password_2 = $_REQUEST['password_2']; -$first_name = $_REQUEST['first_name']; -$last_name = $_REQUEST['last_name']; -$company = $_REQUEST['company']; -$contact_info_id = $_REQUEST['contact_info_id']; -$preferences_id = $_REQUEST['preferences_id']; -$im_options_id = $_REQUEST['im_options_id']; -$im_composite_options_id = $_REQUEST['im_composite_options_id']; -$dcraw_options_id = $_REQUEST['dcraw_options_id']; -$address1 = $_REQUEST['address1']; -$address2 = $_REQUEST['address2']; -$city = $_REQUEST['city']; -$zipcode = $_REQUEST['zipcode']; -$state = $_REQUEST['state']; -$country = $_REQUEST['country']; -$email = $_REQUEST['email']; -$url = $_REQUEST['url']; -$phone = $_REQUEST['phone']; -$print_out = $_REQUEST['print_out']; -$paper = $_REQUEST['paper']; -$label = $_REQUEST['label']; -$start_hour = $_REQUEST['start_hour']; -$end_hour = $_REQUEST['end_hour']; -$download_counter = $_REQUEST['download_counter']; -$download_expiry_period = $_REQUEST['download_expiry_period']; -$start_day = $_REQUEST['start_day']; -$num_of_columns = $_REQUEST['num_of_columns']; -$num_of_rows = $_REQUEST['num_of_rows']; -$folder_view = $_REQUEST['folder_view']; -$num_of_rows_l = $_REQUEST['num_of_rows_l']; -$type = $_REQUEST['type']; -$popup_enable = $_REQUEST['popup_enable']; +$selector = isset($_REQUEST['selector']) ? $_REQUEST['selector'] : 1; -if ($popup_enable != 'f') { - $popup_delay = $popup_enable; - $popup_enable = 't'; -} -else { - $popup_delay = 0; -} +$registration_error = 0; -$im_preview_quality = $_REQUEST['im_preview_quality']; -$im_preview_color_space = $_REQUEST['im_preview_color_space']; -$im_preview_gamma = $_REQUEST['im_preview_gamma']; -$im_preview_sharpen_radius = $_REQUEST['im_preview_sharpen_radius']; -$im_preview_sharpen_sigma = $_REQUEST['im_preview_sharpen_sigma']; -$im_preview_sharpen_amount = $_REQUEST['im_preview_sharpen_amount']; -$im_preview_sharpen_threshold = $_REQUEST['im_preview_sharpen_threshold']; -$im_preview_border_width = $_REQUEST['im_preview_border_width']; -$im_preview_border_height = $_REQUEST['im_preview_border_height']; -$im_preview_border_color = $_REQUEST['im_preview_border_color']; +$save_settings = isset($_REQUEST['save_settings']) ? $_REQUEST['save_settings'] : FALSE; -$im_thumb_quality = $_REQUEST['im_thumb_quality']; -$im_thumb_color_space = $_REQUEST['im_thumb_color_space']; -$im_thumb_gamma = $_REQUEST['im_thumb_gamma']; -$im_thumb_sharpen_radius = $_REQUEST['im_thumb_sharpen_radius']; -$im_thumb_sharpen_sigma = $_REQUEST['im_thumb_sharpen_sigma']; -$im_thumb_sharpen_amount = $_REQUEST['im_thumb_sharpen_amount']; -$im_thumb_sharpen_threshold = $_REQUEST['im_thumb_sharpen_threshold']; -$im_thumb_border_width = $_REQUEST['im_thumb_border_width']; -$im_thumb_border_height = $_REQUEST['im_thumb_border_height']; -$im_thumb_border_color = $_REQUEST['im_thumb_border_color']; +$password_1 = isset($_REQUEST['password_1']) ? $_REQUEST['password_1'] : ""; +$password_2 = isset($_REQUEST['password_2']) ? $_REQUEST['password_2'] : ""; -$im_watermark_brightness = $_REQUEST['im_watermark_brightness']; -$im_watermark_location = $_REQUEST['im_watermark_location']; +if (isset($_REQUEST['hide'])) { + $po_user['hide'] = $_REQUEST['hide']; + } +if (isset($_REQUEST['address1'])) { + $po_user['address1'] = $_REQUEST['address1']; + } +if (isset($_REQUEST['address2'])) { + $po_user['address2'] = $_REQUEST['address2']; + } +if (isset($_REQUEST['city'])) { + $po_user['city'] = $_REQUEST['city']; + } +if (isset($_REQUEST['zipcode'])) { + $po_user['zipcode'] = $_REQUEST['zipcode']; + } +if (isset($_REQUEST['state'])) { + $po_user['state'] = $_REQUEST['state']; + } +if (isset($_REQUEST['country'])) { + $po_user['country'] = $_REQUEST['country']; + } +if (isset($_REQUEST['email'])) { + $po_user['email'] = $_REQUEST['email']; + } +if (isset($_REQUEST['url'])) { + $po_user['url'] = $_REQUEST['url']; + } +if (isset($_REQUEST['phone'])) { + $po_user['phone'] = $_REQUEST['phone']; + } +if (isset($_REQUEST['first_name'])) { + $po_user['first_name'] = $_REQUEST['first_name']; + } +if (isset($_REQUEST['last_name'])) { + $po_user['last_name'] = $_REQUEST['last_name']; + } +if (isset($_REQUEST['company'])) { + $po_user['company'] = $_REQUEST['company']; + } +if (isset($_REQUEST['start_hour'])) { + $po_options['start_hour'] = $_REQUEST['start_hour']; + } +if (isset($_REQUEST['end_hour'])) { + $po_options['end_hour'] = $_REQUEST['end_hour']; + } +if (isset($_REQUEST['start_day'])) { + $po_options['start_day'] = $_REQUEST['start_day']; + } +if (isset($_REQUEST['download_expory_period'])) { + $po_options['download_expory_period'] = $_REQUEST['download_expory_period']; + } +if (isset($_REQUEST['search_engine_type'])) { + $po_options['search_engine_type'] = $_REQUEST['search_engine_type']; + } +if (isset($_REQUEST['search_enable_stemming'])) { + $po_options['search_enable_stemming'] = $_REQUEST['search_enable_stemming']; + } +if (isset($_REQUEST['paper'])) { + $po_options['paper'] = $_REQUEST['paper']; + } +if (isset($_REQUEST['label'])) { + $po_options['label'] = $_REQUEST['label']; + } +if (isset($_REQUEST['print_out'])) { + $po_options['print_out'] = $_REQUEST['print_out']; + } +if (isset($_REQUEST['popup_enable'])) { + $popup_enable = $_REQUEST['popup_enable']; + if ($popup_enable != 'f') { + $po_options['popup_enable'] = 't'; + $po_options['popup_delay'] = $popup_enable; + } else { + $po_options['popup_enable'] = 'f'; + } + } -$dcraw_gamma = $_REQUEST['dcraw_gamma']; -$dcraw_brightness = $_REQUEST['dcraw_brightness']; -$dcraw_white_balance = $_REQUEST['dcraw_white_balance']; -$dcraw_bitdepth = $_REQUEST['dcraw_bitdepth']; +if (isset($_REQUEST['ufraw_gamma'])) { + $po_options['ufraw_gamma'] = $_REQUEST['ufraw_gamma']; + } +if (isset($_REQUEST['ufraw_gamma_linearity'])) { + $po_options['ufraw_gamma_linearity'] = $_REQUEST['ufraw_gamma_linearity']; + } +if (isset($_REQUEST['dcraw_brightness'])) { + $po_options['dcraw_brightness'] = $_REQUEST['dcraw_brightness']; + } +if (isset($_REQUEST['raw_white_balance'])) { + $po_options['raw_white_balance'] = $_REQUEST['raw_white_balance']; + } +if (isset($_REQUEST['extract_jpgfromraw'])) { + $po_options['jpgfromraw'] = $_REQUEST['extract_jpgfromraw']; + } +if (isset($_REQUEST['raw_bitdepth'])) { + $po_options['raw_bitdepth'] = $_REQUEST['raw_bitdepth']; + } +if (isset($_REQUEST['watermark_location'])) { + $po_options['watermark_location'] = $_REQUEST['watermark_location']; + } +if (isset($_REQUEST['watermark_brightness'])) { + $po_options['watermark_brightness'] = $_REQUEST['watermark_brightness']; + } +if (isset($_REQUEST['preview_format'])) { + $po_options['preview_format'] = $_REQUEST['preview_format']; + } +if (isset($_REQUEST['preview_quality'])) { + $po_options['preview_quality'] = $_REQUEST['preview_quality']; + } +if (isset($_REQUEST['preview_color_space'])) { + $po_options['preview_color_space'] = $_REQUEST['preview_color_space']; + } +if (isset($_REQUEST['preview_gamma'])) { + $po_options['preview_gamma'] = $_REQUEST['preview_gamma']; + } +if (isset($_REQUEST['preview_border_width'])) { + $po_options['preview_border_width'] = $_REQUEST['preview_border_width']; + } +if (isset($_REQUEST['preview_border_height'])) { + $po_options['preview_border_height'] = $_REQUEST['preview_border_height']; + } +if (isset($_REQUEST['preview_border_color'])) { + $po_options['preview_border_color'] = $_REQUEST['preview_border_color']; + } +if (isset($_REQUEST['preview_sharpen_radius'])) { + $po_options['preview_sharpen_radius'] = $_REQUEST['preview_sharpen_radius']; + } +if (isset($_REQUEST['preview_sharpen_sigma'])) { + $po_options['preview_sharpen_sigma'] = $_REQUEST['preview_sharpen_sigma']; + } +if (isset($_REQUEST['preview_sharpen_amount'])) { + $po_options['preview_sharpen_amount'] = $_REQUEST['preview_sharpen_amount']; + } +if (isset($_REQUEST['preview_sharpen_threshold'])) { + $po_options['preview_sharpen_threshold'] = $_REQUEST['preview_sharpen_threshold']; + } +if (isset($_REQUEST['preview_copy_metadata'])) { + $po_options['preview_copy_metadata'] = $_REQUEST['preview_copy_metadata']; + } +if (isset($_REQUEST['thumb_format'])) { + $po_options['thumb_format'] = $_REQUEST['thumb_format']; + } +if (isset($_REQUEST['thumb_quality'])) { + $po_options['thumb_quality'] = $_REQUEST['thumb_quality']; + } +if (isset($_REQUEST['thumb_color_space'])) { + $po_options['thumb_color_space'] = $_REQUEST['thumb_color_space']; + } +if (isset($_REQUEST['thumb_gamma'])) { + $po_options['thumb_gamma'] = $_REQUEST['thumb_gamma']; + } +if (isset($_REQUEST['thumb_border_width'])) { + $po_options['thumb_border_width'] = $_REQUEST['thumb_border_width']; + } +if (isset($_REQUEST['thumb_border_height'])) { + $po_options['thumb_border_height'] = $_REQUEST['thumb_border_height']; + } +if (isset($_REQUEST['thumb_border_color'])) { + $po_options['thumb_border_color'] = $_REQUEST['thumb_border_color']; + } +if (isset($_REQUEST['thumb_sharpen_radius'])) { + $po_options['thumb_sharpen_radius'] = $_REQUEST['thumb_sharpen_radius']; + } +if (isset($_REQUEST['thumb_sharpen_sigma'])) { + $po_options['thumb_sharpen_sigma'] = $_REQUEST['thumb_sharpen_sigma']; + } +if (isset($_REQUEST['thumb_sharpen_amount'])) { + $po_options['thumb_sharpen_amount'] = $_REQUEST['thumb_sharpen_amount']; + } +if (isset($_REQUEST['thumb_sharpen_threshold'])) { + $po_options['thumb_sharpen_threshold'] = $_REQUEST['thumb_sharpen_threshold']; + } -$search_engine_type = $_REQUEST['search_engine_type']; -$search_enable_stemming = $_REQUEST['search_enable_stemming']; - -if (!$im_preview_quality) $im_preview_quality = 0; -if (!$im_preview_color_space) $im_preview_color_space = $default_im_preview_color_space; -if (!$im_preview_gamma) $im_preview_gamma = $default_im_preview_gamma; -if (!$im_preview_sharpen_radius) $im_preview_sharpen_radius = 0; -if (!$im_preview_sharpen_sigma) $im_preview_sharpen_sigma = 0; -if (!$im_preview_sharpen_amount) $im_preview_sharpen_amount = 0; -if (!$im_preview_sharpen_threshold) $im_preview_sharpen_threshold = 0; -if (!$im_preview_border_width) $im_preview_border_width = $default_im_preview_border_width; -if (!$im_preview_border_height) $im_preview_border_height = $default_im_preview_border_height; -if (!$im_preview_border_color) $im_preview_border_color = $default_im_preview_border_color; - -if (!$im_thumb_quality) $im_thumb_quality = 0; -if (!$im_thumb_color_space) $im_thumb_color_space = $default_im_thumb_color_space; -if (!$im_thumb_gamma) $im_thumb_gamma = $default_im_thumb_gamma; -if (!$im_thumb_sharpen_radius) $im_thumb_sharpen_radius = 0; -if (!$im_thumb_sharpen_sigma) $im_thumb_sharpen_sigma = 0; -if (!$im_thumb_sharpen_amount) $im_thumb_sharpen_amount = 0; -if (!$im_thumb_sharpen_threshold) $im_thumb_sharpen_threshold = 0; -if (!$im_thumb_border_width) $im_thumb_border_width = $default_im_thumb_border_width; -if (!$im_thumb_border_height) $im_thumb_border_height = $default_im_thumb_border_height; -if (!$im_thumb_border_color) $im_thumb_border_color = $default_im_thumb_border_color; - -if (!$im_watermark_brightness) $im_watermark_brightness = $default_im_watermark_brightness; -if (!$im_watermark_location) $im_watermark_location = $default_im_watermark_location; - -if (!$dcraw_gamma) $dcraw_gamma = $default_dcraw_gamma; -if (!$dcraw_brightness) $dcraw_brightness = $default_dcraw_brightness; -if (!$dcraw_white_balanace) $dcraw_white_balanace = $default_dcraw_white_balanace; -if (!$dcraw_bitdepth) $dcraw_bitdepth = $default_dcraw_bitdepth; - -if (!$paper) $paper = $default_paper; -if (!$label) $label = $default_label; +/* Store any updated values! */ +site_update_session(); $all_states = pg_query($database, "select identifier, value from state order by value"); $all_countries = pg_query($database, "select identifier, value from country order by value"); @@ -162,526 +235,362 @@ $all_labels = pg_query($database, " where label.paper=paper.identifier"); if ($save_settings != "true") { - $user_data = pg_fetch_row(pg_query($database, "select username, password, first_name, last_name, company, contact, preferences, imagemagick_options, imagemagick_composite_options, dcraw_options, type from users where identifier='$po_user[id]'")); - $username = $user_data[0]; - $password_1 = $user_data[1]; - $password_2 = $user_data[1]; - $first_name = $user_data[2]; - $last_name = $user_data[3]; - $company = $user_data[4]; - $contact_info_id = $user_data[5]; - $preferences_id = $user_data[6]; - $im_options_id = $user_data[7]; - $im_composite_options_id = $user_data[8]; - $dcraw_options_id = $user_data[9]; - $type = $user_data[10]; + refresh_user_prefs($database); + site_update_session(); +} else { + pg_query($database, "begin"); - $contact_info = pg_fetch_row(pg_query($database, "select address1, address2, city, zipcode, state, country, phone, email, url from contact_info where identifier='$contact_info_id'")); - $address1 = $contact_info[0]; - $address2 = $contact_info[1]; - $city = $contact_info[2]; - $zipcode = $contact_info[3]; - $state = $contact_info[4]; - $country = $contact_info[5]; - $phone = $contact_info[6]; - $email = $contact_info[7]; - $url = $contact_info[8]; - - $preferences = pg_fetch_row(pg_query($database, " - select print_out, start_hour, end_hour, start_day, num_of_rows, num_of_columns, - folder_view, num_of_rows_l, paper, label, popup_enable, popup_delay, search_enable_stemming, - search_default_mode, download_counter, download_expiry_period - from preferences - where identifier=$preferences_id")); - - $print_out = $preferences[0]; - $start_hour = $preferences[1]; - $end_hour = $preferences[2]; - $start_day = $preferences[3]; - $num_of_rows = $preferences[4]; - $num_of_columns = $preferences[5]; - $folder_view = $preferences[6]; - $num_of_rows_l = $preferences[7]; - $paper = $preferences[8]; - $label = $preferences[9]; - $popup_enable = $preferences[10]; - $popup_delay = $preferences[11]; - $search_enable_stemming = $preferences[12]; - $search_engine_type = $preferences[13]; - $download_counter = $preferences[14]; - $download_expiry_period = $preferences[15]; - - $imagemagick_options = pg_fetch_row(pg_query($database, " - select preview_quality, preview_colorspace, preview_gamma, - preview_sharpen_radius, preview_sharpen_sigma, - preview_sharpen_amount, preview_sharpen_threshold, - preview_border_width, preview_border_height, preview_border_color, - thumb_quality, thumb_colorspace, thumb_gamma, - thumb_sharpen_radius, thumb_sharpen_sigma, - thumb_sharpen_amount, thumb_sharpen_threshold, - thumb_border_width, thumb_border_height, thumb_border_color - from imagemagick_options - where identifier=$im_options_id")); - - $im_preview_quality = $imagemagick_options[0]; - $im_preview_color_space = $imagemagick_options[1]; - $im_preview_gamma = $imagemagick_options[2]; - $im_preview_sharpen_radius = $imagemagick_options[3]; - $im_preview_sharpen_sigma = $imagemagick_options[4]; - $im_preview_sharpen_amount = $imagemagick_options[5]; - $im_preview_sharpen_threshold = $imagemagick_options[6]; - $im_preview_border_width = $imagemagick_options[7]; - $im_preview_border_height = $imagemagick_options[8]; - $im_preview_border_color = $imagemagick_options[9]; - - $im_thumb_quality = $imagemagick_options[10]; - $im_thumb_color_space = $imagemagick_options[11]; - $im_thumb_gamma = $imagemagick_options[12]; - $im_thumb_sharpen_radius = $imagemagick_options[13]; - $im_thumb_sharpen_sigma = $imagemagick_options[14]; - $im_thumb_sharpen_amount = $imagemagick_options[15]; - $im_thumb_sharpen_threshold = $imagemagick_options[16]; - $im_thumb_border_width = $imagemagick_options[17]; - $im_thumb_border_height = $imagemagick_options[18]; - $im_thumb_border_color = $imagemagick_options[19]; - - $imagemagick_composite_options = pg_fetch_row(pg_query($database, " - select gravity, watermark, (select photo from photo_version where identifier = imagemagick_composite_options.photo_version) - from imagemagick_composite_options - where imagemagick_composite_options.identifier=$im_composite_options_id")); - - $im_watermark_location = $imagemagick_composite_options[0]; - $im_watermark_brightness = $imagemagick_composite_options[1]; - $im_watermark_photo_version = $imagemagick_composite_options[2]; - - $dcraw_options = pg_fetch_row(pg_query($database, " - select gamma, brightness, white_balance, bitdepth - from dcraw_options - where dcraw_options.identifier = $dcraw_options_id")); - - $dcraw_gamma = $dcraw_options[0]; - $dcraw_brightness = $dcraw_options[1]; - $dcraw_white_balance = $dcraw_options[2]; - $dcraw_bitdepth = $dcraw_options[3]; -} -else { switch ($selector) { case $settings_user_data['identification']['idx']: - if (($password_2 != $password_1) || (($password_2 == "") && ($password_1 == ""))) { + if (($password_2 != $password_1) && + (($password_2 != "") || ($password_1 != ""))) { + site_push_error($strings['errors']['password_mismatch']); $registration_error = 1; - } - elseif (($first_name == "") || ($last_name == "")) { - $registration_error = 3; - } - elseif ($email == "") { - $registration_error = 4; - } - else { - $result = pg_fetch_row(pg_query($database, "select identifier from users where username='$username' and identifier!='$po_user[id]'")); - if ($result[0] != 0) { - $registration_error = 2; - } - else { - pg_query($database, "begin"); - $result = pg_query($database, "update contact_info set email='$email' where identifier=$contact_info_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } - $result = pg_query($database, "update users set first_name = '$first_name', last_name = '$last_name', username = '$username', password = '$password_1' - where identifier = $po_user[id]"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } - pg_query($database, "commit"); - } + } elseif (($po_user['first_name'] == "") || ($po_user['last_name'] == "")) { + site_push_error($strings['errors']['name_mandatory']); + $registration_error = 1; + } elseif ($po_user['email'] == "") { + site_push_error($strings['errors']['email_mandatory']); + $registration_error = 1; + } else { + $result = pg_query($database, "update contact_info set email='$po_user[email]' where identifier=$po_user[contact_id]"); + $result = pg_query($database, "update users set first_name = '$po_user[first_name]', last_name = '$po_user[last_name]', password = '$password_1', hide='$po_user[hide]' + where identifier = $po_user[id]"); } break; case $settings_user_data['contact']['idx']: - pg_query($database, "begin"); - $result = pg_query($database, "update contact_info set address1='$address1', address2='$address2', city='$city', - zipcode='$zipcode', state=$state, country=$country, phone='$phone', url='$url' - where identifier=$contact_info_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } + $result = pg_query($database, "update contact_info set address1='$po_user[address1]', address2='$po_user[address2]', city='$po_user[city]', + zipcode='$po_user[zipcode]', state=$po_user[state], country=$po_user[country], phone='$po_user[phone]', url='$po_user[url]' + where identifier=$po_user[contact_id]"); $result = pg_query($database, "update users set company='$company' where identifier=$po_user[id]"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } - pg_query($database, "commit"); break; case $settings_user_data['calendar']['idx']: - $result = pg_query($database, "update preferences - set start_hour='$start_hour', - end_hour='$end_hour', - start_day='$start_day', - download_counter=$download_counter, - download_expiry_period=$download_expiry_period - where identifier=$preferences_id"); + $result = store_user_pref($database, $po_user['id'], 'start_hour', $po_options['start_hour']); + $result = store_user_pref($database, $po_user['id'], 'end_hour', $po_options['end_hour']); + $result = store_user_pref($database, $po_user['id'], 'start_day', $po_options['start_day']); break; case $settings_user_data['search']['idx']: - $result = pg_query($database, "update preferences - set search_enable_stemming = '$search_enable_stemming', - search_default_mode = $search_engine_type - where identifier=$preferences_id"); + $result = store_user_pref($database, $po_user['id'], 'search_enable_stemming', $po_options['search_enable_stemming']); + $result = store_user_pref($database, $po_user['id'], 'search_default_mode', $po_options['search_default_mode']); break; case $settings_user_data['photo_browser']['idx']: - $result = pg_query($database, "update preferences set num_of_rows='$num_of_rows', num_of_columns='$num_of_columns', - folder_view='$folder_view', num_of_rows_l='$num_of_rows_l', - popup_enable='$popup_enable', popup_delay=$popup_delay - where identifier=$preferences_id"); + $result = store_user_pref($database, $po_user['id'], 'popup_enable', $po_options['popup_enable']); + $result = store_user_pref($database, $po_user['id'], 'popup_delay', $po_options['popup_delay']); + $result = store_user_pref($database, $po_user['id'], 'photos_per_page', $po_options['photos_per_page']); + $result = store_user_pref($database, $po_user['id'], 'rows_list_view', $po_options['rows_list_view']); + $result = store_user_pref($database, $po_user['id'], 'photo_view', $po_options['photo_view']); + $result = store_user_pref($database, $po_user['id'], 'order_by', $po_options['order_by']); break; case $settings_user_data['photo_upload']['idx']: - if ($type >= $user_type['user']) { - pg_query($database, "begin"); - $result = pg_query($database, "update imagemagick_options set - preview_quality = $im_preview_quality, preview_colorspace = '$im_preview_color_space', preview_gamma = $im_preview_gamma, - preview_sharpen_radius = $im_preview_sharpen_radius, preview_sharpen_sigma = $im_preview_sharpen_sigma, - preview_sharpen_amount = $im_preview_sharpen_amount, preview_sharpen_threshold = $im_preview_sharpen_threshold, - preview_border_width = $im_preview_border_width, preview_border_height = $im_preview_border_height, - preview_border_color = '$im_preview_border_color', - thumb_quality = $im_thumb_quality, thumb_colorspace = '$im_thumb_color_space', thumb_gamma = $im_thumb_gamma, - thumb_sharpen_radius = $im_thumb_sharpen_radius, thumb_sharpen_sigma = $im_thumb_sharpen_sigma, - thumb_sharpen_amount = $im_thumb_sharpen_amount, thumb_sharpen_threshold = $im_thumb_sharpen_threshold, - thumb_border_width = $im_thumb_border_width, thumb_border_height = $im_thumb_border_height, - thumb_border_color = '$im_thumb_border_color' - where identifier=$im_options_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } + if ($po_user['type'] >= PO_USER_TYPE_USER) { + $result = store_user_pref($database, $po_user['id'], 'preview_format', $po_options['preview_format']); + $result = store_user_pref($database, $po_user['id'], 'preview_quality', $po_options['preview_quality']); + $result = store_user_pref($database, $po_user['id'], 'preview_color_space', $po_options['preview_color_space']); + $result = store_user_pref($database, $po_user['id'], 'preview_gamma', $po_options['preview_gamma']); + $result = store_user_pref($database, $po_user['id'], 'preview_sharpen_radius', $po_options['preview_sharpen_radius']); + $result = store_user_pref($database, $po_user['id'], 'preview_sharpen_sigma', $po_options['preview_sharpen_sigma']); + $result = store_user_pref($database, $po_user['id'], 'preview_sharpen_amount', $po_options['preview_sharpen_amount']); + $result = store_user_pref($database, $po_user['id'], 'preview_sharpen_threshold', $po_options['preview_sharpen_threshold']); + $result = store_user_pref($database, $po_user['id'], 'preview_border_width', $po_options['preview_border_width']); + $result = store_user_pref($database, $po_user['id'], 'preview_border_height', $po_options['preview_border_height']); + $result = store_user_pref($database, $po_user['id'], 'preview_border_color', $po_options['preview_border_color']); + $result = store_user_pref($database, $po_user['id'], 'preview_copy_metadata', $po_options['preview_copy_metadata']); + $result = store_user_pref($database, $po_user['id'], 'thumb_format', $po_options['thumb_format']); + $result = store_user_pref($database, $po_user['id'], 'thumb_quality', $po_options['thumb_quality']); + $result = store_user_pref($database, $po_user['id'], 'thumb_color_space', $po_options['thumb_color_space']); + $result = store_user_pref($database, $po_user['id'], 'thumb_gamma', $po_options['thumb_gamma']); + $result = store_user_pref($database, $po_user['id'], 'thumb_sharpen_radius', $po_options['thumb_sharpen_radius']); + $result = store_user_pref($database, $po_user['id'], 'thumb_sharpen_sigma', $po_options['thumb_sharpen_sigma']); + $result = store_user_pref($database, $po_user['id'], 'thumb_sharpen_amount', $po_options['thumb_sharpen_amount']); + $result = store_user_pref($database, $po_user['id'], 'thumb_sharpen_threshold', $po_options['thumb_sharpen_threshold']); + $result = store_user_pref($database, $po_user['id'], 'thumb_border_width', $po_options['thumb_border_width']); + $result = store_user_pref($database, $po_user['id'], 'thumb_border_height', $po_options['thumb_border_height']); + $result = store_user_pref($database, $po_user['id'], 'thumb_border_color', $po_options['thumb_border_color']); + + /* Watermarking options */ + $result = store_user_pref($database, $po_user['id'], 'watermark_location', $po_options['watermark_location']); + $result = store_user_pref($database, $po_user['id'], 'watermark_brightness', $po_options['watermark_brightness']); - $result = pg_query($database, "update imagemagick_composite_options set - gravity = '$im_watermark_location', - watermark = $im_watermark_brightness - where identifier = $im_composite_options_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } - - $result = pg_query($database, "update dcraw_options set - gamma = $dcraw_gamma, - brightness = $dcraw_brightness, - white_balance = '$dcraw_white_balance', - bitdepth = $dcraw_bitdepth - where identifier= $dcraw_options_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: my.settings.php?selector=".$settings_user_data['identification']['idx']); - exit(); - } - - pg_query($database, "commit"); + /* Raw Options */ + $result = store_user_pref($database, $po_user['id'], 'ufraw_gamma', $po_options['ufraw_gamma']); + $result = store_user_pref($database, $po_user['id'], 'ufraw_gamma_linearity', $po_options['ufraw_gamma_linearity']); + $result = store_user_pref($database, $po_user['id'], 'dcraw_brightness', $po_options['dcraw_brightness']); + $result = store_user_pref($database, $po_user['id'], 'raw_bitdepth', $po_options['raw_bitdepth']); + $result = store_user_pref($database, $po_user['id'], 'raw_white_balance', $po_options['raw_white_balance']); + $result = store_user_pref($database, $po_user['id'], 'jpgfromraw', $po_options['jpgfromraw']); } break; case $settings_user_data['printer']['idx']: - if ($type >= $user_type['user']) { - $result = pg_query($database, "update preferences set print_out='$print_out', label='$label', paper='$paper' - where identifier=$preferences_id"); + if ($po_user['type'] >= PO_USER_TYPE_USER) { + $result = store_user_pref($database, $po_user['id'], 'print_out', $po_options['print_out']); + $result = store_user_pref($database, $po_user['id'], 'label', $po_options['label']); + $result = store_user_pref($database, $po_user['id'], 'paper', $po_options['paper']); } } -} -site_header($page_width, "Display Settings"); + if (!$result) { + pg_query($database, "rollback"); + site_epilog($database); + if (!$registration_error) { + site_push_error($strings['errors']['db_insert_failed']); + } + header("Location: my.settings.php?selector=$selector"); + exit(); + } + pg_query($database, "commit"); + } + +site_header($strings['generic']['my_settings']); site_navigator(7); -switch ($registration_error) { - case 1: - site_navigator_status("Users : My Settings : Password Mismatch", ""); - break; - case 2: - site_navigator_status("Users : My Settings : Username already in use", ""); - break; - case 3: - site_navigator_status("Users : My Settings : First name and and last name is mandatory.", ""); - break; - case 4: - site_navigator_status("Users : My Settings : Email is mandatory.", ""); - break; - default: - site_navigator_status("Users : My Settings", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['my_settings'], ""); +display_navigator_box_top($selector, $settings_user_data, "100%"); -print " 
    "; - -display_navigator_box_top($selector, $type >= $user_type['user'] ? $settings_user_data : $settings_client_data, "100%"); - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print " 
    "; +print "\n"; +print "\n"; +print "\n"; switch ($selector) { case $settings_user_data['identification']['idx']: - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "
    Username
    Password
    Retype password
    First name
    Last name
    Email
    \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print ""; + print ""; + print "\n"; + print "\n"; print "
    ".$strings['generic']['username']."$po_user[username]
    ".$strings['user']['first_name']."
    ".$strings['user']['last_name']."
    ".$strings['user']['email']."
    ".$strings['user']['hide'] .""; + display_yes_no_combo("hide", $po_user['hide']); + print "
    ".$strings['generic']['password']."
    ".$strings['generic']['password_again']."
    \n"; break; case $settings_user_data['contact']['idx']: - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    Url
    Phone
    Company
    Address "; - print "
    "; - print ""; - print "
    "; - print ""; - print "
    "; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "
    ".$strings['user']['web']."
    ".$strings['user']['phone']."
    ".$strings['user']['company']."
    ".$strings['user']['address'].""; + print "
    "; + print ""; print "
    City
    Zipcode
    State "; display_combo("state", $all_states, $state, "", 0); print"
    Country "; display_combo("country", $all_countries, $country, "", 0); print"
    ".$strings['user']['city']."
    ".$strings['user']['post_code']."
    ".$strings['user']['state']." "; display_combo("state", $all_states, $po_user['state'], "", 0); print"
    ".$strings['user']['country']." "; display_combo("country", $all_countries, $po_user['country'], "", 0); print"
    \n"; break; case $settings_user_data['calendar']['idx']: - print "\n"; - print "
    Week begins with "; - display_first_day_combo("start_day", $start_day); + print "\n"; + print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    ".$strings['profile']['week_begins'].""; + display_first_day_combo("start_day", $po_options['start_day']); print "
    Start hour "; - display_hour_combo("start_hour", $start_hour, ""); + print "
    ".$strings['profile']['start_hour'].""; + display_hour_combo("start_hour", $po_options['start_hour'], FALSE); print "
    End hour "; - display_hour_combo("end_hour", $end_hour, ""); + print "
    ".$strings['profile']['end_hour'].""; + display_hour_combo("end_hour", $po_options['end_hour'], FALSE); print "
    Download Counter "; - display_download_counter_combo("download_counter", $download_counter); - print "
    Download Expiry Period "; - display_download_expiry_date_combo("download_expiry_period", $download_expiry_period); - print "
    \n"; break; case $settings_user_data['search']['idx']: - print "\n"; - print "
    Default Engine Type "; - display_search_engine_type_combo("search_engine_type", $search_engine_type); + print "\n"; + print "\n"; - print "\n"; print "
    ".$strings['profile']['default_engine'].""; + display_search_engine_type_combo("search_engine_type", $po_options['search_engine_type']); print "
    Enable Stemming "; - display_yes_no_combo("search_enable_stemming", $search_enable_stemming); + print "
    ".$strings['profile']['enable_stemming'].""; + display_yes_no_combo("search_enable_stemming", $po_options['search_enable_stemming']); print "
    \n"; break; case $settings_user_data['photo_browser']['idx']: - print "\n"; - print "
    Default folder view "; - display_folder_view_combo("folder_view", $folder_view); + print "\n"; + print "\n"; + print "\n"; + print "\n"; - print "\n"; - print "\n"; - print "\n"; - print ""; + print "\n"; print "
    ".$strings['profile']['popup_enable'].""; + display_popup_delay_combo("popup_enable", $po_options['popup_delay'], $po_options['popup_enable']); print "
    Number of columns in slide view mode "; - display_num_of_columns_combo("num_of_columns", $num_of_columns); + print "
    ".$strings['profile']['photos_slide'].""; + display_photos_per_page_combo("photos_per_page", $po_options['photos_per_page'], FALSE); print "
    Number of rows in slide view mode "; - display_num_of_rows_combo("num_of_rows", $num_of_rows, $maximum_num_of_rows_in_slide_view); + print "
    ".$strings['profile']['photos_list'].""; + display_photos_per_page_combo("rows_list_view", $po_options['rows_list_view'], FALSE); print "
    Number of rows in list view mode "; - display_num_of_rows_combo("num_of_rows_l", $num_of_rows_l, $maximum_num_of_rows_in_list_view); - print "
    Popup photo info"; - display_popup_delay_combo("popup_enable", $popup_delay, $popup_enable); + print "
    ".$strings['profile']['default_view'].""; + print "".$strings['generic']['slide_view']."
    "; + print "".$strings['generic']['list_view']; + print "
    ".$strings['profile']['default_sort'].""; + display_order_by_combo($po_options['order_by']); print "
    \n"; break; case $settings_user_data['photo_upload']['idx']: - if ($type >= $user_type['user']) { + if ($po_user['type'] >= PO_USER_TYPE_USER) { /* PHOTO UPLOAD OPTINS */ - print "

    "; - print "\n"; - print "
    "; - print ""; - print ""; - print ""; - print "
    Photo Upload OptionsThumbnailPreview
    \n"; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + + print "\n"; - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; + print "\n"; - print "\n"; - print ""; + print ""; + print "\n"; + print "
    ".$strings['profile']['upload_options']."".$strings['profile']['thumbnail']."".$strings['profile']['preview']."
    ".$strings['profile']['gamma'].""; + print emit_float_combo("thumb_gamma", $po_options['thumb_gamma'], + 0.8, 2.3, 0.10); + print ""; + print emit_float_combo("preview_gamma", $po_options['preview_gamma'], + 0.8, 2.3, 0.10); print "
    Quality"; - print ""; - display_im_quality_combo("im_thumb_quality", $im_thumb_quality); - print ""; - display_im_quality_combo("im_preview_quality", $im_preview_quality); - print "
    Color Space"; - print ""; - display_im_colorspace_combo("im_thumb_color_space", $im_thumb_color_space); - print ""; - display_im_colorspace_combo("im_preview_color_space", $im_preview_color_space); - print "
    Gamma"; - print ""; - display_im_gamma_combo("im_thumb_gamma", $im_thumb_gamma); - print ""; - display_im_gamma_combo("im_preview_gamma", $im_preview_gamma); - print "
    Sharpen radius x sigma + amount + threshold"; - print ""; - display_im_sharpen_combo("im_thumb_sharpen_radius", $im_thumb_sharpen_radius); + print "
    ".$strings['profile']['sharpening'].""; + print emit_float_combo("thumb_sharpen_radius", $po_options['thumb_sharpen_radius'], + 0.05, 3, 0.05); print " x "; - display_im_sharpen_combo("im_thumb_sharpen_sigma", $im_thumb_sharpen_sigma); + print emit_float_combo("thumb_sharpen_sigma", $po_options['thumb_sharpen_sigma'], + 0.05, 3, 0.05); print " + "; - display_im_amount_combo("im_thumb_sharpen_amount", $im_thumb_sharpen_amount); + print emit_float_combo("thumb_sharpen_amount", $po_options['thumb_sharpen_amount'], + 0, 5, 0.10); print " + "; - display_im_threshold_combo("im_thumb_sharpen_threshold", $im_thumb_sharpen_threshold); - print ""; - display_im_sharpen_combo("im_preview_sharpen_radius", $im_preview_sharpen_radius); + print emit_float_combo("thumb_sharpen_threshold", $po_options['thumb_sharpen_threshold'], + 0, 1, 0.05); + print ""; + print emit_float_combo("preview_sharpen_radius", $po_options['preview_sharpen_radius'], + 0.05, 3, 0.05); print " x "; - display_im_sharpen_combo("im_preview_sharpen_sigma", $im_preview_sharpen_sigma); + print emit_float_combo("preview_sharpen_sigma", $po_options['preview_sharpen_sigma'], + 0.05, 3, 0.05); print " + "; - display_im_amount_combo("im_preview_sharpen_amount", $im_preview_sharpen_amount); + print emit_float_combo("preview_sharpen_amount", $po_options['preview_sharpen_amount'], + 0, 5, 0.10); print " + "; - display_im_threshold_combo("im_preview_sharpen_threshold", $im_preview_sharpen_threshold); + print emit_float_combo("preview_sharpen_threshold", $po_options['preview_sharpen_threshold'], + 0, 1, 0.05); print "
    Border widht x height"; - print ""; - display_im_border_combo("im_thumb_border_width", $im_thumb_border_width); + print "
    ".$strings['profile']['border'].""; + display_im_border_combo("thumb_border_width", $po_options['thumb_border_width']); print " x "; - display_im_border_combo("im_thumb_border_height", $im_thumb_border_height); - print ""; - display_im_border_combo("im_preview_border_width", $im_preview_border_width); + display_im_border_combo("thumb_border_height", $po_options['thumb_border_height']); + print " & "; + display_im_color_combo("thumb_border_color", $po_options['thumb_border_color']); + print ""; + display_im_border_combo("preview_border_width", $po_options['preview_border_width']); print " x "; - display_im_border_combo("im_preview_border_height", $im_preview_border_height); + display_im_border_combo("preview_border_height", $po_options['preview_border_height']); + print " & "; + display_im_color_combo("preview_border_color", $po_options['preview_border_color']); print "
    Border Color"; - print ""; - display_im_color_combo("im_thumb_border_color", $im_thumb_border_color); - print ""; - display_im_color_combo("im_preview_border_color", $im_preview_border_color); + print "
    ".$strings['profile']['format'].""; + print emit_filetype_combo('thumb_format', $po_options['thumb_format']); + print ""; + print emit_filetype_combo('preview_format', $po_options['preview_format']); + print "
    ".$strings['profile']['quality']; + print ""; + display_im_quality_combo("thumb_quality", $po_options['thumb_quality']); + print ""; + display_im_quality_combo("preview_quality", $po_options['preview_quality']); print "
    Quality"; - print ""; - display_im_quality_combo("im_thumb_quality", $im_thumb_quality); - print ""; - display_im_quality_combo("im_preview_quality", $im_preview_quality); + print "
    ".$strings['profile']['colorspace'].""; + display_im_colorspace_combo("thumb_color_space", $po_options['thumb_color_space']); + print ""; + display_im_colorspace_combo("preview_color_space", $po_options['preview_color_space']); print "
    Color Space"; - print ""; - display_im_colorspace_combo("im_thumb_color_space", $im_thumb_color_space); - print ""; - display_im_colorspace_combo("im_preview_color_space", $im_preview_color_space); + print "
    ".$strings['profile']['metadata']."".$strings['generic']['no'].""; + print display_yes_no_combo("preview_copy_metadata", $po_options['preview_copy_metadata']); + print "
    \n"; + + /* RAW OPTIONS */ + print "\n"; + print "\n"; + + print "\n"; + + print "\n"; + + print "\n"; + + print "\n"; + + // DCRAW-specific + print "\n"; + + // UFRAW-specific. + print "\n"; + print "\n"; print "
    ".$strings['profile']['raw_options']."
    ".$strings['profile']['raw_decoder'].""; + print "$raw_decoder"; + print "
    ".$strings['profile']['jpgfromraw'].""; + print display_yes_no_combo("extract_jpgfromraw", $po_options['jpgfromraw']); + print "
    ".$strings['profile']['white_balance'].""; + display_dcraw_white_balance_combo("raw_white_balance", $po_options['raw_white_balance']); + print "
    ".$strings['profile']['bitdepth'].""; + display_dcraw_bitdepth_combo("raw_bitdepth", $po_options['raw_bitdepth']); + print "
    ".$strings['profile']['brightness'].""; + print emit_float_combo("dcraw_brightness", $po_options['dcraw_brightness'], + 0, 3, 0.05); + print "
    ".$strings['profile']['raw_gamma'].""; + print emit_float_combo("ufraw_gamma", $po_options['ufraw_gamma'], + 0, 1, 0.01); + print "
    ".$strings['profile']['raw_gamma_lin'].""; + print emit_float_combo("ufraw_gamma_linearity", $po_options['ufraw_gamma_linearity'], + 0, 1, 0.01); print "
    \n"; - print "

    "; - - /* DCRAW OPTIONS */ - print "

    "; - print "\n"; - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "\n"; - - print "
    DCRAW Options
    Gamma"; - print ""; - display_dcraw_float_resolution_combo("dcraw_gamma", $dcraw_gamma, 3); - print "
    Brightness"; - print ""; - display_dcraw_float_resolution_combo("dcraw_brightness", $dcraw_brightness, 3); - print "
    White Balance"; - print ""; - display_dcraw_white_balance_combo("dcraw_white_balance", $dcraw_white_balance); - print "
    Bitdepth"; - print ""; - display_dcraw_bitdepth_combo("dcraw_bitdepth", $dcraw_bitdepth); - print "
    \n"; - print "

    "; - /* WATERMARKING OPTIONS */ - print "

    "; - print "\n"; - print "\n"; + print "
    Watermarking Options
    \n"; + print "\n"; - print "\n"; - - print "\n"; - - if ($im_watermark_photo_version) { - print "\n"; + if ($po_options['watermark_photo'] > 0) { + print ""; + print ""; } + + print "\n"; + + print "\n"; + print "
    ".$strings['profile']['watermark_options']."
    Watermark Brightness"; - print ""; - display_im_watermark_brightness("im_watermark_brightness", $im_watermark_brightness); - print "
    Watermark Mask"; - print ""; - display_im_watermark_mask_location("im_watermark_location", $im_watermark_location); - print "
    Current Watermark"; - print ""; - print "\"watermark\"/"; - print "
    ".$strings['profile']['watermark_photo']."\"watermark\"/"; + print "
    ".$strings['profile']['watermark_brightness'].""; + display_im_watermark_brightness("watermark_brightness", $po_options['watermark_brightness']); + print "
    ".$strings['profile']['watermark_mask'].""; + display_im_watermark_mask_location("watermark_location", $po_options['watermark_location']); + print "
    \n"; - print "

    "; } break; case $settings_user_data['printer']['idx']: - if ($type >= $user_type['user']) { - print "\n"; - print "
    Default print format "; - display_print_format_combo("print_out", $print_out); + if ($po_user['type'] >= PO_USER_TYPE_USER) { + print "\n"; + print "\n"; - print "\n"; - print "\n"; print "
    ".$strings['profile']['print_format'].""; + display_print_format_combo("print_out", $po_options['print_out']); print "
    Default paper "; - display_combo("paper", $all_papers, $paper, ", ", 1); + print "
    ".$strings['profile']['print_paper'] .""; + display_combo("paper", $all_papers, $po_options['paper'], ", ", 1); print "
    Default label "; - display_combo("label", $all_labels, $label, ", ", 1); + print "
    ".$strings['profile']['print_label'] .""; + display_combo("label", $all_labels, $po_options['label'], ", ", 1); print "
    \n"; } } -print " 
    \n"; -print "\n"; +print $thm_elem['button.save.changes']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; -print ""; site_footer($database); site_epilog($database); ?> diff --git a/src/my.tools.php b/src/my.tools.php index 19260a6..fed4c67 100644 --- a/src/my.tools.php +++ b/src/my.tools.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,68 +17,50 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "include/tools.php"; -include_once "$theme/theme.php"; -include_once "include/common.php"; include_once "include/site.php"; +include_once "include/tools.php"; +include_once "include/common.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$selector = isset($_REQUEST['selector']) ? $_REQUEST['selector'] : 1; +$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : FALSE; +$selection = isset($_REQUEST['selection']) ? $_REQUEST['selection'] : ""; -$selector = $_REQUEST['selector']; -if (!$selector) { - $selector = 1; -} - -site_header($page_width, "Display Tools"); +site_header($strings['generic']['my_tools']); site_navigator(10); -site_navigator_status("Users : My Tools", "Report a bug"); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".$strings['generic']['my_tools'], emit_a($bug_url, $strings['errors']['report_bug'])); -print " 
    "; display_navigator_box_top($selector, $tools_data, "100%"); switch ($selector) { case $tools_data['bulkupdate']['idx']: $selector_id = $tools_data['bulkupdate']['idx']; - display_bulk_update($database, $po_user['id'], "my.tools.php?selector=$selector_id", $_REQUEST['rule']); - break; - case $tools_data['shop_item_maker']['idx']: - $selector_id = $tools_data['shop_item_maker']['idx']; - display_shop_item_generator($database, $po_user['id']); + display_bulk_update($database, "my.tools.php?selector=$selector_id", $type, $selection); break; case $tools_data['generator']['idx']: - display_xml_template_generator($database, $po_user['id']); + display_xml_template_generator($database); break; case $tools_data['converter']['idx']: print "
    \n"; - print " 
    "; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    Please specify the source file
    Source file"; - print ""; + print "\n"; + print "\n"; + print ""; print "
    ".$strings['tools']['source_file'].""; + print ""; + print "
    \n"; - print " 
    "; - print ""; + print $thm_elem['button.submit']; print "\n"; break; case $tools_data['content_indexer']['idx']: $selector_id = $tools_data['content_indexer']['idx']; - display_content_indexer($database, $po_user['id'], "my.tools.php?selector=$selector_id", $po_user['session']); + display_content_indexer($database, "my.tools.php?selector=$selector_id"); + break; } display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/photo.add.2.php b/src/photo.add.2.php index 287b68b..425e3b0 100644 --- a/src/photo.add.2.php +++ b/src/photo.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,6 +17,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +include_once "include/config.php"; +include_once "include/import.php"; +include_once "include/common.php"; +include_once "include/site.php"; + +$compress_pages = false; /* Explicitly disable it here */ +set_time_limit(0); /* Explicitly disable timeouts here */ + // Try to turn off caching header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @@ -24,34 +32,8 @@ header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); -include_once "include/vars.php"; -include_once "include/config.php"; -include_once "$theme/theme.php"; -include_once "include/import.php"; -include_once "include/common.php"; -include_once "include/site.php"; +$database = site_prolog(PO_USER_TYPE_USER); -$compress_pages = false; /* Explicitly disable it here */ - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$preferences = pg_fetch_row(pg_query($database, " - select bulk_upload_enable - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$po_user[id]")); - -$im_options = get_im_options($database, $po_user['id']); -$im_composite_options = get_im_composite_options($database, $po_user['id']); -$dcraw_options = get_dcraw_options($database, $po_user['id']); - -$user_name = pg_fetch_row(pg_query($database, "select first_name, last_name, identifier from users where identifier=$po_user[id]")); $default_folder_id = pg_escape_string($_REQUEST['folder']); $file_name = $_FILES['file_name']['name'][0]; @@ -59,7 +41,7 @@ $file_size = $_FILES['file_name']['size'][0]; $file_name_tmp = $_FILES['file_name']['tmp_name'][0]; $original_file_type = strtolower(substr($file_name, strrpos($file_name, ".") + 1)); -$local_path = $_REQUEST['local_path']; +$local_path = isset($_REQUEST['local_path']) ? $_REQUEST['local_path'] : FALSE; if ($local_bulk_upload && $local_path) { $original_file_type = "local"; @@ -92,6 +74,8 @@ function load_default_image_data_values($default_folder) { "storage_index" => pg_escape_string($_REQUEST['storage_index']), "access_rights" => pg_escape_string($_REQUEST['access_rights']), "hide_original" => pg_escape_string($_REQUEST['hide_original']), + "store_url" => pg_escape_string($_REQUEST['store_url']), + "remark" => pg_escape_string($_REQUEST['remark']), "camera" => pg_escape_string($_REQUEST['camera']), "lens" => pg_escape_string($_REQUEST['lens']), "filter" => pg_escape_string($_REQUEST['filter']), @@ -101,7 +85,7 @@ function load_default_image_data_values($default_folder) { "focal_length" => pg_escape_string($_REQUEST['focal_length']), "aperture" => pg_escape_string($_REQUEST['aperture']), "shutter" => pg_escape_string($_REQUEST['shutter']), - "exp_comp" => pg_escape_string($_REQUEST['exp_comp']), + "exp_comp" => pg_escape_string($_REQUEST['exp_comp']), "exp_diff" => pg_escape_string($_REQUEST['exp_diff']), "camera_metering" => pg_escape_string($_REQUEST['camera_metering']), "camera_program" => pg_escape_string($_REQUEST['camera_program']), @@ -112,13 +96,21 @@ function load_default_image_data_values($default_folder) { "scan_multiscan" => pg_escape_string($_REQUEST['scan_multiscan']), "iso_override" => pg_escape_string($_REQUEST['iso_override']), "support" => pg_escape_string($_REQUEST['support']), - "orientation" => 0, + "orientation" => 1, /* "Normal" */ + "orientation_orig" => 1, /* "Normal" */ "decode_exif" => $_REQUEST['decode_exif'], "decode_iptc" => $_REQUEST['decode_iptc'], "decode_rdf" => $_REQUEST['decode_rdf'], "colorspace" => pg_escape_string($_REQUEST['colorspace']), + "latitude" => pg_escape_string(parse_latitude($_REQUEST['latitude'])), + "longitude" => pg_escape_string(parse_latitude($_REQUEST['longitude'])), + "altitude" => pg_escape_string($_REQUEST['altitude']), + "direction" => pg_escape_string($_REQUEST['direction']), "keywords" => $_REQUEST['keywords'], + "IgnoreExifUserComment" => FALSE, "exif" => "", + "jpgfromraw" => FALSE, + "rdf" => "", "iptc" => ""); if ($image_data['keywords'] != "") { @@ -127,6 +119,8 @@ function load_default_image_data_values($default_folder) { } else { $image_data['keywords'] = space_string_to_array($image_data['keywords']); } + } else { + $image_data['keywords'] = array(); } return $image_data; @@ -271,6 +265,25 @@ function XML_StartElement($parser, $name, $attribs) { } } } + case "GEOLOCATION": + if (sizeof($attribs)) { + while (list($attribute, $value) = each($attribs)) { + switch ($attribute) { + case "LATITUDE": + $image_data['latitude'] = parse_latitude($value); + break; + case "LONGITUDE": + $image_data['longitude'] = parse_latitude($value); + break; + case "ALTITUDE": + $image_data['longitude'] = $value; + break; + case "DIRECTION": + $image_data['direction'] = $value; + break; + } + } + } break; case "STORAGE": if (sizeof($attribs)) { @@ -308,6 +321,17 @@ function XML_StartElement($parser, $name, $attribs) { } } break; + case "PURCHASE": + if (sizeof($attribs)) { + while (list($attribute, $value) = each($attribs)) { + switch ($attribute) { + case "URL": + $image_data['store_url'] = $value; + break; + } + } + } + break; case "CAMERA": if (sizeof($attribs)) { while (list($attribute, $value) = each($attribs)) { @@ -487,9 +511,6 @@ function XML_EndElement($parser, $name) { global $thumb_max_size; global $image_max_size; global $default_folder_id; - global $im_options; - global $im_composite_options; - global $dcraw_options; global $po_user; global $character_data; global $current_tag; @@ -500,7 +521,7 @@ function XML_EndElement($parser, $name) { $photo_master_id = false; for ($index = 0; $index < $image_data['num_of_files']; $index++) { if ($image_data['file'][$index]['master'] == 't') - $photo_master_id = photo_import($database, $index, $im_options, $im_composite_options, $dcraw_options, $po_user['id'], $default_folder_id, $image_data); + $photo_master_id = photo_import($database, $index, $po_user['id'], $default_folder_id, $image_data); } for ($index = 0; $index < $image_data['num_of_files']; $index++) { @@ -508,10 +529,10 @@ function XML_EndElement($parser, $name) { if ($image_data['file'][$index]['master'] != 't') { /* if no master was found in the first round, default the first photo as the master */ if (!$photo_master_id) - $photo_master_id = photo_import($database, $index, $im_options, $im_composite_options, $dcraw_options, $po_user['id'], $default_folder_id, $image_data); + $photo_master_id = photo_import($database, $index, $po_user['id'], $default_folder_id, $image_data); else { $image_data['file'][$index]['master'] = 'f'; - photo_version_import($database, $index, $im_options, $im_composite_options, $dcraw_options, $po_user['id'], $photo_master_id, $image_data); + photo_version_import($database, $index, $po_user['id'], $photo_master_id, $image_data); } } } @@ -593,11 +614,11 @@ function XML_EndTestElement($parser, $name) { } function parse_XML($xml_path) { - print "Looking for the data.xml file ... "; + global $strings; + if (is_file($xml_path . "/data.xml")) { $fp = fopen($xml_path . "/data.xml", "r"); - print "found.\n
    \n"; - print "Validating XML file: "; + print $strings['import']['validating_xml']. "..."; /* first parse the xml file */ fseek ($fp, 0 ,SEEK_SET); @@ -607,11 +628,10 @@ function parse_XML($xml_path) { $data = fread($fp, filesize($xml_path . "/data.xml")); if (!xml_parse($xml_parser, $data)) { - print sprintf("%s, XML error: %d %s in file data.xml at line %d\n

    \n", - $data, - xml_get_error_code($xml_parser), - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser)); + print err_str(sprintf($strings['errors']['xml_error'], + xml_get_error_code($xml_parser), + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser))); xml_parser_free($xml_parser); fclose($fp); exit; @@ -619,9 +639,6 @@ function parse_XML($xml_path) { xml_parser_free($xml_parser); - print " well formed.
    "; - print " 
    "; - /* now do a real upload as described in the xml file */ fseek ($fp, 0 ,SEEK_SET); @@ -632,10 +649,10 @@ function parse_XML($xml_path) { while ($data = fread($fp, 4096)) { if (!xml_parse($xml_parser, $data, feof($fp))) { - print sprintf("XML error: %d %s in file data.xml at line %d\n

    \n", - xml_get_error_code($xml_parser), - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser)); + print err_str(sprintf($strings['errors']['xml_error'], + xml_get_error_code($xml_parser), + xml_error_string(xml_get_error_code($xml_parser)), + xml_get_current_line_number($xml_parser))); xml_parser_free($xml_parser); fclose($fp); exit; @@ -644,16 +661,14 @@ function parse_XML($xml_path) { xml_parser_free($xml_parser); - if (!fclose($fp)) { - print "Failed to close XML document"; - } - } else { - print "not found.\n
    \n"; - print " 
    "; + fclose($fp); } } -function upload_directory($database, $upload_path, $user_id, $target_folder, $im_options, $im_composite_options, $dcraw_options) { +function upload_directory($database, $upload_path, $user_id, $target_folder, $original_file_type) { + global $po_options; + global $strings; + parse_XML($upload_path); $files = array(); @@ -676,12 +691,11 @@ function upload_directory($database, $upload_path, $user_id, $target_folder, $im /* Look for an existing folder which matches */ $data = pg_fetch_row(pg_query($database, "select identifier from folder where parent_folder = $target_folder and caption = '" .pg_escape_string($file_name) ."'")); if ($data == null) { - global $default_order_by; - print "Creating a new sub-folder '$file_name' ... \n"; - $result = add_folder($database, $user_id, $target_folder, $_REQUEST['access_rights'], $file_name, "", $default_order_by); + print sprintf($strings['import']['creating_subfolder'], $file_name) . " ... "; + $result = add_folder($database, $user_id, $target_folder, $_REQUEST['access_rights'], $file_name, "", "", "null"); if (!$result) { $new_folder = $target_folder; - print "Failed"; + print "".$strings['generic']['failed'].""; } else { /* Figure out new folder ID */ $data = pg_fetch_row(pg_query($database, "select identifier from folder where parent_folder = $target_folder and caption = '" .pg_escape_string($file_name) ."'")); @@ -692,14 +706,15 @@ function upload_directory($database, $upload_path, $user_id, $target_folder, $im $new_folder = $data[0]; } - upload_directory($database, $upload_path . "/" . $file_name, $user_id, $new_folder, $im_options, $im_composite_options, $dcraw_options); + upload_directory($database, $upload_path . "/" . $file_name, $user_id, $new_folder, $original_file_type); continue; } $file_type = substr($file_name, strrpos($file_name, ".") + 1); if ($file_type == "xml" || $file_type == "gz" || $file_type == "tgz" || $file_type == "zip" || $file_type == "bz2" || $file_type == "tar" || - $file_type == "bzip2" || preg_match("/thumbs.db/i", $file_name)) { + $file_type == "xmp" || $file_type == "bzip2" || + preg_match("/thumbs.db/i", $file_name)) { unlink($upload_path. "/" . $file_name); continue; } @@ -714,68 +729,63 @@ function upload_directory($database, $upload_path, $user_id, $target_folder, $im $file_name_root = substr($file_name, 0, strrpos($file_name, ".")); if (!$file_name_root) { - /* if no dot was found, upload it as a master version */ $file_name_root = $file_name; - $master_versions[$file_name_root] = photo_import($database, 0, $im_options, $im_composite_options, $dcraw_options, $user_id, $target_folder, $image_data); + } + + if (!isset($master_versions[$file_name_root])) { + $master_versions[$file_name_root] = photo_import($database, 0, $user_id, $target_folder, $image_data); } else { - if (!$master_versions[$file_name_root]) { - $master_versions[$file_name_root] = photo_import($database, 0, $im_options, $im_composite_options, $dcraw_options, $user_id, $target_folder, $image_data); - } else { - photo_version_import($database, 0, $im_options, $user_id, $im_composite_options, $dcraw_options, $master_versions[$file_name_root], $image_data); - } + + // XXXX should 'master' always be 't'? This means the last image + // added to the set will aways be the master. + + photo_version_import($database, 0, $user_id, $master_versions[$file_name_root], $image_data); } } } - // if ($original_file_type != "local") { - print "Removing temporary directory $upload_path ... "; + if ($original_file_type != "local") { + print sprintf($strings['import']['removing_temp_dir']) . " ... "; if (!rmdir($upload_path)) { - print "failed [rmdir $upload_path]
    "; + print "".$strings['generic']['failed'].""; + print "

    rmdir $upload_path

    "; } else { - print "done.
    "; - print " 
    "; + print $strings['generic']['done'].".
    "; } - // } else { - // print "done.
    "; - // print " 
    "; - // } + } } -site_header($page_width, "Import Photos"); +/* ================================== */ + +site_header($strings['import']['import_photos']); site_navigator(5); $path_to_folder = get_path_to_folder($database, $default_folder_id); $folder_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$default_folder_id'")); -site_navigator_status("Users : My folders and albums$path_to_folder : $folder_name[0] : Import photos", ""); -print " 
    "; -print "
    " ; +$user_display_string = user_disp_string($po_user['id'], $po_user['id'], + "", ""); +site_navigator_status("$user_display_string $path_to_folder : ". + emit_a("folder.php?folder=$default_folder_id", $folder_name[0]) . + ": " .$strings['import']['import_photos'], + ""); + +print "
    \n"; + +$temporary_directory = FALSE; switch ($original_file_type) { - default: - $image_data = load_default_image_data_values($default_folder_id); - $image_data['file'][0]['name'] = $file_name; - $image_data['file'][0]['name_tmp'] = $file_name_tmp; - $image_data['file'][0]['type'] = $original_file_type; - $image_data['file'][0]['remark'] = ""; - $image_data['file'][0]['master'] = "t"; - $image_data['num_of_files'] = 1; - photo_import($database, 0, $im_options, $im_composite_options, $dcraw_options, $po_user['id'], $default_folder_id, $image_data); - print "

    Import finished.

    "; - print "
    " ; - - print " 
    "; - - site_footer($database); - site_epilog($database); - exit(); + case "xmp": + print "".$strings['generic']['failed'].""; + break; case "local": - if ($preferences[0] == 'f') { - print "Bulk upload is disabled for this account.
    Contact you Photo Organizer administrator to enable this feature.

    "; + if (($po_options['bulk_upload_enable'] != 't') || + !$local_bulk_upload) { + print err_str($strings['errors']['bulk_upload_disabled']); break; } $temporary_directory = $local_path; - print "Importing photos from $temporary_directory ...
    "; + print sprintf($strings['import']['importing_from_folder'], $temporary_directory) ." ...
    "; break; case "gz": case "tgz": @@ -784,29 +794,31 @@ switch ($original_file_type) { case "tar": case "zip": /* check if bulk upload is enabled for this user */ - if ($preferences[0] == 'f') { - print "Bulk upload is disabled for this account.
    Contact you Photo Organizer administrator to enable this feature.

    "; + if ($po_options['bulk_upload_enable'] != 't') { + print err_str($strings['errors']['bulk_upload_disabled']); break; } /* in case the file type is zip, uncompress it and process the bulk upload */ $temporary_directory = tempnam($tmp_volume_path, "po.import."); unlink($temporary_directory); - print "Creating temporary directory $temporary_directory ... "; + print sprintf($strings['import']['creating_temp_dir']) . " ... "; $old_mask = umask(0000); if (!mkdir($temporary_directory)) { - print "failed [mkdir $temporary_directory]
    "; + print "".$strings['generic']['failed'].""; + print "

    mkdir $temporary_directory]

    "; } else { - print "done.
    "; + print $strings['generic']['done'].".
    "; } - print "Move uploaded file into temporary directory ... "; + print $strings['import']['moving_file_to_tmp'] . " ... "; if (!move_uploaded_file($file_name_tmp, $temporary_directory . "/" . $file_name)) { - print "failed [mv $file_name_tmp $temporary_directory/$file_name]
    "; + print "".$strings['generic']['failed'].""; + print "
    mv $file_name_tmp $temporary_directory/$file_name

    "; } else { - print "done.
    "; + print $strings['generic']['done'].".
    "; } - print "Uncompressing $file_name ... "; + print $strings['import']['uncompress'] . " $file_name ... "; switch ($original_file_type) { case "gz": @@ -815,10 +827,10 @@ switch ($original_file_type) { escapeshellarg($temporary_directory) ." -f" . escapeshellarg($temporary_directory ."/" . $file_name), $retval); if ($retval) { - print "failed [tar -x -z -C $temporary_directory -f $temporary_directory/$file_name]
    "; - } - else { - print "done.
    "; + print "".$strings['generic']['failed'].""; + print "
    $sys_tar -x -z -C $temporary_directory -f $temporary_directory/$file_name

    "; + } else { + print $strings['generic']['done'].".
    "; } break; case "bzip2": @@ -827,10 +839,10 @@ switch ($original_file_type) { escapeshellarg($temporary_directory) ." -f". escapeshellarg($temporary_directory ."/". $file_name), $retval); if ($retval) { - print "failed [tar -x -j -C $temporary_directory -f $temporary_directory/$file_name]
    "; - } - else { - print "done.
    "; + print "".$strings['generic']['failed'].""; + print "
    $sys_tar -x -j -C $temporary_directory -f $temporary_directory/$file_name

    "; + } else { + print $strings['generic']['done'].".
    "; } break; case "tar": @@ -838,10 +850,10 @@ switch ($original_file_type) { escapeshellarg($temporary_directory) ." -f". escapeshellarg($temporary_directory ."/". $file_name), $retval); if ($retval) { - print "failed [tar -x -C $temporary_directory -f $temporary_directory/$file_name]
    "; - } - else { - print "done.
    "; + print "".$strings['generic']['failed'].""; + print "
    $sys_tar -x -C $temporary_directory -f $temporary_directory/$file_name

    "; + } else { + print $strings['generic']['done'].".
    "; } break; case "zip": @@ -849,27 +861,38 @@ switch ($original_file_type) { escapeshellarg($temporary_directory. "/". $file_name) ." -d". escapeshellarg($temporary_directory), $retval); if ($retval) { - print "failed [unzip $temporary_directory/$file_name -d temporary_directory]
    "; - } - else { - print "done.
    "; + print "".$strings['generic']['failed'].""; + print "
    $sys_unzip $temporary_directory/$file_name -d temporary_directory

    "; + } else { + print $strings['generic']['done'].".
    "; } break; } -} + break; + default: + $image_data = load_default_image_data_values($default_folder_id); + $image_data['file'][0]['name'] = $file_name; + $image_data['file'][0]['name_tmp'] = $file_name_tmp; + $image_data['file'][0]['type'] = $original_file_type; + $image_data['file'][0]['remark'] = ""; + $image_data['file'][0]['master'] = "t"; + $image_data['num_of_files'] = 1; + photo_import($database, 0, $po_user['id'], $default_folder_id, $image_data); + print "

    ".$strings['import']['all_complete']."

    "; + print "\n"; + site_footer($database); + site_epilog($database); + exit(); + } -umask(0077); +if ($temporary_directory) { + umask(0077); + upload_directory($database, $temporary_directory, $po_user['id'], $default_folder_id, $original_file_type); + umask($old_mask); + } -upload_directory($database, $temporary_directory, $po_user['id'], $default_folder_id, $im_options, $im_composite_options, $dcraw_options); - -umask($old_mask); - -print " 
    "; -print "Upload finished.
    "; -print " 
    "; -print "
    " ; - -print " 
    "; +print "

    ".$strings['import']['all_complete']."

    "; +print "\n"; site_footer($database); site_epilog($database); diff --git a/src/photo.add.php b/src/photo.add.php index 1b0d545..9a41638 100644 --- a/src/photo.add.php +++ b/src/photo.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,94 +17,58 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "include/import.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -include_once "include/exif.php"; -include_once "include/color.php"; include_once "include/site.php"; +include_once "include/import.php"; +include_once "include/color.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $current_folder = pg_escape_string($_REQUEST['folder']); -if ($po_user['type'] != $user_type['administrator']) - $location_mod = " where private is false or users=$po_user[id] "; - else - $location_mod = ""; - -$users_location = pg_query($database, "select identifier, country, state, city, place from view_location $location_mod order by country, state, city, place"); - -$users_folder = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and caption!='Trash' and caption!='Orphanage'"); -$users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$po_user[id]"); -$users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens where users=$po_user[id]"); -$users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$po_user[id]"); -$users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$po_user[id]"); -$users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$po_user[id]"); -$users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$po_user[id]"); -$users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$po_user[id]"); - -$aperture = pg_query($database, "select identifier, value from aperture"); -$focal_length = pg_query($database, "select identifier, value from focal_length order by value"); -$shutter = pg_query($database, "select identifier, value from shutter"); -$ev_comp = pg_query($database, "select identifier, value from ev_comp"); -$camera_metering = pg_query($database, "select identifier, value from camera_metering"); -$camera_program = pg_query($database, "select identifier, value from camera_program"); -$flash_mode = pg_query($database, "select identifier, value from flash_mode"); -$scan_resolution = pg_query($database, "select identifier, value from scan_resolution"); -$scan_bitdepth = pg_query($database, "select identifier, value from scan_bitdepth"); -$scan_multiscan = pg_query($database, "select identifier, value from scan_multiscan"); -$iso_override = pg_query($database, "select identifier, value from film_iso order by value"); - -$user_name = pg_fetch_row(pg_query($database, "select first_name, last_name, identifier from users where identifier=$po_user[id]")); $folder = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$current_folder'")); -$my_preferences = pg_fetch_row(pg_query($database, " - select bulk_upload_enable, quota_size, quota_count - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$po_user[id]")); - -site_header($page_width, "Add Photo"); +site_header($strings['import']['import_photos']); site_navigator(5); $path_to_folder = get_path_to_folder($database, $current_folder); -site_navigator_status("Users : My Folders and Albums$path_to_folder : $folder[0] : Add photos", ""); +$user_display_string = user_disp_string($po_user['id'], $po_user['id'], + "", ""); + +$folder_name = pg_fetch_row(pg_query($database, " + select folder.caption, folder.description + from folder + where folder.identifier=$current_folder")); + +site_navigator_status("$user_display_string $path_to_folder : ". + emit_a("folder.php?folder=$current_folder", $folder_name[0]) . + ": " .$strings['import']['import_photos'], + ""); -print " 
    \n"; print "
    \n"; -// 0 means unlimited -if ($my_preferences[2] > 0) { +if ($po_options['quota_count'] > 0) { $num_of_photo_versions = pg_fetch_row(pg_query($database, "select count_photo_versions_by_user($po_user[id])")); $num_of_photo_versions++; - if ($my_preferences[2] <= $num_of_photo_versions[0]) { - print "Your account have reached the photo quota of $my_preferences[2] photos including photo versions, imposed by your PO adminstrator.
    "; - print "No further uploads are possible."; + if ($po_options['quota_count'] <= $num_of_photo_versions[0]) { + print err_str($strings['errors']['quota_count_full'] . " ($po_options[quota_count] ".$strings['generic']['files'] .")"); + print $strings['import']['no_more_uploads']; print "
    \n"; - print " 
    \n"; site_footer($database); site_epilog($database); exit(); } } -// 0 means unlimited -if ($my_preferences[1] > 0) { +if ($po_options['quota_size'] > 0) { $used_storage_space = count_storage_space_by_user($database, $po_user['id']); - if ($my_preferences[1] <= $used_storage_space) { - $storage_quota = round($my_preferences[1]/1048576, 2); - print "Your account have reached the storage space quota of $storage_quota Mb, imposed by your PO adminstrator.
    "; - print "No further uploads are possible."; + if ($po_options['quota_size'] <= $used_storage_space) { + $storage_quota = round($po_options['quota_size']/1048576, 2); + print err_str($strings['errors']['quota_space_full'] . " ($po_options[quota_size] MB)"); + print $strings['import']['no_more_uploads']; print "\n"; - print " 
    \n"; site_footer($database); site_epilog($database); exit(); @@ -112,229 +76,103 @@ if ($my_preferences[1] > 0) { } if (!ini_get("file_uploads")) { - print "File upload is disabled in you PHP configuration file.
    "; + print err_str($strings['errors']['file_upload_disabled']); print "\n"; - print " 
    \n"; site_footer($database); site_epilog($database); } -$my_im_options = get_im_options($database, $po_user['id']); - -if ($my_im_options[13] || $my_im_options[14]) { - $color_name = get_color_name($my_im_options[15]); - if ($color_name[0]=='a' || $color_name[0]=='e' || $color_name[0]=='o' || $color_name[0]=='i' || $color_name[0]=='u') { - $color_name = "an " . $color_name; - } - else { - $color_name = "a " . $color_name; - } - $thumb_decoration = ", decorated with $color_name border of $my_im_options[13] x $my_im_options[14] pixels"; -} - -if ($my_im_options[5] || $my_im_options[6]) { - $color_name = get_color_name($my_im_options[7]); - if ($color_name[0]=='a' || $color_name[0]=='e' || $color_name[0]=='o' || $color_name[0]=='i' || $color_name[0]=='u') { - $color_name = "an " . $color_name; - } else { - $color_name = "a " . $color_name; - } - $preview_decoration = ", decorated with $color_name border of $my_im_options[5] x $my_im_options[6] pixels"; -} - -$my_im_composite_options = get_im_composite_options($database, $po_user['id']); - -print "
    "; -if ($my_preferences[0] == 't') { - print "Bulk upload is enabled."; -} else { - print "Bulk upload is disabled."; -} -print " The upload file size limit is: ".ini_get("upload_max_filesize").". The POST size limit is: ".ini_get("post_max_size").".
    "; -print "A $thumb_max_size pixel thumbnail will be generated in the $my_im_options[9] color space, sharpened by $my_im_options[11] x $my_im_options[12] + $my_im_options[18] + $my_im_options[19], with $my_im_options[10] gamma correction$thumb_decoration and saved with quality $my_im_options[8].
    "; -print "A $image_max_size pixel preview will be generated in the $my_im_options[1] color space, sharpened by $my_im_options[3] x $my_im_options[4] + $my_im_options[16] + $my_im_options[17], with $my_im_options[2] gamma correction$preview_decoration and saved with quality $my_im_options[0].
    "; -if ($my_im_composite_options[1] > 0) { - print "A watermark with brightness $my_im_composite_options[1]% will be applied in the $my_im_composite_options[0] region of the preview.
    "; - print "
    "; - print "Watermark
    "; - /* site_display_photo($database, $my_im_composite_options[2], true); */ - print "\"watermark\"/"; -} -print "
    "; - -print ""; -print ""; -print " 
    \n"; +print "
    \n"; print "
    \n"; -print "

    \n"; -print "\n"; -print "\n"; -print ""; -print ""; +print "
    File Selector
    File"; -print "
    \n"; +print "\n"; +print ""; +print ""; if ($local_bulk_upload) { - print ""; + print ""; } -print "\n"; -print "
    ".$strings['import']['file_selector']."
    ".$strings['import']['file'].""; +print ""; + +if ($po_options['bulk_upload_enable'] == 'f') { + print "  ".$strings['errors']['bulk_upload_disabled'].""; + } + +$max_size = ini_get("upload_max_filesize"); +$ini_size = ini_get("post_max_size"); +if ($ini_size < $max_size) { + $max_size = $ini_size; + } + +print "  ".$strings['import']['max_size'].": $max_size"; + +print "
    Local Path"; - print "
    ".$strings['import']['local_path'].""; + print "
    Into folder"; -display_folder_combo("folder", $users_folder, $current_folder, ""); +print "
    ".$strings['import']['folder'].""; +display_folder_combo("folder", get_users_folder($database), $current_folder, ""); print "
    \n"; - -print "

    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "

    \n"; - -print "\n"; -print "\n"; -print "\n"; print "
    Metadata Import
    Import Precedence"; +print "
    ".$strings['import']['metadata'].""; display_data_decoding_radio(); print "
    \n"; -print "

    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "

    \n"; +print "
    \n"; +print $thm_elem['button.add.photos']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; +print "
    \n"; -print "\n"; -print "\n"; +print "
    Default Photo Properties
    \n"; +print "\n"; -print "\n"; -print "\n"; -print "\n"; +display_iptc_form($database, FALSE, + "", "$po_user[first_name] $po_user[last_name]", "", "", + "", "", "", "", "", + $strings['photo']['copyright']." (c) " . date("Y") . " $po_user[first_name] $po_user[last_name]", + "", "", "", "", "", 0, 't', 't', "", ""); -print "\n"; - -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; - -print "\n"; - -print "\n"; - -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; + print "
    ".$strings['import']['default_props']."
    Title"; -print "
    Author"; -print "
    Keywords"; -print "
    Headline"; -print "
    Caption Writer"; -print "
    Caption"; -print "
    Category"; -print "
    Supplemental Category"; -print "
    Credit"; -print "
    Copyright"; -print "
    Web Statement"; -print "
    Instructions"; -print "
    Source"; -print "
    Transmission Refernce"; -print "
    Exposure date"; -display_date_input_form("exposure_timestamp", ""); -print "
    Location"; -display_combo("location", $users_location, 0, ", ", 1); -print "
    Storage Location"; +print "
    ".$strings['import']['storage_location'].""; display_storage_location_combo("storage_location_type", ""); -print " - "; -print "
    Access"; -display_access_combo("access_rights", "t", ""); -print "  Original "; -display_hide_original_combo("hide_original", "t"); +print " - + : + "; print "
    \n"; -print "

    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "

    \n"; +print "
    \n"; +print $thm_elem['button.add.photos']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; +print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    Default Shooting Data
    Camera"; -display_combo("camera", $users_camera, 0, "", 0); -print "
    Camera Metering\n"; -display_combo("camera_metering", $camera_metering, 0, "", 0); -print "
    Camera Program\n"; -display_combo("camera_program", $camera_program, 0, "", 0); -print "
    Lens\n"; -display_lens_combo("lens", $users_lens, 0, 0, 0); -print "
    Focal Length\n"; -display_combo("focal_length", $focal_length, 0, "", 0); -print "
    Filter\n"; -display_combo("filter", $users_filter, 0, "", 0); -print "
    Film\n"; -display_combo("film", $users_film, 0, "", 0); -print "
    Film ISO Override\n"; -display_combo("iso_override", $iso_override, 0, "", 0); -print "
    Aperture\n"; -display_combo("aperture", $aperture, 0, "", 0); -print "
    Shutter Speed\n"; -display_combo("shutter", $shutter, 0, "", 0); -print "
    Exposure Compensation\n"; -display_combo("exp_comp", $ev_comp, 0, "", 0); -print "
    Ev Difference\n"; -display_combo("exp_diff", $ev_comp, 0, "", 0); -print "
    Flash\n"; -display_combo("flash", $users_flash, 0, "", 0); -print "
    Flash Mode\n"; -display_combo("flash_mode", $flash_mode, 0, "", 0); -print "
    Flash Compensation\n"; -display_combo("flash_comp", $ev_comp, 0, "", 0); -print "
    Colorspace\n"; -display_colorspace_combo("colorspace", 1); +print "\n"; +print "\n"; + +display_photo_tech_form($database, FALSE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + "", "", "", ""); + +print "\n"; -print "\n"; -print "\n"; -print "
    ".$strings['import']['default_data']."
    ".$strings['generic']['colorspace']."\n"; +display_colorspace_combo("colorspace", $po_options['colorspace']); print "
    Scanner\n"; -display_combo("scanner", $users_scanner, 0, "", 0); -print "
    Scan Parameters\n"; -display_combo("scan_resolution", $scan_resolution, 0, "", 0); -print "dpi  \n"; -display_combo("scan_bitdepth", $scan_bitdepth, 0, "", 0); -print "bits  \n"; -display_combo("scan_multiscan", $scan_multiscan, 0, "", 0); -print "passes  \n"; -print "
    Support\n"; -display_combo("support", $users_support, 0, "", 0); + print "
    \n"; -print "

    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "

    \n"; +print "
    \n"; +print $thm_elem['button.add.photos']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    \n"; print "\n"; print "\n"; diff --git a/src/photo.dupe.add.2.php b/src/photo.dupe.add.2.php index b4a7200..bf9e860 100644 --- a/src/photo.dupe.add.2.php +++ b/src/photo.dupe.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,42 +17,38 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['version']); $storage_location = pg_escape_string($_REQUEST['storage_location']); $storage_index = pg_escape_string($_REQUEST['storage_index']); $remark = pg_escape_string($_REQUEST['remark']); $date_of_creation = check_date_validity($_REQUEST['creation_timestamp']); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); /* Check photo owner */ $data = pg_fetch_row(pg_query($database, "select users from photo where identifier = $photo_id")); /* Ensure mere users don't move/mangle a photo that isn't theirs! */ if ($data[0] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } $key = pg_fetch_row(pg_query($database, "select max(key) from photo_dupe where photo=$photo_id")); $key[0] = $key[0] + 1; -pg_query($database, "insert into photo_dupe (identifier, key, photo, date_of_creation, storage_location, storage_index, remark) - values (nextval('photo_dupe_id_sequence'), '$key[0]', '$photo_id', $date_of_creation, '$storage_location', '$storage_index', '$remark')"); +pg_query($database, "insert into photo_dupe (identifier, key, photo, date_of_creation, storage_location, storage_index, remark, version) + values (nextval('photo_dupe_id_sequence'), '$key[0]', '$photo_id', $date_of_creation, '$storage_location', '$storage_index', '$remark', $version)"); site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=3"); +header("Location: photo.php?photo=$photo_id&ver=$version&detail_info=3"); ?> diff --git a/src/photo.dupe.add.php b/src/photo.dupe.add.php index d9fc479..52964d2 100644 --- a/src/photo.dupe.add.php +++ b/src/photo.dupe.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,92 +17,78 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['ver']); $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, users, title from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' + and photo_version.identifier = $version and photo.identifier = '$photo_id'")); /* Ensure mere users don't move/mangle a photo that isn't theirs! */ -if ($photo_data[3] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { +if ($photo_data[2] != $po_user['id'] && + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; - } else { - $user_id = $po_user['id']; -} - $photo_original = pg_fetch_row(pg_query($database, "select storage_location, storage_index from photo_dupe where photo=$photo_id and key=1")); $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[2]")); + + +site_header(sprintf($strings['profile']['add'], $strings['photo']['dupe'])); + +$user_display_string = user_disp_string($photo_data[2], $po_user['id'], + "", ""); +site_navigator(5); -site_header($page_width, "Add Photo Duplicate"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} $path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[0], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Add duplicate", ""); +$title = get_photo_title($photo_data[0], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['add'], $strings['photo']['dupe']), ""); -print " 
    \n"; print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; print "
    \n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "
    \n"; print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['import']['storage_location'], "colspan=\"2\" width=\"25%\""); +print emit_th($strings['generic']['created'], "width=\"25%\""); + +print emit_th($strings['generic']['remark'], "width=\"50%\""); print ""; print ""; -print ""; -print ""; -print ""; +print "\n"; -print "\n"; +print "\n"; print ""; print "
    StorageStorage IndexDate of creationRemark
    \n"; -display_date_input_form("creation_timestamp", ""); +print "\n"; +print emit_date_input_form("creation_timestamp", ""); print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print "
    "; +print $thm_elem['button.add.duplicate']; +print $thm_elem['button.cancel']; +print "
    "; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.dupe.del.2.php b/src/photo.dupe.del.2.php index ba8198c..d55e19a 100644 --- a/src/photo.dupe.del.2.php +++ b/src/photo.dupe.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['version']); $dupe_id = pg_escape_string($_REQUEST['dupe']); /* Check photo owner */ @@ -39,9 +34,10 @@ $data = pg_fetch_row(pg_query($database, "select users from photo where identifi /* Ensure mere users don't move/mangle a photo that isn't theirs! */ if ($data[0] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -49,24 +45,15 @@ $photo_dupe = pg_fetch_row(pg_query($database, "select remark from photo_dupe wh if ($photo_dupe[0]!="Original") { pg_query($database, "begin"); - $result = pg_query($database, "delete from submission where photo_dupe='$dupe_id'"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id&detail_info=3"); - exit(); - } - $result = pg_query($database, "delete from photo_dupe where identifier='$dupe_id'"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id&detail_info=3"); - exit(); - } - pg_query($database, "commit"); + if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + } } site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=3"); +header("Location: photo.php?photo=$photo_id&ver=$version&detail_info=3"); ?> diff --git a/src/photo.dupe.del.php b/src/photo.dupe.del.php index 8ffb944..3889c43 100644 --- a/src/photo.dupe.del.php +++ b/src/photo.dupe.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,105 +17,79 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$dupe_id = pg_escape_string($_REQUEST['dupe']); +$photo_dupe = pg_fetch_row(pg_query($database, "select key, date_of_creation, storage_location, storage_index, remark, version, photo from photo_dupe where identifier=$dupe_id order by date_of_creation")); + +$photo_id = $photo_dupe[6]; +$version = $photo_dupe[5]; -$photo_id = pg_escape_string($_REQUEST['photo']); $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, users, title from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' + and photo_version.identifier = $version and photo.identifier = '$photo_id'")); /* Ensure mere users don't move/mangle a photo that isn't theirs! */ -if ($photo_data[3] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { +if ($photo_data[2] != $po_user['id'] && + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; -} else { - $user_id = $po_user['id']; -} - -$dupe_id = pg_escape_string($_REQUEST['dupe']); -$photo_dupe = pg_fetch_row(pg_query($database, "select key, date_of_creation, storage_location, storage_index, remark from photo_dupe where photo=$photo_id order by date_of_creation")); $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[2]")); +site_header(sprintf($strings['profile']['delete'], $strings['photo']['dupe'])); +site_navigator(5); + +$user_display_string = user_disp_string($photo_data[2], $po_user['id'], + "", ""); -site_header($page_width, "Delete Photo Duplicate"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} $path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[0], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Delete duplicate", ""); +$title = get_photo_title($photo_data[0], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['delete'], $strings['photo']['dupe']), ""); -print " 
    \n"; print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; - -$num_of_submissions = pg_num_rows(pg_query($database, "select identifier, uidentifier, first_name, last_name, value, date_of_creation, remark - from view_submission where photo_dupe=$dupe_id")); - -if ($num_of_submissions) { - print "\n"; - print ""; - print ""; - print ""; - print "
    By removing this dupe you will also remove its submission history, consisting of $num_of_submissions records.
    \n"; -} print "
    \n"; print "\n"; +print "\n"; print "\n"; -print "\n"; +print "
    \n"; print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['photo']['dupe_id'], "width=\"5%\""); +print emit_th($strings['generic']['created'], "width=\"15%\""); +print emit_th($strings['import']['storage_location'], "width=\"25%\""); +print emit_th($strings['generic']['remark'], "width=\"55%\""); print ""; print ""; -print ""; -print "\n"; -print ""; -print "\n"; +print ""; +print "\n"; +print ""; +print "\n"; print ""; print "
    Dupe IdentifierCreation DateStorage LocationRemark
    $photo_id-$photo_dupe[0]\n".generate_date_html($photo_dupe[1], "date", 1). "$photo_dupe[2]:$photo_dupe[3]$photo_dupe[4]$photo_id-$photo_dupe[0]\n".emit_date_html($photo_dupe[1], "date"). "$photo_dupe[2]:$photo_dupe[3]$photo_dupe[4]
    \n"; - -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print "
    "; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; +print "
    "; print "
    \n"; -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/photo.dupe.edit.2.php b/src/photo.dupe.edit.2.php index ae72ff6..37cfa03 100644 --- a/src/photo.dupe.edit.2.php +++ b/src/photo.dupe.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['version']); $dupe_id = pg_escape_string($_REQUEST['dupe']); $storage_location = pg_escape_string($_REQUEST['storage_location']); $storage_index = pg_escape_string($_REQUEST['storage_index']); @@ -44,9 +39,10 @@ $data = pg_fetch_row(pg_query($database, "select users from photo where identifi /* Ensure mere users don't move/mangle a photo that isn't theirs! */ if ($data[0] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } @@ -59,9 +55,9 @@ $result = pg_query($database, " where identifier='$dupe_id'"); if (!$result) { - print "Failed to edit duplicate"; + site_push_error($strings['errors']['db_insert_failed']); } site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=3"); +header("Location: photo.php?photo=$photo_id&ver=$version&detail_info=3"); ?> diff --git a/src/photo.dupe.edit.php b/src/photo.dupe.edit.php index e5a5ac5..cd62a22 100644 --- a/src/photo.dupe.edit.php +++ b/src/photo.dupe.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,100 +17,85 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$photo_id = pg_escape_string($_REQUEST['photo']); $dupe_id = pg_escape_string($_REQUEST['dupe']); +$photo_dupe = pg_fetch_row(pg_query($database, "select date_of_creation, storage_location, storage_index, remark, version, photo from photo_dupe where identifier='$dupe_id'")); + +$photo_id = $photo_dupe[5]; +$version = $photo_dupe[4]; + $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, get_image_path(photo_version.identifier, 3) as original_path, users, hide_original, title from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' + and photo_version.identifier = $version and photo.identifier = '$photo_id'")); /* Ensure mere users don't move/mangle a photo that isn't theirs! */ if ($photo_data[3] != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { + $po_user['type'] < PO_USER_TYPE_ADMIN) { + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); site_epilog($database); - header("location: login.php"); exit(); } -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; -} else { - $user_id = $po_user['id']; -} - -$photo_dupe = pg_fetch_row(pg_query($database, "select date_of_creation, storage_location, storage_index, remark from photo_dupe where identifier='$dupe_id'")); $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[3]")); + +$user_display_string = user_disp_string($photo_data[3], $po_user['id'], + "", ""); +site_header(sprintf($strings['profile']['edit'], $strings['photo']['dupe'])); +site_navigator(5); -site_header($page_width, "Edit Photo Duplicate"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} $path_to_folder = get_path_to_folder($database, $folder_data[0]); $title = get_photo_title($photo_data[0], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Edit duplicate", ""); -print " 
    \n"; +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['edit'], $strings['photo']['dupe']), ""); + print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; print "
    \n"; print "\n"; +print "\n"; print "\n"; -print "\n"; +print "
    \n"; print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['generic']['created'], "width=\"20%\""); +print emit_th($strings['import']['storage_location'], "colspan=\"2\" width=\"25%\""); +print emit_th($strings['generic']['remark'], "width=\"55%\""); print ""; print ""; -print "\n"; -print ""; -print ""; -if ($photo_dupe[3]=="Original") { - print "\n"; - print "\n"; -} -else { - print "\n"; -} +print ""; +print ""; +print "\n"; + print ""; print "
    Date of creationStorage LocationStorage IndexRemark
    \n"; -display_date_input_form("creation_timestamp", "$photo_dupe[0]"); +print "\n"; +print emit_date_input_form("creation_timestamp", $photo_dupe[0]); print "$photo_dupe[3]
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; -print " 
    \n"; +print "
    "; + +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    "; + +print "\n"; site_footer($database); site_epilog($database); diff --git a/src/photo.edit.2.php b/src/photo.edit.2.php index 2ea2c4a..5aaa022 100644 --- a/src/photo.edit.2.php +++ b/src/photo.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,24 +17,19 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/site.php"; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); $req_keywords = $_REQUEST['keywords']; $author = pg_escape_string($_REQUEST['author']); $title = pg_escape_string($_REQUEST['title']); +$remark = pg_escape_string($_REQUEST['remark']); $caption = pg_escape_string($_REQUEST['caption']); $caption_writer = pg_escape_string($_REQUEST['caption_writer']); $web_statement = pg_escape_string($_REQUEST['web_statement']); @@ -53,6 +48,7 @@ $date_of_exposure = check_date_validity($_REQUEST['exposure_timestamp']); $location = pg_escape_string($_REQUEST['location']); $access_rights = pg_escape_string($_REQUEST['access_rights']); $hide_original = pg_escape_string($_REQUEST['hide_original']); +$store_url = pg_escape_string($_REQUEST['store_url']); $camera = pg_escape_string($_REQUEST['camera']); $lens = pg_escape_string($_REQUEST['lens']); @@ -74,16 +70,25 @@ $scan_bitdepth = pg_escape_string($_REQUEST['scan_bitdepth']); $scan_multiscan = pg_escape_string($_REQUEST['scan_multiscan']); $iso_override = pg_escape_string($_REQUEST['iso_override']); $support = pg_escape_string($_REQUEST['support']); +$latitude = pg_escape_string(parse_latitude($_REQUEST['latitude'])); +$longitude = pg_escape_string(parse_latitude($_REQUEST['longitude'])); +$altitude = pg_escape_string($_REQUEST['altitude']); +$direction = pg_escape_string($_REQUEST['direction']); + +if ($latitude == "") $latitude = 'null'; +if ($longitude == "") $longitude = 'null'; +if ($altitude == "") $altitude = 'null'; +if ($direction == "") $direction = 'null'; -$file_type = substr($file_type, strpos($file_type, "/") + 1); $result = pg_query($database, "begin"); -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { /* Ensure mere users don't move/mangle a photo that isn't theirs! */ $result = pg_query($database, "select identifier from photo where identifier='$photo_id' and users = $po_user[id]"); if (pg_num_rows($result) <= 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } @@ -109,19 +114,15 @@ $query = "update photo transmission_reference = '$transmission_reference', date_of_exposure = $date_of_exposure, access_rights = $access_rights, - hide_original = '$hide_original' + hide_original = '$hide_original', + store_url = '$store_url', + comments = '$remark' where identifier = $photo_id"; $result = pg_query($database, $query); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id"); - exit(); -} - -if (pg_num_rows(pg_query($database, "select identifier from photo_tech where photo=$photo_id")) > 0) { - $result = pg_query($database, " +if ($result) { + if (pg_num_rows(pg_query($database, "select identifier from photo_tech where photo=$photo_id")) > 0) { + $query = " update photo_tech set camera=$camera, lens=$lens, @@ -142,47 +143,43 @@ if (pg_num_rows(pg_query($database, "select identifier from photo_tech where pho iso_override=$iso_override, support=$support, scan_bitdepth=$scan_bitdepth, - scan_multiscan=$scan_multiscan - where photo=$photo_id"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id"); - exit(); - } -} else { - if ($camera != "null" || $lens != "null" || $film != "null" || $flash != "null" || $support != "null" || - $scanner != "null" || $filter != "null" || $scan_resolution != "null" || $scan_bitdepth != "null" || $scan_multiscan != "null" || - $aperture != "null" || $focal_length != "null" || $shutter != "null" || $camera_metering != "null" || $camera_program != "null" || - $flash_mode != "null" || $exp_comp != "null" || $flash_comp != "null" || $exp_diff != "null" || $iso_override != "null") { + scan_multiscan=$scan_multiscan, + latitude=$latitude, + longitude=$longitude, + altitude=$altitude, + img_direction=$direction + where photo=$photo_id"; + $result = pg_query($database, $query); + } else if (($camera != "null" || $lens != "null" || + $film != "null" || $flash != "null" || + $support != "null" || $scanner != "null" || + $filter != "null" || $scan_resolution != "null" || + $scan_bitdepth != "null" || $scan_multiscan != "null" || + $aperture != "null" || $focal_length != "null" || + $shutter != "null" || $camera_metering != "null" || + $camera_program != "null" || $latitude != "null" || + $longitude != "null" || $direction != "null" || + $altitude != "null" || $flash_mode != "null" || + $exp_comp != "null" || $flash_comp != "null" || + $exp_diff != "null" || $iso_override != "null")) { $result = pg_query($database, " insert into photo_tech (identifier, photo, camera, lens, film, flash, scanner, filter, scan_resolution, aperture, focal_length, shutter, camera_metering, camera_program, flash_mode, exposure_comp, flash_comp, ev_difference, iso_override, support, scan_bitdepth, - scan_multiscan) + scan_multiscan, latitude, longitude, altitude, img_direction) values (nextval('photo_tech_id_sequence'), $photo_id, $camera, $lens, $film, $flash, $scanner, $filter, $scan_resolution, $aperture, $focal_length, $shutter, $camera_metering, $camera_program, $flash_mode, $exp_comp, $flash_comp, $exp_diff, $iso_override, $support, $scan_bitdepth, - $scan_multiscan)"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id"); - exit(); - } + $scan_multiscan, $latitude, $longitude, $altitude, $direction)"); } } /* keyword update */ -$result = pg_query($database, "delete from photo_keywords where photo=$photo_id"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id"); - exit(); +if ($result) { + $result = pg_query($database, "delete from photo_keywords where photo=$photo_id"); } if (strstr($req_keywords, ";")) { @@ -191,24 +188,28 @@ if (strstr($req_keywords, ";")) { $keywords = space_string_to_array($req_keywords); } -foreach ($keywords as $keyword) { - $keyword = strtolower(trim($keyword)); - $keyword = trim($keyword, ','); /* Trailing commas */ - $keyword = trim($keyword); - if ($keyword == "") continue; - $keyword = pg_escape_string($keyword); - - $result = pg_query($database, "insert into photo_keywords (photo, keyword) values ($photo_id, '$keyword')"); - if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: photo.php?photo=$photo_id"); - exit(); +if ($result) { + foreach ($keywords as $keyword) { + $keyword = strtolower(trim($keyword)); + $keyword = trim($keyword, ','); /* Trailing commas */ + $keyword = trim($keyword); + if ($keyword == "") continue; + $keyword = pg_escape_string($keyword); + + if ($result) { + $result = pg_query($database, "insert into photo_keywords (photo, keyword) values ($photo_id, '$keyword')"); + } } -} - -$result = pg_query($database, "commit"); -site_epilog($database); + } -header("location: photo.php?photo=$photo_id"); +if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); + site_push_error(pg_last_error($database)); + pg_query($database, "rollback"); + } + +site_epilog($database); +header("Location: photo.php?photo=$photo_id"); ?> diff --git a/src/photo.edit.php b/src/photo.edit.php index dd0cc63..fa7380d 100644 --- a/src/photo.edit.php +++ b/src/photo.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,27 +17,24 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = isset($_REQUEST['ver']) ? pg_escape_string($_REQUEST['ver']) : FALSE; + $photo_data = pg_fetch_row(pg_query($database, " - select location, caption, date_of_exposure, medium_image_path, large_image_path, + select location, caption, date_of_exposure, get_image_path(photo_version.identifier, 2) as preview_path, '' as original_path, access_rights, users, hide_original, title, author, '' as keyword, headline, caption_writer, caption, category, supplemental_category, credit, copyright_statement, web_statement, - instructions, source, transmission_reference + instructions, source, transmission_reference, + photo_version.identifier, store_url, comments from photo, photo_version where photo.identifier = photo_version.photo and photo_version.master = 't' @@ -48,6 +45,8 @@ $folder_data = pg_fetch_row(pg_query($database, " where photo.folder = folder.identifier and photo.identifier = '$photo_id'")); +$version = $photo_data[22]; + /* Get any keywords for the photo... */ $res = pg_query($database, "select keyword from photo_keywords where photo=$photo_id"); $keywords = ""; @@ -60,25 +59,24 @@ $owner_id = $photo_data[6]; /* Ensure mere users don't move/mangle a photo that isn't theirs! */ if ($owner_id != $po_user['id'] && - $po_user['type'] < $user_type['administrator']) { + $po_user['type'] < PO_USER_TYPE_ADMIN) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } $user_name = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$owner_id")); -site_header($page_width, "Edit Photo"); -if ($po_user['id'] == $owner_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_name[1], $user_name[2]); -} +site_header($strings['import']['edit_photo']); +site_navigator(5); + +$user_display_string = user_disp_string($owner_id, $po_user['id'], + $user_name[1], $user_name[2]); + $path_to_folder = get_path_to_folder($database, $folder_data[0]); $title = get_photo_title($photo_data[10], $photo_data[1]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Edit photo", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_display_string$path_to_folder : $folder_data[1] : $title : ".$strings['import']['edit_photo'], ""); print " 
    \n"; print "
    \n"; @@ -88,163 +86,44 @@ print " 
    \n"; $photo_tech = pg_fetch_row(pg_query($database, "select camera, lens, film, flash, scanner, filter, scan_resolution, aperture, focal_length, shutter, camera_metering, camera_program, flash_mode, - exposure_comp, flash_comp, ev_difference, iso_override, support, scan_bitdepth, scan_multiscan + exposure_comp, flash_comp, ev_difference, iso_override, support, scan_bitdepth, scan_multiscan, latitude, longitude, altitude, img_direction from photo_tech where photo=$photo_id")); -if ($po_user['type'] != $user_type['administrator']) - $location_mod = " where private is false or users=$po_user[id] "; - else - $location_mod = ""; - -$users_location = pg_query($database, "select identifier, country, state, city, place from view_location $location_mod order by country, state, city, place"); - -$users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$owner_id"); -$users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens where users=$owner_id"); -$users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$owner_id"); -$users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$owner_id"); -$users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$owner_id"); -$users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$owner_id"); -$users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$owner_id"); - -$aperture = pg_query($database, "select identifier, value from aperture"); -$focal_length = pg_query($database, "select identifier, value from focal_length order by value"); -$shutter = pg_query($database, "select identifier, value from shutter"); -$ev_comp = pg_query($database, "select identifier, value from ev_comp"); -$camera_metering = pg_query($database, "select identifier, value from camera_metering"); -$camera_program = pg_query($database, "select identifier, value from camera_program"); -$flash_mode = pg_query($database, "select identifier, value from flash_mode"); -$scan_resolution = pg_query($database, "select identifier, value from scan_resolution"); -$scan_bitdepth = pg_query($database, "select identifier, value from scan_bitdepth"); -$scan_multiscan = pg_query($database, "select identifier, value from scan_multiscan"); -$iso_override = pg_query($database, "select identifier, value from film_iso"); - print "
    \n"; print "
    \n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "
    Title"; -print "
    Author"; -print "
    Keywords"; -print "
    \n"; -print "\n"; +display_iptc_form($database, FALSE, + $photo_data[8], $photo_data[9], $keywords, $photo_data[11], + $photo_data[12], $photo_data[13], $photo_data[14], + $photo_data[15], $photo_data[16], $photo_data[17], + $photo_data[18], $photo_data[18], $photo_data[20], + $photo_data[21], $photo_data[2], $photo_data[0], + $photo_data[5], $photo_data[7], $photo_data[23], + $photo_data[24]); -print "\n"; -print "\n"; -print "\n"; +display_photo_tech_form($database, FALSE, + $photo_tech[0], $photo_tech[10], $photo_tech[11], + $photo_tech[1], $photo_tech[8], $photo_tech[5], + $photo_tech[2], $photo_tech[16], $photo_tech[7], + $photo_tech[9], $photo_tech[13], $photo_tech[15], + $photo_tech[3], $photo_tech[12], $photo_tech[14], + $photo_tech[4], $photo_tech[6], $photo_tech[18], + $photo_tech[19], $photo_tech[17], + $photo_tech[20], $photo_tech[21], $photo_tech[22], + $photo_tech[23]); -print "\n"; -print "\n"; -print "\n"; - -print "\n"; - -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; print "
    Headline"; -print "
    Caption Writer"; -print "
    Caption"; -print "
    Category"; -print "
    Supplemental Category"; -print "
    Credit"; -print "
    Copyright Statement "; -print "\n"; - -print "
    Web Statement"; -print "
    Instructions"; -print "
    Source"; -print "
    Transmission Refernce"; -print "
    Exposure date"; -$date_of_exposure=$photo_data[2]; -display_date_input_form("exposure_timestamp", "$date_of_exposure"); -print "
    Location"; -display_combo("location", $users_location, $photo_data[0], ", ", 1); -print "
    Access"; -display_access_combo("access_rights", $photo_data[5], ""); -print "
    High Resolution Original"; -display_hide_original_combo("hide_original", $photo_data[7]); -print "
    Camera"; -display_combo("camera", $users_camera, $photo_tech[0], "", 0); -print "
    Camera Metering\n"; -display_combo("camera_metering", $camera_metering, $photo_tech[10], "", 0); -print "
    Camera Program\n"; -display_combo("camera_program", $camera_program, $photo_tech[11], "", 0); -print "
    Lens\n"; -display_lens_combo("lens", $users_lens, $photo_tech[1], 0, 0); -print "
    Focal Length\n"; -display_combo("focal_length", $focal_length, $photo_tech[8], "", 0); -print "
    Filter\n"; -display_combo("filter", $users_filter, $photo_tech[5], "", 0); -print "
    Film\n"; -display_combo("film", $users_film, $photo_tech[2], "", 0); -print "
    Film ISO Override\n"; -display_combo("iso_override", $iso_override, $photo_tech[16], "", 0); -print "
    Aperture"; -display_combo("aperture", $aperture, $photo_tech[7], "", 0); -print "
    Shutter Speed\n"; -display_combo("shutter", $shutter, $photo_tech[9], "", 0); -print "
    Exposure Compensation\n"; -display_combo("exp_comp", $ev_comp, $photo_tech[13], "", 0); -print "
    Ev Difference\n"; -display_combo("exp_diff", $ev_comp, $photo_tech[15], "", 0); -print "
    Flash\n"; -display_combo("flash", $users_flash, $photo_tech[3], "", 0); -print "
    Flash Mode\n"; -display_combo("flash_mode", $flash_mode, $photo_tech[12], "", 0); -print "
    Flash Compensation\n"; -display_combo("flash_comp", $ev_comp, $photo_tech[14], "", 0); -print "
    Scanner\n"; -display_combo("scanner", $users_scanner, $photo_tech[4], "", 0); -print "
    Scan Parameters\n"; -display_combo("scan_resolution", $scan_resolution, $photo_tech[6], "", 0); -print "dpi  \n"; -display_combo("scan_bitdepth", $scan_bitdepth, $photo_tech[18], "", 0); -print "bits  \n"; -display_combo("scan_multiscan", $scan_multiscan, $photo_tech[19], "", 0); -print "passes  \n"; -print "
    Support\n"; -display_combo("support", $users_support, $photo_tech[17], "", 0); -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    \n"; print "
    \n"; -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/photo.item.add.2.php b/src/photo.item.add.2.php deleted file mode 100644 index 36b4271..0000000 --- a/src/photo.item.add.2.php +++ /dev/null @@ -1,46 +0,0 @@ - diff --git a/src/photo.item.add.php b/src/photo.item.add.php deleted file mode 100644 index 2337b2d..0000000 --- a/src/photo.item.add.php +++ /dev/null @@ -1,130 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Add Photo Shop Item", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -$all_shop_categories = pg_query($database, " - select identifier, caption - from shop_category - where identifier in (select category from shop_item) - and users=$po_user[id]"); -if (!$category) { - $temporary_category = pg_fetch_row($all_shop_categories); - $category = $temporary_category[0]; -} -$all_shop_items = pg_query($database, "select identifier, description from shop_item where users=$po_user[id] and category=$category"); -$all_currencies = pg_query($database, "select identifier, alpha_code, name, entity from currency"); - -print "
    \n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "
    CategoryItemPriceCurrencyRemark
    "; -print ""; -print ""; -display_combo('shop_item', $all_shop_items, "", "", TRUE); -print ""; -display_currency_combo('currency', $all_currencies, "", TRUE); -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; - -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.item.del.2.php b/src/photo.item.del.2.php deleted file mode 100644 index c4f2d0e..0000000 --- a/src/photo.item.del.2.php +++ /dev/null @@ -1,50 +0,0 @@ - 0) { - $sql_delete_marker = $operator == "undel" ? "f" : "t"; - $result = pg_query($database, "update photo_item set deleted='$sql_delete_marker' where identifier=$item and photo=$photo_id"); -} -else { - $result = pg_query($database, "delete from photo_item where identifier=$item and photo=$photo_id"); -} - -site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=8"); -?> diff --git a/src/photo.item.del.php b/src/photo.item.del.php deleted file mode 100644 index 71d684a..0000000 --- a/src/photo.item.del.php +++ /dev/null @@ -1,116 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Delete photo item", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "
    CategoryItemPriceRemarkDate
    $photo_for_sale[5]$photo_for_sale[0]$photo_for_sale[2] $photo_for_sale[1]$photo_for_sale[3]".generate_date_html($photo_for_sale[4], 'date', 1)."
    \n"; -print " 
    \n"; - -if ($num_of_references > 0) { - $plural = ($num_of_references > 1) ? "references" : "reference"; - print "

    This photo item has $num_of_references shop transaction $plural, therefore it will not be removed but only hidden.

    "; -} - -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; - -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.item.edit.2.php b/src/photo.item.edit.2.php deleted file mode 100644 index cd87a79..0000000 --- a/src/photo.item.edit.2.php +++ /dev/null @@ -1,49 +0,0 @@ - diff --git a/src/photo.item.edit.php b/src/photo.item.edit.php deleted file mode 100644 index be9a9b6..0000000 --- a/src/photo.item.edit.php +++ /dev/null @@ -1,133 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Edit Photo Shop Item", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -$all_shop_categories = pg_query($database, " - select identifier, caption - from shop_category - where identifier in (select category from shop_item) - and users=$po_user[id]"); -if (!$category) { - $category = $photo_for_sale[4]; -} -$all_shop_items = pg_query($database, "select identifier, description from shop_item where users=$po_user[id] and category=$category"); -$all_currencies = pg_query($database, "select identifier, alpha_code, name, entity from currency"); - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "
    CategoryItemPriceCurrencyRemark
    "; -print ""; -print ""; -display_combo('shop_item', $all_shop_items, $photo_for_sale[0], "", TRUE); -print ""; -display_currency_combo('currency', $all_currencies, $photo_for_sale[2], TRUE); -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.move.php b/src/photo.move.php index aed121a..9edad6c 100644 --- a/src/photo.move.php +++ b/src/photo.move.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,212 +17,335 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/import.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$search_request = isset($_REQUEST['search_x']); +/* Handle a search request */ +$search_request = isset($_REQUEST['search']); if ($search_request) { $keyword_list = ""; foreach ($_REQUEST['keywords'] as $keyword) { $keyword_list .= "$keyword%20"; } if ($keyword_list != "") { - header("location: search.text.advanced.php?keyword=$keyword_list"); + header("Location: search.text.advanced.php?keyword=$keyword_list"); exit(); } } -$database = site_prolog(); - -if ($po_user['id'] == FALSE) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo_id']); -$version = pg_escape_string($_REQUEST['version']); -$destination_basket = pg_escape_string($_REQUEST['basket']); +$owner_id = pg_escape_string($_REQUEST['owner_id']); + +$version_id = pg_escape_string($_REQUEST['version']); $destination_folder = pg_escape_string($_REQUEST['destination_folder']); $destination_album = pg_escape_string($_REQUEST['destination_album']); -$goto_folder = pg_escape_string($_REQUEST['goto_folder']); +$source_folder = pg_escape_string($_REQUEST['source_folder']); +$source_album = pg_escape_string($_REQUEST['source_album']); -$set_as_watermark = $_REQUEST['set_as_watermark']; -$detail_info = $_REQUEST['detail_info']; -$transform = $_REQUEST['transform']; -$export_type = $_REQUEST['export_type']; -$print_type = $_REQUEST['print_type']; +$detail_info = pg_escape_string($_REQUEST['detail_info']); +$transform = pg_escape_string($_REQUEST['transform']); -if ($goto_folder != "") { - header("location: folder.php?folder=$goto_folder"); - exit(); -} +$transform_request = isset($_REQUEST['rotate_req']); +$export_request = isset($_REQUEST['export_req']); +$print_request = isset($_REQUEST['print_req']); +$spool_request = isset($_REQUEST['spool_req']); +$watermark_request = isset($_REQUEST['watermark_req']); -if ($po_user['type'] < $user_type['administrator']) { - /* Ensure mere users don't move/mangle a photo that isn't theirs! */ - $result = pg_query($database, "select identifier from photo where identifier='$photo_id' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=1"); - exit(); - } +$goto_f_request = isset($_REQUEST['go_to_f']); +$goto_a_request = isset($_REQUEST['go_to_a']); +$move_f_request = isset($_REQUEST['move_to_f']); +$link_a_request = isset($_REQUEST['link_to_a']); +$move_a_request = isset($_REQUEST['move_to_a']); +$delete_request = isset($_REQUEST['delete_req']); - /* ...to an album that isn't theirs! */ - if ($destination_album != "") { - $result = pg_query($database, "select identifier from album where identifier='$destination_album' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=2"); - exit(); - } - } - - /* ...to a folder that isn't theirs! */ - if ($destination_folder != "") { - $result = pg_query($database, "select identifier from folder where identifier='$destination_folder' and users = $po_user[id]"); - if (pg_num_rows($result) <= 0) { - site_epilog($database); - header("location: login.php?reason=3"); - exit(); - } - } -} - -if (($transform == "") && - ($destination_folder == "") && - ($destination_album == "") && - ($print_type == "") && - ($set_as_watermark == "") && - ($destination_basket == "")) { - header("location: photo.php?photo=$photo_id&detail_info=$detail_info"); - exit(); -} - -if ($export_type != "") { - pg_query($database, "delete from photo_spooler where users=$user_id"); - pg_query($database, "insert into photo_spooler (identifier, users, photo) - values (nextval('photo_spooler_id_sequence'), $user_id, $photo_id)"); - - $arguments = "export_type=$export_type"; - if ($source_folder != "") - $arguments = $arguments . "&source_folder=$source_folder"; - if ($source_album != "") - $arguments = $arguments . "&source_album=$source_album"; - if ($source_photo != "") - $arguments = $arguments . "&source_photo=$source_photo"; - header("location: export.php?$arguments"); - exit(); -} - -if ($print_type != "") { - pg_query($database, "delete from photo_spooler where users=$po_user[id]"); - pg_query($database, "insert into photo_spooler (identifier, users, photo) - values (nextval('photo_spooler_id_sequence'), $po_user[id], $photo_id)"); +/* Doesn't take arguments */ +if ($export_request) { site_epilog($database); - header("location: print.php?source_photo=$photo_id&print_type=$print_type"); + header("Location: export.php?export_type=$_REQUEST[export_type]"); + exit(); + } + +/* Doesn't take arguments */ +if ($print_request) { + site_epilog($database); + header("Location: print.php?print_type=$_REQUEST[print_type]"); + exit(); + } + +/* Doesn't take arguments */ +if ($goto_f_request && ($destination_folder != "")) { + site_epilog($database); + header("Location: folder.php?folder=$destination_folder"); exit(); } -if ($destination_folder != "") { - pg_query($database, "update photo set folder='$destination_folder' where identifier='$photo_id'"); +/* Doesn't take arguments */ +if ($goto_a_request && ($destination_album != "")) { + site_epilog($database); + header("Location: album.php?album=$destination_album"); + exit(); } -elseif ($destination_album != "") { - pg_query($database, "insert into album_content (identifier, photo, album) - values (nextval('album_content_id_sequence'), $photo_id, $destination_album)"); -} -elseif ($destination_basket != "") { - $all_photos_for_sale = pg_query($database, " - select identifier, - (select identifier - from shop_order - where shop_order.item=photo_item.identifier - and shop_order.client=$po_user[id] - and transaction is null) as already_selected - from photo_item - where photo=$photo_id"); - for ($counter = 0; $counter < pg_num_rows($all_photos_for_sale); $counter++) { - $photo_for_sale = pg_fetch_row($all_photos_for_sale, $counter); - if ($photo_for_sale[1]) { - /* if already in the basket, update or remove */ - if ($_REQUEST[cb.$photo_for_sale[0]] != 'on') { - pg_query($database, " - delete from shop_order - where item=$photo_for_sale[0] - and client=$po_user[id]"); - } - } - else { - /* if not in the basket insert if selected */ - if ($_REQUEST[cb.$photo_for_sale[0]] == 'on') { - pg_query($database, " - insert into shop_order (identifier, item, client, transaction, pieces, date_of_creation, date_of_last_edit, download_expiry_date) - values (nextval('shop_order_id_sequence'), $photo_for_sale[0], $po_user[id], null, 1, now(), now(), now())"); - } +/* Redirect a trash request appropriately */ +if ($delete_request) { + if ($source_album != "") { + $move_a_request = TRUE; + $destination_album = "trash"; + } else { + $move_f_request = TRUE; + if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $destination_folder = "(select identifier from folder where users = $owner_id and caption = 'Trash')"; + } else { + $destination_folder = $po_user['trash_folder']; } } -} -elseif ($set_as_watermark != "") { - pg_query($database, "update imagemagick_composite_options - set photo_version = (select identifier from photo_version where photo=$photo_id) - where identifier = (select imagemagick_composite_options from users where identifier = $po_user[id])"); -} -elseif ($transform != "") { + } - $version_selector = $version ? "photo_version.identifier=$version" : "photo_version.master='t'"; +if ($spool_request) { + $link_a_request = TRUE; + $destination_album = $po_user['spool_album']; + } + +$return_path = "photo.php?photo=$photo_id&detail_info=$detail_info&ver=$version_id"; + +/* Establish whether or not the viewer has appropriate rights */ +$owns = FALSE; +$can_link = FALSE; + +if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $owns = TRUE; + $can_link = TRUE; + } else { + $result = pg_query($database, "select users, can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') from photo where identifier='$photo_id'"); + $data = pg_fetch_row($result); + if ($data[0] == $po_user['id']) { + $owns = TRUE; + $can_link = TRUE; + } elseif ($data[1] == 't') { + $can_link = TRUE; + } + } + +$can_access_dest = FALSE; +$can_access_source = FALSE; + +/* Verify parameters and destination permissions */ +if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $can_access_dest = TRUE; + $can_access_source = TRUE; + } else { + if ($move_f_request) { + if (($destination_folder != "") && $owns) { + $result = pg_query($database, "select identifier from folder where identifier='$destination_folder' and users = $po_user[id]"); + $can_access_dest = (pg_num_rows($result) > 0); + } + } + if ($move_a_request) { + if (($destination_album != "") && + ($destination_album != "trash") && + $owns) { + $result = pg_query($database, "select identifier from album where identifier='$destination_album' and users = $po_user[id]"); + $can_access_dest = (pg_num_rows($result) > 0); + $result = pg_query($database, "select identifier from album where identifier='$source_album' and users = $po_user[id]"); + $can_access_source = (pg_num_rows($result) > 0); + } + } + if ($link_a_request) { + if (($destination_album != "") && + ($destination_album != "trash") && + $can_link) { + $result = pg_query($database, "select identifier from album where identifier='$destination_album' and users = $po_user[id]"); + $can_access_dest = (pg_num_rows($result) > 0); + } + } + if ($spool_request && $can_link) + $can_access_dest = TRUE; + if ($watermark_request && $can_link) + $can_access_dest = TRUE; + if ($transform_request && $owns) + $can_access_dest = TRUE; + } + +if (!$can_access_dest || + ($can_access_source && $move_a_request)) { + site_epilog($database); + site_push_error($strings['errors']['not_owner']); + header("Location: $return_path"); + exit(); + } + +/* === If we got here, we can perform whatever action was requested === */ + +/* Perform the actual work! */ +if ($move_f_request && ($destination_folder != "")) { + pg_query($database, "update photo set folder = $destination_folder where identifier='$photo_id'"); + } elseif (($link_a_request || $move_a_request) && ($destination_album != "")) { + pg_query($database, "begin"); + + /* Delete from the originating album (for moves/deletes) */ + if (($source_album != "") && $move_a_request) { + $result = pg_query($database, "delete from album_content where album=$source_album and photo = $photo_id and version = $version_id "); + } + + /* Add to the destination album (for linkings) */ + if ($destination_album != "trash") { + /* Check for duplicates */ + $result = pg_fetch_row(pg_query($database, "select count(*) from album_content where photo = $photo_id and version = $version_id and album = $destination_album")); + if ($result[0] == 0) { + /* Add to album */ + $result = pg_query($database, "insert into album_content (identifier, photo, version, album) + values (nextval('album_content_id_sequence'), $photo_id, $version_id, $destination_album)"); + } + } + + if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + } else { + pg_query($database, "commit"); + } + + } elseif ($watermark_request) { + $row = pg_fetch_row(pg_query($database, "select path from files where version=$version_id")); + store_user_pref($database, $po_user['id'], 'watermark_photo', $version_id); + store_user_pref($database, $po_user['id'], 'watermark_path', $row[0]); +} elseif ($transform_request && ($transform != "")) { + + /* Rotate, etc.. This gets complicated as we have to worry about + volume allocation */ + + if (($current_volume = get_current_volume($database, FALSE)) == FALSE) { + site_push_error($strings['errors']['failed_volume']); + site_epilog($database); + header("Location: $return_path"); + } + + pg_query($database, "begin"); + + $version_selector = $version_id ? "photo_version.identifier=$version_id" : "photo_version.master='t'"; + + $next_index = pg_fetch_row(pg_query($database, "select nextval('photo_id_sequence')")); $photo_paths = pg_fetch_row(pg_query($database, " - select small_image_path, medium_image_path, large_image_path, colorspace, orientation, photo_version.identifier, camera + select get_image_path(photo_version.identifier, 1) as thumb_path, get_image_path(photo_version.identifier, 2) as preview_path, get_image_path(photo_version.identifier, 3) as original_path, colorspace, orientation, photo_version.identifier, camera from photo, photo_version, photo_tech where photo.identifier = photo_version.photo and photo.identifier = photo_tech.photo and $version_selector and photo.identifier = '$photo_id'")); - $camera_profile = pg_fetch_row(pg_query($database, " + if ($photo_paths[6]) { + $camera_profile = pg_fetch_row(pg_query($database, " select raw_icc_profile - from photo_tech, camera, camera_type - where photo_tech.photo = $photo_id - and photo_tech.camera = camera.identifier + from camera, camera_type + where camera.identifier = $photo_paths[6] and camera.type = camera_type.identifier")); + } else { + $camera_profile[0] = FALSE; + } - $thumb = $image_repository_path ."/". $photo_paths[0]; - $preview = $image_repository_path ."/". $photo_paths[1]; $original = $image_repository_path ."/". $photo_paths[2]; + $original_file_type = strtolower(substr($original, strrpos($original, ".") + 1)); + + $thumb = "$current_volume/00002/$next_index[0]" . "_1." . $po_options['thumb_format']; + $preview = "$current_volume/00001/$next_index[0]" . "_2." . $po_options['preview_format']; + $colorspace = $photo_paths[3]; $orientation = $photo_paths[4]; $version_id = $photo_paths[5]; - $camera_type = $photo_paths[6]; $orientation = map_transform($orientation, $transform); - pg_query($database, "update photo_version set orientation = $orientation where identifier = $version_id"); - - $im_composite_options = get_im_composite_options($database, $po_user['id']); - $im_options = get_im_options($database, $po_user['id']); - $dcraw_options = get_dcraw_options($database, $po_user['id']); + $retval = pg_query($database, "update photo_version set orientation = $orientation where $version_selector"); $orientation = orientation_to_xform($database, $orientation); - $original_file_type = strtolower(substr($original, strrpos($original, ".") + 1)); $multi_page_parameter = $mime_type[$original_file_type]['page']; $decoder = $mime_type[$original_file_type]['decoder']; $image_data = array(); - $temporary_ppm_file = import_raw_decode($original, $dcraw_options, $decoder, FALSE, $camera_profile[0], $image_data); - if ($temporary_ppm_file) { - $original = $temporary_ppm_file; + $image_data['jpgfromraw'] = FALSE; + + if ($po_options['watermark_location'] && + $po_options['watermark_brightness'] && + $po_options['watermark_photo']) { + $watermark = $po_options['watermark_photo']; + } else { + $watermark = "null"; } - import_generate_preview($original, $preview, FALSE, $im_options, $im_composite_options, $multi_page_parameter, $orientation, $colorspace); - import_generate_thumbnail($original, $thumb, FALSE, $im_options, $multi_page_parameter, $orientation, $colorspace); + /* Preview */ + if ($retval) { + $temporary_ppm_file = import_raw_decode($original, $decoder, $camera_profile[0], FALSE, $image_data); + if ($temporary_ppm_file) { + $original = $temporary_ppm_file; + } + + $retval = import_generate_preview($original, $image_repository_path."/".$preview, FALSE, $multi_page_parameter, $orientation, $colorspace); + } + + if ($retval) { + $retval = transfer_metadata(NULL, $original, $preview, FALSE, TRUE); + } + + if ($retval) { + $image_dimension = po_get_image_size($image_repository_path."/".$preview); + $size = filesize($image_repository_path."/".$preview); + $retval = pg_query($database, "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $version_id, 2, + $image_dimension[0], $image_dimension[1], '$preview', + $size, '', '', $watermark)"); + } + + /* Thumbnail */ + if ($retval) { + $retval = import_generate_thumbnail($original, $image_repository_path."/".$thumb, FALSE, $multi_page_parameter, $orientation, $colorspace); + } + + if ($retval) { + $image_dimension = po_get_image_size($image_repository_path."/".$thumb); + $size = filesize($image_repository_path."/".$thumb); + $retval = pg_query($database, "INSERT INTO files + (identifier, version, size, x_res, y_res, path, filesize, params, comments, watermark) + VALUES ((select nextval('files_id_sequence')), $version_id, 1, + $image_dimension[0], $image_dimension[1], '$thumb', + $size, '', '', null)"); + } + + if ($temporary_ppm_file) { + unlink($temporary_ppm_file); + } + + /* Delete the old files! */ + if ($retval) { + $retval = pg_query($database, "delete from files where path in ('$photo_paths[0]', '$photo_paths[1]')"); + } + if ($retval) { + $err = error_reporting(0); + unlink($image_repository_path . "/" .$photo_paths[0]); + unlink($image_repository_path . "/" .$photo_paths[1]); + error_reporting($err); + } + + if ($retval) { + pg_query($database, "commit"); + } else { + pg_query($database, "rollback"); + $err = error_reporting(0); + unlink($image_repository_path."/".$thumb); + unlink($image_repository_path."/".$preview); + error_reporting($err); + } } - site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=$detail_info&ver=$version"); +header("Location: $return_path"); +exit(); + ?> diff --git a/src/photo.php b/src/photo.php index 75eafc0..5a4f429 100644 --- a/src/photo.php +++ b/src/photo.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,175 +17,148 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/iptc.php"; include_once "include/orderby.php"; include_once "include/search.2.php"; -include_once "$theme/theme.php"; function display_itemized_keyword_list($keywords) { - global $theme; + global $thm_elem; foreach ($keywords as $keyword) { print "$keyword "; } - print "\n"; + print $thm_elem['button.search']; } +$database = site_prolog(PO_USER_TYPE_DISABLED); + $photo_id = pg_escape_string($_REQUEST['photo']); -$version = pg_escape_string($_REQUEST['ver']); -$album_id = pg_escape_string($_REQUEST['album']); -$order_by = pg_escape_string($_REQUEST['order_by']); +$version = isset($_REQUEST['ver']) ? pg_escape_string($_REQUEST['ver']) : FALSE; +$album_id = isset($_REQUEST['album']) ? pg_escape_string($_REQUEST['album']) : FALSE; -$database = site_prolog(); +$detail_info = isset($_REQUEST['detail_info']) ? $_REQUEST['detail_info'] : FALSE; +$order_by = $po_options['order_by']; +$my_rating = FALSE; -$detail_info=""; $option=""; $album_data=""; -if ($photo_id) { +if ($photo_id || $version) { + if (!$photo_id) { + $photo_sel = ""; + } else { + $photo_sel = "and photo.identifier = '$photo_id'"; + } /* select photo data */ $version_selector = $version ? "photo_version.identifier=$version" : "photo_version.master='t'"; - $photo_data = pg_fetch_row(pg_query($database, " - select users, folder, location, caption, date_of_exposure, medium_image_path, large_image_path, - access_type.identifier, access_type.value, copyright_statement, views, + $photo_data = pg_fetch_assoc(pg_query($database, " + select photo.identifier, users, folder, location, caption, date_of_exposure, get_image_path(photo_version.identifier, 2) as preview_path, get_image_path(photo_version.identifier, 3) as original_path, + photo.access_rights, copyright_statement, views, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - hide_original, author, title, '' as keyword, + hide_original, author, title, caption_writer, category, credit, source, headline, instructions, transmission_reference, - supplemental_category, web_statement, colorspace, orientation - from photo, photo_version, access_type - where photo.access_rights = access_type.identifier - and photo.identifier = photo_version.photo + supplemental_category, web_statement, colorspace, orientation, date_added, + photo_version.identifier as version, photo.date_changed, store_url, photo.comments, + can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') as ok + from photo, photo_version + where photo.identifier = photo_version.photo and $version_selector - and photo.identifier = '$photo_id'")); -} else { - header("HTTP/1.1 404 Not found"); - exit(); -} + $photo_sel")); + } if (!$photo_data) { + header("HTTP/1.1 404 Not found"); + site_header($strings['generic']['photo']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['no_such_photo'], ""); + site_footer($database); site_epilog($database); exit(); } -$owner_id = $photo_data[0]; -if ($owner_id != "" && $po_user['type'] != $user_type['disabled']) { - $client = pg_fetch_row(pg_query($database, " - select identifier, trusted - from client - where users='$owner_id' - and client='$po_user[id]' - and status=2")); -} +if (!$photo_id) + $photo_id = $photo_data['identifier']; -/* if the photo is private and isn't mine return */ -if (($photo_data[7] == $access['private']) && ($po_user['id'] != $owner_id) && ($po_user['type'] != $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$version = $photo_data['version']; +$owner_id = $photo_data['users']; -if (($photo_data[7] == $access['protected']) && ($po_user['id'] != $owner_id) && ($client == "") && ($po_user['type'] != $user_type['administrator'])) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - $sql_photo_access_rights = ""; - $sql_folder_access_rights = ""; -} else { - if ($po_user['id']) - $client = pg_fetch_row(pg_query($database, "select identifier from client where users='$owner_id' and client='$po_user[id]' and status=2")); - else - $client = ""; - - if ($client == "") { - $sql_photo_access_rights = "and photo.access_rights = $access[public]"; - $sql_folder_access_rights = "and folder.access_rights = $access[public]"; +if ($photo_data['ok'] != 't') { + if ($photo_data['access_rights'] == $access['private']) { + header("HTTP/1.1 403 Forbidden"); + site_header($strings['generic']['display_folder']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['private'], ""); + site_footer($database); + site_epilog($database); + exit(); } else { - $sql_photo_access_rights = "and photo.access_rights < $access[private]"; - $sql_folder_access_rights = "and folder.access_rights < $access[private]"; + site_push_error($strings['errors']['protected']); + header("Location: login.php?reason=protected&orig=".urlencode("photo.php?photo=$photo_id&ver=$version")); } -} + } -if (!$order_by) { - if ($album_id) { - $tmp = pg_fetch_row(pg_query($database, "select orderby from album where identifier='$album_id'")); - } else { - $tmp = pg_fetch_row(pg_query($database, "select orderby from folder where identifier='$photo_data[1]'")); - } - $order_by = $tmp[0]; -} +$sql_folder_access_rights = "and can_access_folder(folder.identifier, $po_user[id], '{".$passwords."}')"; +$sql_album_access_rights = "and can_access_album(album.identifier, $po_user[id], '{".$passwords."}')"; $sql_order_by_string = $order_by_string[$order_by][0]; if ($album_id) { $photos_in_container = pg_query($database, " - select photo.identifier, - 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - views, photo.date_of_exposure, photo_dupe.date_of_creation, original_image_name - from photo, photo_dupe, album_content, photo_version - where album_content.photo = photo.identifier - and album_content.album = $album_id - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - $sql_photo_access_rights + select album_content.photo, album_content.version + from album_content, photo, photo_version + where album_content.album = $album_id + and photo.identifier = album_content.photo + and photo_version.identifier = album_content.version + and can_access_photo(album_content.photo, $po_user[id], '{".$passwords."}') order by $sql_order_by_string"); } else { $photos_in_container = pg_query($database, " - select photo.identifier, - 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating - from photo, photo_dupe, photo_version - where photo.identifier = photo_dupe.photo - and photo.identifier = photo_version.photo - and photo.folder = $photo_data[1] - $sql_photo_access_rights + select photo.identifier, photo_version.identifier as version + from photo, photo_version + where photo.identifier = photo_version.photo + and photo.folder = $photo_data[folder] + and photo_version.master = 't' + and can_access_photo(photo_version.photo, $po_user[id], '{".$passwords."}') order by $sql_order_by_string"); } -$num_of_photos_in_container = pg_num_rows($photos_in_container); -$previous = $photo_id; -for ($i=0; $i < $num_of_photos_in_container; $i++) { +$next_idx = FALSE; +$prev_idx = FALSE; + +for ($i=0; $i < pg_num_rows($photos_in_container); $i++) { $tmp = pg_fetch_row($photos_in_container, $i); - if ($tmp[0] == $photo_id) { - $i++; - if ($i < $num_of_photos_in_container) { - for ($j = $i; $j < $num_of_photos_in_container; $j++) { - $tmp = pg_fetch_row($photos_in_container, $j); - if ($tmp[0] == $photo_id) - continue; - else - break; - } + if (($album_id === FALSE && $tmp[0] == $photo_id) || + ($album_id && $tmp[1] == $version)) { + if ($i+1 < pg_num_rows($photos_in_container)) { + $next_idx = $i+1; + $tmp = pg_fetch_row($photos_in_container, $next_idx); $next = $tmp[0]; - break; + $next_ver = $tmp[1]; + } + if ($i-1 >= 0) { + $prev_idx = $i-1; + $tmp = pg_fetch_row($photos_in_container, $prev_idx); + $prev = $tmp[0]; + $prev_ver = $tmp[1]; } - else - $next = $photo_id; break; } - $previous = $tmp[0]; -} - -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$owner_id"); - $album_all = pg_query($database, "select identifier, caption from album where users=$owner_id and type='u' "); -} + } $user_data = pg_fetch_row(pg_query($database, " - select users.identifier, last_name, first_name, shop_enable - from users, preferences - where users.preferences=preferences.identifier - and users.identifier=$owner_id")); + select users.identifier, last_name, first_name + from users + where users.identifier=$owner_id")); + $photo_tech = pg_fetch_row(pg_query($database, " select camera, lens, film, flash, scanner, filter, scan_resolution, aperture, focal_length, shutter, camera_metering, camera_program, flash_mode, exposure_comp, flash_comp, ev_difference, iso_override, - support, scan_bitdepth, scan_multiscan, exif, iptc + support, scan_bitdepth, scan_multiscan, exif, iptc, + latitude, longitude, altitude, img_direction, rdf from photo_tech where photo=$photo_id")); @@ -197,390 +170,352 @@ for ($i=0; $i < pg_num_rows($res); $i++) { $keywords[] = $dat['keyword']; } -$techinfo_tab = ($photo_tech[7]!="" || $photo_tech[ 9]!="" || $photo_tech[ 8]!="" || $photo_tech[13]!="" || $photo_tech[15]!="" || - $photo_tech[10]!="" || $photo_tech[11]!="" || $photo_tech[12]!="" || $photo_tech[14]!="" || $photo_tech[ 6]!="" || - $photo_tech[0]!="" || $photo_tech[ 1]!="" || $photo_tech[ 2]!="" || $photo_tech[ 3]!="" || $photo_tech[ 4]!="" || - $photo_tech[5]!="" || $photo_tech[16]!="" || $photo_tech[17]!=""); - -if ($po_user['type'] < $user_type['client']) - $po_user['id'] = "null"; -$all_photo_items_for_sale = pg_query($database, " - select photo_item.identifier, photo, description, price, - (select alpha_code from currency where currency.identifier=photo_item.currency), - comment, photo_item.date_of_creation, - (select name from currency where currency.identifier=photo_item.currency), - shop_category.caption, - (select max(identifier) from shop_order where item=photo_item.identifier and transaction is null) as ordered, - (select max(download_counter) from shop_order where item=photo_item.identifier and shop_order.client = $po_user[id] and transaction is not null) as counter, - (select max(download_expiry_date) from shop_order where item=photo_item.identifier and shop_order.client = $po_user[id] and transaction is not null) as expiry_date, - (select max(shop_order.identifier) from shop_order, shop_transaction, client where shop_order.transaction=shop_transaction.identifier and shop_order.client = client.client and (client.trusted = 't' or shop_transaction.status = '2')) as purchase_confirmed, - photo_item.deleted - from photo_item, shop_item, shop_category - where photo_item.shop_item = shop_item.identifier - and shop_item.category = shop_category.identifier - and photo=$photo_id - order by shop_item.identifier"); - -$number_of_photos_for_sale = pg_num_rows($all_photo_items_for_sale); - -$photo_on_client_order = false; -for ($i=0; $i < $number_of_photos_for_sale; $i++) { - $photo_for_sale = pg_fetch_row($all_photo_items_for_sale, $i); - - if (!$photo_for_sale[12]) - continue; - - if (($photo_for_sale[10] > 0) && (compare_timestamps(date("Y-m-d H:i:s"), $photo_for_sale[11]) > 0)) { - $photo_on_client_order = true; - break; - } -} - -$detail_info = $_REQUEST['detail_info']; - if (!$detail_info) $detail_info = 1; switch ($detail_info) { case 1: - break; -case 2: - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == $user_type['administrator']) || !$techinfo_tab)) - $detail_info = 1; - break; -case 3: - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == $user_type['administrator']))) - $detail_info = 1; - break; -case 4: - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == $user_type['administrator']))) - $detail_info = 1; - break; case 5: - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == $user_type['administrator']))) - $detail_info = 1; - break; case 6: break; +case 2: +case 3: +case 4: +case 98: +case 99: + if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN))) + $detail_info = 1; + break; case 7: - if (!$photo_data[9]) + if (!$photo_data['copyright_statement']) $detail_info = 1; break; -case 8: - if (!(($po_user['id'] == $owner_id) || (($po_user['type'] >= $user_type['client']) && ($number_of_photos_for_sale > 0)))) { - $detail_info = 1; - break; - } - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] >= $user_type['client']))) { - $detail_info = 1; - break; - } - if (($user_data[3]=='f')) - $detail_info = 1; - break; - case 99: - if (!(($po_user['id'] == $owner_id) || ($po_user['type'] == $user_type['administrator']) || !$techinfo_tab)) - $detail_info = 1; - break; default: $detail_info = 1; } -site_header($page_width, "Display Photo"); +if ($photo_data['title'] != "") + $hdr_txt = "$photo_data[title] (# $photo_id)"; + elseif ($photo_data['caption'] != "") + $hdr_txt = "$photo_data[caption] (# $photo_id)"; + else + $hdr_txt = $strings['generic']['photo'] . " # $photo_id (".$strings['photo']['no_title'].")"; + +site_header($hdr_txt); + +$user_display_string = user_disp_string($owner_id, $po_user['id'], + $user_data[1], $user_data[2]); if ($po_user['id'] == $owner_id) { site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { + } else { site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} + } -$zanza = strip_tags($photo_data[14] ? $photo_data[14] : $photo_data[3], ''); -$zanza = makeZanza($zanza, "No Title"); +$zanza = strip_tags(get_photo_title($photo_data['caption'], $photo_data['title']), ''); $folder_data = pg_fetch_row(pg_query($database, " - select folder.identifier, folder.caption, folder.access_rights, folder.description + select folder.identifier, folder.caption, folder.description from folder - where folder.identifier=$photo_data[1] + where folder.identifier=$photo_data[folder] $sql_folder_access_rights")); -$additional_info = ""; -$album_info = ""; +$additional_info=""; +$path_info = ""; if ($album_id) { $album_data = pg_fetch_row(pg_query($database, " - select album.identifier, album.caption, album.description - from album - where album.identifier=$album_id")); - $path_info = " : $album_data[1] : ". $zanza; + select album.identifier, album.caption, album.description, album_content.date_added + from album, album_content + where album.identifier=$album_id + and album_content.album = $album_id + and album_content.photo = $photo_id + $sql_album_access_rights")); + if ($album_data[0]) { + $path_to_album = get_path_to_album($database, $album_id); + $path_info = $path_to_album . " : $album_data[1] : ". $zanza; + } else { + $path_info = " : ".$strings['photo']['hidden_path'] ." : " . $zanza; + } if ($folder_data[0]) - $addional_info="This photo is part of folder: $folder_data[1] "; -} else { + $additional_info=$strings['photo']['from_folder'] .": $folder_data[1] "; + } else { if ($folder_data[0]) { $path_to_folder = get_path_to_folder($database, $folder_data[0]); $path_info = $path_to_folder . " : $folder_data[1] : " . $zanza; } else { - $path_info = " : Hidden Path : " . $zanza; + $path_info = " : ".$strings['photo']['hidden_path'] ." : " . $zanza; } } -site_navigator_status("Users : $user_display_string" . $path_info, $addional_info); +site_navigator_status("$user_display_string $path_info", $additional_info); if ($album_id) { $option = "&album=$album_id"; } -print " 
    \n"; -print "\n\n"; +print "
    "; -print "
    "; $average_rating = pg_fetch_row(pg_query($database, "select avg(value) from rating where photo=$photo_id")); if ($average_rating[0] == "") { $average_rating = ""; - } - else { + } else { $average_rating = round($average_rating[0], 3); } - print "
    \n"; -if ($photo_id != $previous) { - $on_mouse_over ="ttOffsetX=12; ttWidth=10; return escape('\"Previous\n"; -} +print "\n\n"; + +print "\n"; print ""; -print "\n"; print "\n
    \n"; +if ($prev_idx !== FALSE) { + print "
    "; + print "\"$prev_ver\"/"; + print "
    \n"; + $on_mouse_over ="TagToTip('prev_tip', OFFSETX, 12, ABOVE, true);"; + print sprintf($thm_elem['button.previous'], + "photo.php?photo=$prev&ver=$prev_ver&detail_info=$detail_info$option", + $strings['generic']['photo'], + "onmouseover=\"$on_mouse_over\""); + } print "
    \n"; -if (grant_access_to_original($photo_data[6] != "", +if (grant_access_to_original($photo_data['original_path'] != "", ($po_user['id'] == $owner_id), - ($po_user['type'] == $user_type['administrator']), - $photo_data[12] == "f", - $photo_on_client_order)) { - display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "image.display.php?image=$photo_id&size=3&ver=$version", $image_repository_path . "/" . $photo_data[5]); -} -else { - display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[5]); + ($po_user['type'] == PO_USER_TYPE_ADMIN), + $photo_data['hide_original'] == "f")) { + display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "image.display.php?image=$photo_id&size=3&ver=$version", $image_repository_path . "/" . $photo_data['preview_path']); +} else { + display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data['preview_path']); } print "\n"; -if ($photo_id != $next) { - $on_mouse_over ="ttOffsetX=-180; ttWidth=10; return escape('\"Next\n"; +print "\n"; +if ($next_idx !== FALSE) { + print "
    "; + print "\"$next_ver\""; + print "
    \n"; + $on_mouse_over ="TagToTip('next_tip', OFFSETX, 12, ABOVE, true, LEFT, true);"; + + print sprintf($thm_elem['button.next'], + "photo.php?photo=$next&ver=$next_ver&detail_info=$detail_info$option", + $strings['generic']['photo'], + "onmouseover=\"$on_mouse_over\""); } print "
    "; +print ""; -print " 
    \n"; - -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -if (($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) && $techinfo_tab) { - print "\n"; -} + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print "\n"; -} +print "
  • ".$strings['photo']['details']."
  • "; -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print "\n"; -} + print "
  • ".$strings['photo']['dupes']."
  • "; + + } -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print "\n"; -} -print "\n"; + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } -if ($photo_data[9]) { - print "\n"; + print "
  • ".$strings['photo']['copyright']."
  • "; } -if ((($po_user['id'] == $owner_id) || (($po_user['type'] >= $user_type['client']) && ($number_of_photos_for_sale > 0) && ($user_data[3]=='t')))) { - print "\n"; -} +print ""; +print ""; -print "\n"; -print "
    \n"; +print "
    "; +print "
      "; if ($detail_info == 1) { - print "\"Details\"/"; -} -else { - print ""; - print "\"Details\"/"; -} -print "
    \n"; - if ($detail_info == 2) { - print "\"Technical\"/"; - } - else { - print ""; - print "\"Technical\"/"; - } - print "\n"; - if ($detail_info == 5) { - print "\"Version"; - } - else { - print ""; - print "\"Version"; - } - print "\n"; +if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + + if ($detail_info == 2 || $detail_info == 98 || $detail_info == 99) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } + print "
  • ".$strings['photo']['technical']."
  • "; + } + +if ($detail_info == 5) { + $here = "class=\"menu_here\" "; + } else { + $here = ""; + } + +print "
  • ".$strings['photo']['versions']."
  • "; + +if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { if ($detail_info == 3) { - print "\"Duplicates\"/"; + $here = "class=\"menu_here\" "; + } else { + $here = ""; } - else { - print ""; - print "\"Duplicates\"/"; - } - print "
    \n"; - if ($detail_info == 4) { - print "\"Submissions\"/"; - } - else { - print ""; - print "\"Submissions\"/"; - } - print "\n"; if ($detail_info == 6) { - print "\"Ratings\"/"; -} -else { - print ""; - print "\"Ratings\"/"; -} -print "\n"; +print "
  • ".$strings['photo']['ratings']."
  • "; + +if ($photo_data['copyright_statement']) { if ($detail_info == 7) { - print "\"Copyright\"/"; + $here = "class=\"menu_here\" "; + } else { + $here = ""; } - else { - print ""; - print "\"Copyright\"/"; - } - print "
    \n"; - if ($detail_info == 8) { - print "\"Shop\"/"; - } - else { - print ""; - print "\"Shop\"/"; - } - print "
    \n"; -print "
    \n"; -display_effective_content_search($po_user['session'], $photo_id, "", ""); -print "
    \n"; +print "
    "; print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; switch ($detail_info) { default: case 1: - print "\n"; - print ""; - print "\n"; - if ($photo_data[14] != "") { - print ""; - print "\n"; + print "
    Identifier$photo_id
    Title$photo_data[14]
    \n"; + print "".emit_td($strings['photo']['identifier']); + print "\n"; + if ($photo_data['title'] != "") { + print "".emit_td($strings['generic']['title']); + print "\n"; } - if ($photo_data[13] != "") { - print ""; - print "\n"; + if ($photo_data['author'] != "") { + print "".emit_td($strings['generic']['author']); + print "\n"; } if ($keywords != FALSE) { - print ""; - print "".emit_td($strings['generic']['keywords']); + print "\n"; } - if ($photo_data[20] != "") { - print ""; - print "\n"; + if ($photo_data['headline'] != "") { + print "".emit_td($strings['generic']['headline']); + print "\n"; } - if ($photo_data[18] != "") { - print ""; - print "\n"; + if ($photo_data['credit'] != "") { + print "".emit_td($strings['generic']['credit']); + print "\n"; } - if ($photo_data[16] != "") { - print ""; - print "\n"; + if ($photo_data['caption_writer'] != "") { + print "".emit_td($strings['generic']['caption_writer']); + print "\n"; } - if ($photo_data[3] != "") { - print ""; - print "\n"; + if ($photo_data['caption'] != "") { + print "".emit_td($strings['generic']['caption']); + print "\n"; } - if ($album_data[2] != "") { - print ""; - print "\n"; + if ($photo_data['comments'] != "") { + print "".emit_td($strings['generic']['remark']); + print "\n"; } - if ($folder_data[3] != "") { - print ""; - print "\n"; + if ($album_id && ($album_data[2] != "")) { + print "".emit_td($strings['photo']['album_descr']); + print "\n"; } - if ($photo_data[17] != "") { - print ""; - print "\n"; + if ($folder_data[2] != "") { + print "".emit_td($strings['photo']['folder_descr']); + print "\n"; } - if ($photo_data[23] != "") { - print ""; - print "\n"; + if ($photo_data['category'] != "") { + print "".emit_td($strings['generic']['category']); + print "\n"; + } + if ($photo_data['supplemental_category'] != "") { + print "".emit_td($strings['generic']['supp_category']); + print "\n"; + } + if ($photo_data['source'] != "") { + print "".emit_td($strings['generic']['source']); + print "\n"; + } + if ($photo_data['instructions'] != "") { + print "".emit_td($strings['generic']['instructions']); + print "\n"; + } + if ($photo_data['transmission_reference'] != "") { + print "".emit_td($strings['generic']['trans_reference']); + print "\n"; } - if ($photo_data[19] != "") { - print ""; - print "\n"; - } - if ($photo_data[21] != "") { - print ""; - print "\n"; - } - if ($photo_data[22] != "") { - print ""; - print "\n"; - } - - if ($photo_data[2]!="") { - $location = pg_fetch_row(pg_query($database, "select place, city, state, country from view_location where identifier=$photo_data[2]")); + if ($photo_data['location']) { + $location = pg_fetch_row(pg_query($database, "select place, city, state, country from view_location where identifier=$photo_data[location]")); if ($location[0] != '' && ($location[1] != '' || $location[2] != '' || $location[3] != '')) { - $location[0] = sprintf("%s,", $location[0]); + $location[0] = sprintf("%s,", $location[0]); } if ($location[1] != '' && ($location[2] != '' || $location[3] != '')) { - $location[1] = sprintf("%s,", $location[1]); + $location[1] = sprintf("%s,", $location[1]); } if ($location[2] != '' && $location[3] != '') { - $location[2] = sprintf("%s,", $location[2]); + $location[2] = sprintf("%s,", $location[2]); } if ($location[0] != "" || $location[1] != "" || $location[2] != "" || $location[3] != "") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['location']); + print "\n"; } } - if ($photo_data[4] != "") { - print ""; - print "\n"; - } - if ($photo_data[8] != "") { - print ""; - print "\n"; - } - if ($photo_data[10] != "") { - print ""; - print "\n"; - } + /* Knock off the seconds for each */ + if ($photo_data['date_of_exposure']) + $photo_data['date_of_exposure'] = substr($photo_data['date_of_exposure'], 0, 16) . ":00"; + + if ($photo_data['date_of_exposure']) + $photo_data['date_added'] = substr($photo_data['date_added'], 0, 16) . ":00"; + + if ($photo_data['date_changed']) + $photo_data['date_changed'] = substr($photo_data['date_changed'], 0, 16) . ":00"; + + if ($photo_data['date_of_exposure'] != "") { + print "".emit_td($strings['generic']['exposed']); + print "\n"; + } + if (($photo_data['date_added'] != "") && ($photo_data['date_added'] != $photo_data['date_of_exposure'])) { + print "".emit_td($strings['generic']['imported']); + print "\n"; + } + if (($photo_data['date_changed'] != "") && + ($photo_data['date_changed'] != $photo_data['date_of_exposure']) && + ($photo_data['date_changed'] != $photo_data['date_added'])) { + print "".emit_td($strings['generic']['changed']); + print "\n"; + } + + if ($album_id && ($album_data[3] != "") && ($album_data[3] != $photo_data['date_added'])) { + print "".emit_td($strings['photo']['album_added']); + print "\n"; + } + + if ($photo_data['access_rights'] != "") { + print "".emit_td($strings['generic']['access']); + print "\n"; + } + if ($photo_data['views'] != "") { + print "".emit_td($strings['generic']['views']); + print "\n"; + } + if ($photo_data['store_url'] != "") { + print "".emit_td($strings['photo']['purchase']); + print "\n"; + } print "
    $photo_id
    $photo_data[title]
    Author$photo_data[13]
    $photo_data[author]
    Keywords"; + print "
    "; display_itemized_keyword_list($keywords); print "
    Headline$photo_data[20]
    $photo_data[headline]
    Credit$photo_data[18]
    $photo_data[credit]
    Caption Writer$photo_data[16]
    $photo_data[caption_writer]
    Caption$photo_data[3]
    $photo_data[caption]
    Album Description$album_data[2]
    $photo_data[comments]
    Folder Description$folder_data[3]
    $album_data[2]
    Category$photo_data[17]
    $folder_data[2]
    Supplemental Category$photo_data[23]
    $photo_data[category]
    $photo_data[supplemental_category]
    $photo_data[source]
    $photo_data[instructions]
    $photo_data[transmission_reference]
    Source$photo_data[19]
    Instructions$photo_data[21]
    Transmission Reference$photo_data[22]
    Location$location[0] $location[1] $location[2] $location[3]
    $location[0] $location[1] $location[2] $location[3]
    Exposure date"; - if (substr($photo_data[4], 11, 8) != "00:00:00") { - print generate_date_html($photo_data[4], "full", $po_user['id'] == "" ? 0 : 1); - } - else { - print generate_date_html($photo_data[4], "date", $po_user['id'] == "" ? 0 : 1); - } - print "
    Access$photo_data[8]"; - if ($photo_data[12] == "f") - print ", original is accessible for authorized users."; - else - print ", original is acessible for owner only."; - print "
    Views$photo_data[10]
    "; + if (substr($photo_data['date_of_exposure'], 11, 8) != "00:00:00") { + print emit_date_html($photo_data['date_of_exposure'], "full"); + } else { + print emit_date_html($photo_data['date_of_exposure'], "date"); + } + print "
    "; + if (substr($photo_data['date_added'], 11, 8) != "00:00:00") { + print emit_date_html($photo_data['date_added'], "full"); + } else { + print emit_date_html($photo_data['date_added'], "date"); + } + print "
    "; + if (substr($photo_data['date_changed'], 11, 8) != "00:00:00") { + print emit_date_html($photo_data['date_changed'], "full"); + } else { + print emit_date_html($photo_data['date_changed'], "date"); + } + print "
    "; + print emit_date_html($album_data[3], "full"); + print "
    " . $strings['generic'][$access[$photo_data['access_rights']]]; + if ($photo_data['hide_original'] == "f") + print ", ".$strings['generic']['access_auth_users']; + else + print ", ".$strings['generic']['access_owner_only']; + print "
    $photo_data[views]
    $photo_data[store_url]
    \n"; break; case 2: @@ -606,133 +541,167 @@ switch ($detail_info) { if ($photo_tech[18]!="") $scan_bitdepth = pg_fetch_row(pg_query($database, "select value from scan_bitdepth where identifier=$photo_tech[18]")); if ($photo_tech[19]!="") $scan_multiscan = pg_fetch_row(pg_query($database, "select value from scan_multiscan where identifier=$photo_tech[19]")); - print "\n"; + print "
    \n"; if ($photo_tech[0]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['camera']); + print "\n"; } if ($photo_tech[10]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['camera_metering']); + print "\n"; } if ($photo_tech[11]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['camera_program']); + print "\n"; } if ($photo_tech[1]!="") { - print ""; - print "".emit_td($strings['generic']['lens']); + print "\n"; } if ($photo_tech[8]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['focal_length']); + print "\n"; } if ($photo_tech[5]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['filter']); + print "\n"; } if ($photo_tech[2]!="") { - print ""; - print "".emit_td($strings['generic']['film']); + print "\n"; + if ($photo_tech[16]!="") { + print ""; + print emit_td($strings['generic']['iso_override']); + print emit_td($iso_override[0]); + print ""; + } + } else if ($photo_tech[16]!="") { + print emit_td($strings['profile']['iso']); + print emit_td($iso_override[0]); } if ($photo_tech[7]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['aperture']); + print "\n"; } if ($photo_tech[9]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['shutter_speed']); + print "\n"; } - if ($photo_tech[13]!="") { - print ""; - print "\n"; + if ($photo_tech[13]!="" && $exposure_comp[0] != 0) { + print "".emit_td($strings['generic']['exp_comp']); + print "\n"; } - if ($photo_tech[15]!="") { - print ""; - print "\n"; + if ($photo_tech[15]!="" && $ev_difference[0] != 0) { + print "".emit_td($strings['generic']['exp_diff']); + print "\n"; } if ($photo_tech[3]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['flash']); + print "\n"; } if ($photo_tech[12]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['flash_mode']); + print "\n"; } - if ($photo_tech[14]!="") { - print ""; - print "\n"; + if ($photo_tech[14]!="" && $flash_comp[0] != 0) { + print "".emit_td($strings['generic']['flash_comp']); + print "\n"; } if ($photo_tech[4]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['scanner']); + print "\n"; } if ($photo_tech[6]!="") { - print ""; - print "".emit_td($strings['generic']['scan_parameters']); + print "\n"; } /* colorspace data */ - if ($photo_data[25]!="") { + if ($photo_data['colorspace']!="") { global $icc_profiles; - $photo_data[25] = $icc_profiles[$photo_data[25]]['name']; - print ""; - print "\n"; + $photo_data['colorspace'] = $icc_profiles[$photo_data['colorspace']]['name']; + print "".emit_td($strings['generic']['colorspace']); + print "\n"; } /* orientation data */ - if ($photo_data[26] != "") { - $photo_data[26] = orientation_to_name($database, $photo_data[26]); - print ""; - print "\n"; + if ($photo_data['orientation'] != "") { + $photo_data['orientation'] = orientation_to_name($database, $photo_data['orientation']); + print "".emit_td($strings['generic']['rotation']); + print "\n"; } if ($photo_tech[17]!="") { - print ""; - print "\n"; + print "".emit_td($strings['generic']['support']); + print "\n"; } + /* GPS Data */ + if ($photo_tech[22] != "") { + $photo_tech[23] = latitude_dms($photo_tech[23], "longitude"); + $photo_tech[22] = latitude_dms($photo_tech[22], "latitude"); + print "".emit_td($strings['generic']['location']); + print emit_td($strings['photo']['latitude'] . ": $photo_tech[22]
    ".$strings['photo']['longitude'] .": $photo_tech[23]
    ".$strings['photo']['altitude'].": $photo_tech[24] m"); + if ($photo_tech[25] != "") { + print "".emit_td($strings['photo']['direction'] .": $photo_tech[25]"); + } + print "\n"; + } + + if ($photo_tech) { + print ""; + print "\n"; + } + print ""; + print "\n"; + + print "
    Camera$camera[0] $camera[1] $camera[2]
    $camera[0] $camera[1] $camera[2]
    Camera Metering$camera_metering[0]
    $camera_metering[0]
    Camera Program$camera_program[0]
    $camera_program[0]
    Lens$lens[0] $lens[1] $lens[2] "; - display_lens_string($lens[3], $lens[4], $lens[5], $lens[6]); + print "
    $lens[0] $lens[1] $lens[2] "; + print emit_lens_string($lens[3], $lens[4], $lens[5], $lens[6]); print "
    Focal Length$focal_length[0]
    $focal_length[0] mm
    Filter$filter[0] $filter[1] $filter[2]
    $filter[0] $filter[1] $filter[2]
    Film$film[0] $film[1]"; + print "
    $film[0] $film[1]"; if ($film[2]!="") { print " ISO $film[2]"; - if ($photo_tech[16]!="") { - print "; overriden to ISO $iso_override[0]"; - } } if ($film[3]!="") print ", $film[3]"; print "
    Aperture$aperture[0]
    $aperture[0]
    Shutter Speed$shutter[0]
    $shutter[0]s
    Exposure Compensation$exposure_comp[0]
    $exposure_comp[0]
    Ev Difference$ev_difference[0]
    $ev_difference[0]
    Flash$flash[0] $flash[1] $flash[2]
    $flash[0] $flash[1] $flash[2]
    Flash Mode$flash_mode[0]
    $flash_mode[0]
    Flash Compensation$flash_comp[0]
    $flash_comp[0]
    Scanner$scanner[0] $scanner[1] $scanner[2]
    $scanner[0] $scanner[1] $scanner[2]
    Scan Parameters"; - if ($scan_resolution[0]!="") print "$scan_resolution[0] dpi  \n"; - if ($scan_bitdepth[0]!="") print "$scan_bitdepth[0] bits  \n"; - if ($scan_multiscan[0]!="") print "$scan_multiscan[0] passes\n"; + print "
    "; + if ($scan_resolution!="") print "$scan_resolution ".$strings['generic']['dpi'] ." \n"; + if ($scan_bitdepth!="") print "$scan_bitdepth ". $strings['generic']['bits'] ." "; + if ($scan_multiscan!="") print "$scan_multiscan " .$strings['generic']['passes']; print "
    Colorspace$photo_data[25]
    $photo_data[colorspace]
    Transforms applied$photo_data[26]
    $photo_data[orientation]
    Support$support[0] $support[1] $support[2]
    $support[0] $support[1] $support[2]
    ".$strings['photo']['full_exif']."
    ".$strings['photo']['full_exif_dump']."
    \n"; + break; + case 98: + print "\n"; + /* custom exif data */ if ($photo_tech[20]!="") { - $trans = array("" => "\n"); + $trans = array("" => "\n"); + print ""; print strtr($photo_tech[20], $trans); } /* iptc data */ if ($photo_tech[21]!="") { - $photo_tech[21] = human_readable_iptc($photo_tech[21]); - $trans = array("" => "\n"); - $photo_tech[21] = strtr($photo_tech[21], $trans); - print $photo_tech[21]; + $trans = array("" => "\n"); + print ""; + print strtr($photo_tech[21], $trans); } - print ""; - print "\n"; - + /* xmp/rdf data */ + if ($photo_tech[26]!="") { + $trans = array("" => "\n"); + print ""; + print strtr($photo_tech[26], $trans); + } + print ""; + print "\n"; print "
    ", - "" => "", - "" => "
    ", + "" => "", + "" => "
    EXIF
    ", - "" => "", - "" => "
    ", + "" => "", + "" => "
    IPTC
    Full EXIF dump
    ", + "" => "", + "" => "
    XMP/RDF
    ".$strings['photo']['full_exif_dump']."
    \n"; break; case 99: - $image_path = $image_repository_path . "/" . $photo_data[6]; + $image_path = $image_repository_path . "/" . $photo_data['original_path']; - print "\n"; + print "
    \n"; if (is_executable($sys_exiftool)) { $handle = popen("$sys_exiftool $image_path", "r"); @@ -746,13 +715,13 @@ bgcolor=\"$color[table_top]\" width=\"25%\">Transforms applied"; if ($parts[0] == "File Name") continue; if ($parts[0] == "Directory") continue; if (substr($parts[1], 2, 6) == "Binary") continue; - print "\n"; + print "\n"; } pclose($handle); } } else { include('include/exif.php'); - + $exif2 = read_exif_data_raw($image_path, 0); foreach ($exif2 as $key => $section) { @@ -768,276 +737,140 @@ bgcolor=\"$color[table_top]\" width=\"25%\">Transforms applied"; foreach ($val2 as $name3 => $val3) { if (!(strpos($name3, 'unknown') === false)) continue; if (!(strpos($name3, 'RAWDATA') === false)) continue; - print ""; - print "\n"; + print ""; + print "\n"; } } else { - print ""; - print "\n"; + print ""; + print "\n"; } } } else { - print ""; - print "\n"; + print ""; + print "\n"; } } } else { - print ""; - print "\n"; + print ""; + print "\n"; } } } print "
    $parts[0]$parts[1]
    $parts[0]$parts[1]
    $key.$name.$name2.$name3$val3
    $key.$name.$name2.$name3$val3
    $key.$name.$name2$val2
    $key.$name.$name2$val2
    $key.$name$val
    $key.$name$val
    $key$section
    $key$section
    \n"; + break; case 3: $all_photo_dupes = pg_query($database, " - select photo_dupe.identifier, key, date_of_creation, storage_location, storage_index, remark + select photo_dupe.identifier, key, date_of_creation, storage_location, storage_index, remark, version from photo_dupe where photo=$photo_id - order by key"); - $photo_dupe_original = pg_fetch_row(pg_query($database, " - select photo_dupe.identifier, key, date_of_creation, storage_location, storage_index, remark - from photo_dupe - where photo=$photo_id - and remark='Original'")); - $dupe_status = pg_fetch_row(pg_query($database, " - select value - from view_submission - where photo_dupe=$photo_dupe_original[0] - order by date_of_creation desc")); - if (!$dupe_status) $dupe_status[0] ="Created"; - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; + order by key asc"); + print "
    Dupe IdentifierCreation DateStatusStorage LocationRemarkAdd Dupe
    \n"; + print "\n"; + print emit_th($strings['photo']['dupe_id'], "width=\"10%\""); + print emit_th($strings['generic']['version'], "width=\"10%\""); + print emit_th($strings['generic']['created'], "width=\"10%\""); + print emit_th($strings['import']['storage_location'], "width=\"10%\""); + print emit_th($strings['generic']['remark'], "width=\"40%\""); + print "\n"; print "\n"; - print "\n"; - print ""; - print ""; - print ""; - if ($photo_dupe_original[4]) - print ""; - else - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - for ($i=0; $i < pg_num_rows($all_photo_dupes); $i++) { $photo_dupe = pg_fetch_row($all_photo_dupes, $i); - $dupe_status = pg_fetch_row(pg_query($database, " - select value - from view_submission - where photo_dupe=$photo_dupe[0] - order by date_of_creation desc")); - if (!$dupe_status) $dupe_status[0] ="Created"; - if ($photo_dupe[5] == "Original") - continue; print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - print "
    ".$strings['photo']['add_dupe']."
    $photo_id-$photo_dupe_original[1]".generate_date_html($photo_dupe_original[2], 'date', $po_user['id'] == "" ? 0 : 1)."$dupe_status[0]$photo_dupe_original[3]-$photo_dupe_original[4]$photo_dupe_original[3]$photo_dupe_original[5]"; - print "Edit
    $photo_id-$photo_dupe[1]".generate_date_html($photo_dupe[2], 'date', $po_user['id'] == "" ? 0 : 1)."$dupe_status[0]$photo_dupe[3]-$photo_dupe[4]$photo_dupe[5]"; - print "Edit"; - print "Delete
    \n"; - break; - case 4: - $all_photo_dupes = pg_query($database, " - select photo_dupe.identifier, key, date_of_creation, storage_location, storage_index, remark - from photo_dupe - where photo=$photo_id - order by key"); - $photo_dupe_original = pg_fetch_row(pg_query($database, " - select photo_dupe.identifier, key, date_of_creation, storage_location, storage_index, remark - from photo_dupe - where photo=$photo_id - and remark='Original'")); - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - $all_submissions = pg_query($database, " - select identifier, uidentifier, first_name, last_name, value, date_of_creation, remark - from view_submission - where photo_dupe=$photo_dupe_original[0]"); - $num_of_submissions = pg_num_rows($all_submissions); - if ($num_of_submissions > 0) { - for ($i = 0; $i < $num_of_submissions; $i++) { - $submission = pg_fetch_row($all_submissions, $i); - print "\n"; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; + print ""; + print ""; + print ""; + if ($photo_dupe[3] != 'null') { + if ($photo_dupe[4]) + print ""; + else + print ""; + } else { + print ""; } - } - - for ($i=0; $i < pg_num_rows($all_photo_dupes); $i++) { - $photo_dupe = pg_fetch_row($all_photo_dupes, $i); - if ($photo_dupe[5] == "Original") - continue; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; + print ""; + print "\n"; + print "\n"; print "\n"; - $all_submissions = pg_query($database, " - select identifier, uidentifier, first_name, last_name, value, date_of_creation, remark - from view_submission - where photo_dupe=$photo_dupe[0]"); - $num_of_submissions = pg_num_rows($all_submissions); - if ($num_of_submissions > 0) { - for ($j = 0; $j < $num_of_submissions; $j++) { - $submission = pg_fetch_row($all_submissions, $j); - print "\n"; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - } } print "
    Dupe IdentifierDateStatusClient, Remark
    $photo_id-$photo_dupe_original[1]".generate_date_html($photo_dupe_original[2], 'date', $po_user['id'] == "" ? 0 : 1)."Created$photo_dupe_original[6]Add Record
    ".generate_date_html($submission[5], 'date', $po_user['id'] == "" ? 0 : 1)."$submission[4]"; - if ($submission[3] != "" && $submission[2] != "") - $submission[3] = $submission[3] . ","; - print "$submission[3] $submission[2]"; - if ($submission[2] != "" && $submission[6] != "") - $submission[6] = " - " . $submission[6]; - print "$submission[6]"; - print ""; - print "Edit"; - print "Delete
    $photo_id-$photo_dupe[1]"; + print "
    "; + print "\"\""; + print "
    \n"; + $on_mouse_over ="TagToTip('dupe_tip_$i', OFFSETX, 12);"; + print "$photo_dupe[6]
    ".emit_date_html($photo_dupe[2], 'date')."$photo_dupe[3]-$photo_dupe[4]$photo_dupe[3]
    $photo_id-$photo_dupe[1]".generate_date_html($photo_dupe[2], 'date', $po_user['id'] == "" ? 0 : 1). "Created$photo_dupe[6]Add Record$photo_dupe[5]"; + print "".$strings['generic']['edit'].""; + if ($photo_dupe[5] != "Original") + print "".$strings['generic']['delete'].""; + print "
    ".generate_date_html($submission[5], 'date', $po_user['id'] == "" ? 0 : 1). "$submission[4]"; - if ($submission[3] != "" && $submission[2] != "") - $submission[3] = $submission[3] . ","; - print "$submission[3] $submission[2]"; - if ($submission[2] != "" && $submission[6] != "") - $submission[6] = " - " . $submission[6]; - print "$submission[6]"; - print ""; - print "Edit"; - print "Delete
    \n"; break; case 5: - $photo_version_master = pg_fetch_row(pg_query($database, " - select identifier, key, date_of_creation, comment, original_image_name, large_image_path - from photo_version - where photo=$photo_id - and master='t'")); - $bgcolor = (($version == "") || ($photo_version_master[0] == $version)) ? $color['selected'] : $color['table_body']; - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; + $photo_versions = pg_query($database, " + select photo_version.identifier, key, date_of_creation, comment, + original_image_name, + date_changed, master, path, x_res, y_res, filesize + from photo_version, files + where photo=$photo_id + and files.version = photo_version.identifier + and files.size = 3 + order by master desc, key asc"); - print ""; - print ""; + print "
    VersionDateMasterRemarkFile NameDimensionSize
    \n"; + print "\n"; + print emit_th($strings['generic']['version'], "width=\"5%\""); + print emit_th($strings['generic']['created'], "width=\"10%\""); + print emit_th($strings['generic']['changed'], "width=\"10%\""); + print emit_th($strings['generic']['master'], "width=\"5%\""); + print emit_th($strings['generic']['remark'], "width=\"40%\""); + print emit_th($strings['generic']['orig_file'], "width=\"10%\""); + print emit_th($strings['photo']['dimensions'], "width=\"6%\""); + print emit_th($strings['generic']['size'], "width=\"5%\""); - print "\n"; - print "\n"; - print "\n"; - $on_mouse_over ="ttOffsetX=12; ttWidth=10; return escape('$photo_id-V.$photo_version_master[1]"; - print ""; - print ""; - print ""; - print ""; - - error_reporting(0); - $image_dimension = po_get_image_size($image_repository_path."/".$photo_version_master[5], $info); - $image_size = filesize($image_repository_path."/".$photo_version_master[5]) / 1024; - if ($image_size < 1024) { - $image_size = round($image_size); - $image_size_string = "$image_size Kb"; + if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + print "\n"; } - else { - $image_size /=1024; - $image_size = round($image_size); - $image_size_string = "$image_size Mb"; - } - error_reporting(1); - - print ""; - print ""; - - print "\n"; - print "\n"; - print "\n"; print "\n"; - $all_photo_versions = pg_query($database, " - select identifier, key, date_of_creation, comment, original_image_name, large_image_path, master - from photo_version - where photo=$photo_id - order by key"); - for ($i=0; $i < pg_num_rows($all_photo_versions); $i++) { - $photo_version = pg_fetch_row($all_photo_versions, $i); - if ($photo_version[6] == 't') - continue; - $bgcolor = $photo_version[0] == $version ? $color['selected'] : $color['table_body']; - print "\n"; - $on_mouse_over ="ttOffsetX=12; ttWidth=10; return escape('$photo_id-V.$photo_version[1]"; - print ""; - print ""; - print ""; - print ""; + for ($i=0; $i < pg_num_rows($photo_versions); $i++) { + $photo_version = pg_fetch_row($photo_versions, $i); + $row_cls = $photo_version[0] == $version ? "class=\"emphasis\"" : ""; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; - error_reporting(0); - $image_dimension = po_get_image_size($image_repository_path."/".$photo_version[5], $info); - $image_size = filesize($image_repository_path."/".$photo_version[5]) / 1024; + $image_size = $photo_version[10] / 1024; if ($image_size < 1024) { $image_size = round($image_size); - $image_size_string = "$image_size Kb"; - } - else { + $image_size_string = "$image_size KB"; + } else { $image_size /=1024; $image_size = round($image_size); - $image_size_string = "$image_size Mb"; + $image_size_string = "$image_size MB"; } - error_reporting(1); - print ""; - print ""; + print ""; + print ""; - print "\n"; - print "\n"; + if (($po_user['id'] == $owner_id) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + print "\n"; + print "\n"; + } print "\n"; } print "
    Add Version
    ".generate_date_html($photo_version_master[2], 'date', $po_user['id'] == "" ? 0 : 1)."Yes$photo_version_master[3]$photo_version_master[4]".$strings['photo']['add_version']."$image_dimension[0]x$image_dimension[1]$image_size_stringEdit
    ".generate_date_html($photo_version[2], 'date', $po_user['id'] == "" ? 0 : 1)."No$photo_version[3]$photo_version[4]
    "; + print "
    "; + print "\"\""; + print "
    \n"; + $on_mouse_over ="TagToTip('ver_tip_$i', OFFSETX, 12);"; + print "$photo_id-V$photo_version[1]
    ".emit_date_html($photo_version[2], 'date')."".emit_date_html($photo_version[5], 'date')."".emit_yes_no_text($photo_version[6])."$photo_version[3]$photo_version[4]$image_dimension[0]x$image_dimension[1]$image_size_string$photo_version[8]x$photo_version[9]$image_size_string"; - print "Edit"; - print "Delete"; + print "".$strings['generic']['edit'].""; + print ""; + if ($photo_version[6] != 't') { + print "".$strings['generic']['delete']."\n"; + } + print "
    \n"; @@ -1046,224 +879,139 @@ bgcolor=\"$color[table_top]\" width=\"25%\">Transforms applied
    \n"; - print "\n"; - print "
    Rating"; + print "\n"; + print "\n"; + print ""; - print ""; - print ""; - print "\n"; + + if ($po_user['id']) { + $result = pg_query($database, " + select identifier, date_of_creation, value, comment, version from rating where photo = $photo_id - and users = $po_user[id]")); - if ($my_rating == "") { - print "Rate\n"; + and users = $po_user[id] order by date_of_creation"); + for ($i = 0 ; $i < pg_num_rows($result) ; $i++) { + $my_rating = pg_fetch_row($result); + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + if ($po_user['id']!="") { + print "\n"; + print "\n"; + } + print "\n"; } } - print "\n"; - if ($my_rating) { - print "\n"; - print ""; - print ""; - print ""; - print ""; - if ($po_user['id']!="") { - print "\n"; - print "\n"; - } - print "\n"; - } $all_ratings = pg_query($database, " - select identifier, users, date_of_creation, value, first_name, last_name, comment + select identifier, users, date_of_creation, value, first_name, last_name, comment, version from view_rating where photo=$photo_id order by date_of_creation"); - for ($i=0; $i < pg_num_rows($all_ratings); $i++) { - $rating = pg_fetch_row($all_ratings, $i); - if ($rating[1] == $po_user['id']) - continue; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - print "
    ".$strings['generic']['rating']; if ($average_rating != "") print ": $average_rating"; - print ""; - print "CommentUserDate"; - if ($po_user['id']!="") { - $my_rating = pg_fetch_row(pg_query($database, " - select identifier, date_of_creation, value, comment + print ""; + print emit_th($strings['generic']['version'], "width=\"10%\""); + print emit_th($strings['generic']['remark'], "width=\"40%\""); + print emit_th($strings['generic']['user'], "width=\"15%\""); + print emit_th($strings['generic']['created'], "width=\"15%\""); + print emit_th($po_user['id'] ? "".$strings['generic']['rate']."\n" : "", "width=\"10%\" colspan=\"2\""); + print "
    $my_rating[2]"; + print "
    "; + print "\"\""; + print "
    \n"; + $on_mouse_over ="TagToTip('rate_tip_$i', OFFSETX, 12);"; + print "$photo_id-$my_rating[4]
    $my_rating[3]".$strings['photo']['myself']."".emit_date_html($my_rating[1], 'date').""; + print "".$strings['generic']['edit'].""; + print "".$strings['generic']['delete']."
    $my_rating[2]$my_rating[3]Myself".generate_date_html($my_rating[1], 'date', $po_user['id'] == "" ? 0 : 1).""; - print "Edit"; - print "Delete
    $rating[3]$rating[6]$rating[4] $rating[5]".generate_date_html($rating[2], 'date', $po_user['id'] == "" ? 0 : 1)."
    \n"; - break; - case 7: - if (strncmp($photo_data[24], "http", 4) == 0) - $photo_data[24] = "".$photo_data[24].""; - - print "\n"; - print ""; - print "\n"; - print ""; - print "\n"; - print "
    Statement$photo_data[9]
    Web Statement$photo_data[24]
    \n"; - break; - case 8: - if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - $owner = TRUE; - $cellpadding = 6; - } - else { - $owner = FALSE; - $cellpadding = 4; - } - print "\n"; - print "\n"; - if (!$owner) { - print "\n"; - } - print ""; - print ""; - print ""; - print ""; - print ""; - if ($owner) { - print "\n"; - } - print "\n"; - - $none_checked = TRUE; - for ($i=0; $i < $number_of_photos_for_sale; $i++) { - $photo_for_sale = pg_fetch_row($all_photo_items_for_sale, $i); - if (($photo_for_sale[13] == 't') && (!$owner)) - continue; - - print "\n"; - if (!$owner) { - if ($photo_for_sale[9]) { - $checked = " checked "; - $none_checked = FALSE; - } - else { - $checked = ""; - } - - print "\n"; + if ($all_ratings) { + for ($i=0; $i < pg_num_rows($all_ratings); $i++) { + $rating = pg_fetch_row($all_ratings, $i); + if ($rating[1] == $po_user['id']) + continue; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + print "\n"; + print "\n"; } - print ""; - print ""; - print ""; - print ""; - print ""; - if ($owner) { - print "\n"; - print "\n"; - } - else { - print "Undelete\n"; - } - } - print "\n"; - } print "
    SelectCategoryItemRemarkPriceDate"; - print "Add
    $rating[3]$rating[7]$rating[6]$rating[4] $rating[5]".emit_date_html($rating[2], 'date')."
    $photo_for_sale[8]$photo_for_sale[2]$photo_for_sale[5]"; - /* if the client is trusted or the shop_transaction was aproved */ - if ($photo_for_sale[12]) { - if (is_numeric($photo_for_sale[10])) { - print ", $photo_for_sale[10] downloads left"; - if ($photo_for_sale[11]) { - print ", expires at ".generate_date_html($photo_for_sale[11], 'date', $po_user['id'] == "" ? 0 : 1); - } - } - } - print "$photo_for_sale[4] $photo_for_sale[3]".generate_date_html($photo_for_sale[6], 'date', $po_user['id'] == "" ? 0 : 1).""; - print "Edit"; - if ($photo_for_sale[13] == 'f') { - print "Delete
    \n"; -} -if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print ""; - print ""; - print ""; - print "
    "; - print ""; - print ""; - if ($po_user['id'] == $owner_id || $po_user['type'] == $user_type['administrator']) { - print "\n"; - print ""; - print ""; - print ""; - } - print ""; - if ($detail_info != 6 && $detail_info != 5 && $detail_info != 4 && $detail_info != 3) { - print ""; - print "\n"; - } - print ""; - print "\n"; + } - print ""; - print "
    "; - display_printto(); - print "  "; - display_export(); - print "  "; + } + break; + case 7: + if (strncmp($photo_data['web_statement'], "http", 4) == 0) + $photo_data['web_statement'] = "".$photo_data['web_statement'].""; + + print "\n"; + print "".emit_td($strings['generic']['copyright']); + print "\n"; + print "".emit_td($strings['generic']['web_statement']); + print "\n"; + print "
    $photo_data[copyright_statement]
    $photo_data[web_statement]
    \n"; + break; + } + +/************************* Now for the page footer *************************/ + +print "
    "; +print ""; + +display_order_by_combo_with_button($order_by); + +if ($po_user['id'] == $owner_id || $po_user['type'] == PO_USER_TYPE_ADMIN) { display_transform($photo_id); - print "
      \n"; - print "\"Edit\"\n"; - print "  \n"; - print "\n"; - print "
    "; +print ""; - print ""; + display_album_actions($album_all, $album_id); } + } - print ""; - print "
    "; - print "\n"; - display_order_by_combo_for_photo($order_by, $album_id, $previous, $photo_id, $next, $detail_info); - print "
    "; +if ($po_user['id'] == $owner_id || $po_user['type'] == PO_USER_TYPE_ADMIN) { + print sprintf($thm_elem['button.edit'], "photo.edit.php?photo=$photo_id"); - print ""; - print ""; - print ""; - print ""; - print ""; + if ($photo_data['folder'] != $po_user['trash_folder']) + print $thm_elem['button.delete_s']; + } + +if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print $thm_elem['button.set.as.watermark']; + } + +if ($po_user['type'] >= PO_USER_TYPE_CLIENT) { + print $thm_elem['button.add.to.spool']; + } +print "
    "; - display_moveto_folder($folder_all, $photo_data[1], "goto"); - print "  "; - display_moveto_folder($folder_all, $photo_data[1], "moveto"); - print "
    \n"; + +if ($po_user['id'] == $owner_id || $po_user['type'] == PO_USER_TYPE_ADMIN) { + $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$owner_id order by date_of_creation desc"); + $album_all = pg_query($database, " + select identifier, caption, parent_album + from album + where users=$owner_id + order by date_of_creation desc"); + display_folder_actions($folder_all, $photo_data['folder']); if (pg_num_rows($album_all) > 0) { - print "
      "; - display_linkto_album($album_all, ""); - print "
    "; +if ($po_user['type'] >= PO_USER_TYPE_CLIENT) { + display_spool_actions($database, $po_user['id']); + } + +print ""; - print "
    "; -} -elseif (($po_user['type'] >= $user_type['client']) && ($detail_info == 8)) { - if ($number_of_photos_for_sale > 0) { - print ""; - print ""; - if ($none_checked) - print "\n"; - else - print "\n"; - } - print "\"View\n"; -} print "\n"; +print ""; -print ""; site_footer($database); site_epilog($database); ?> diff --git a/src/photo.print.2.php b/src/photo.print.2.php deleted file mode 100644 index 8b13789..0000000 --- a/src/photo.print.2.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/photo.rating.add.2.php b/src/photo.rating.add.2.php index 8b09a23..ec8096c 100644 --- a/src/photo.rating.add.2.php +++ b/src/photo.rating.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,48 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['version']); $comment = pg_escape_string($_REQUEST['comment']); $new_rating = pg_escape_string($_REQUEST['new_rating']); -$result = pg_query($database, "insert into rating (identifier, photo, users, date_of_creation, value, comment) - values (nextval('rating_id_sequence'), '$photo_id', '$po_user[id]', now(), $new_rating, '$comment')"); +$photo_data = pg_fetch_row(pg_query($database, " + select users, access_rights, + can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') as ok + + from photo, photo_version + where photo.identifier = photo_version.photo + and photo_version.master = 't' + and photo.identifier = '$photo_id'")); + + +if ($photo_data[2] != 't') { + if ($photo_data[1] == $access['private']) { + header("HTTP/1.1 403 Forbidden"); + site_header($strings['generic']['display_folder']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['private'], ""); + site_footer($database); + site_epilog($database); + } else { + site_push_error($strings['errors']['protected']); + header("Location: login.php?reason=protected&orig=".urlencode("photo.php?photo=$photo_id&ver=$version")); + } + } + +$result = pg_query($database, "insert into rating (identifier, photo, users, date_of_creation, value, comment, version) + values (nextval('rating_id_sequence'), '$photo_id', '$po_user[id]', now(), $new_rating, '$comment', $version)"); if (!$result) { - print "Failed to create new rating"; + site_push_error($strings['errors']['db_insert_failed']); } site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=6"); +header("Location: photo.php?photo=$photo_id&ver=$version&detail_info=6"); ?> diff --git a/src/photo.rating.add.php b/src/photo.rating.add.php index 989e2c5..b3cd114 100644 --- a/src/photo.rating.add.php +++ b/src/photo.rating.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,27 +17,24 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $photo_id = pg_escape_string($_REQUEST['photo']); +$version = pg_escape_string($_REQUEST['ver']); + $photo_data = pg_fetch_row(pg_query($database, " - select users, caption, medium_image_path, large_image_path, hide_original, title + select users, caption, get_image_path(photo_version.identifier, 2) as preview_path, title, access_rights, + can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') as ok from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' - and photo.identifier = '$photo_id'")); + and photo_version.identifier = $version + and photo_version.photo = '$photo_id'")); $folder_data = pg_fetch_row(pg_query($database, " select folder.identifier, folder.caption from photo, folder @@ -49,65 +46,78 @@ $user_name = pg_fetch_row(pg_query($database, " where identifier=$photo_data[0]")); $rating = pg_fetch_row(pg_query($database, " - select value + select value, identifier from rating where photo='$photo_id' + and version='$version' and users='$po_user[id]'")); -site_header($page_width, "Add Photo Rating"); +$owner_id = $photo_data[0]; +if ($photo_data[5] != 't') { + if ($photo_data[4] == $access['private']) { + header("HTTP/1.1 403 Forbidden"); + site_header($strings['generic']['display_folder']); + site_navigator(1); + site_navigator_status(user_disp_string(0, $po_user['id'], "", ""). " : ". $strings['errors']['private'], ""); + site_footer($database); + site_epilog($database); + } else { + site_push_error($strings['errors']['protected']); + header("Location: login.php?reason=protected&orig=".urlencode("photo.php?photo=$photo_id&ver=$version")); + } + } + +site_header(sprintf($strings['profile']['add'], $strings['generic']['rating'])); + +$user_display_string = user_disp_string($photo_data[0], $po_user['id'], + $user_name[1], $user_name[2]); if ($po_user['id'] == $photo_data[0]) { site_navigator(5); - $user_display_string = "My folders and albums"; -} else { + } else { site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_name[1], $user_name[2]); -} + } $path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[1], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Submit new rating", ""); +$title = get_photo_title($photo_data[1], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['add'], $strings['generic']['rating']), ""); -print " 
    \n"; print "
    \n"; display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); print "
    \n"; -print " 
    \n"; if ($rating[0]) { - print "\n"; - print ""; - print ""; - print ""; - print "
    You have already rated this picture!
    "; - print "Your score is $rating[0], which you can modify or remove at your preference.
    \n"; - - print " 
    \n"; - print "\"Back\"/\n"; -} -else { + print "
    "; + print err_str($strings['errors']['already_rated']); + print "

    "; + print sprintf ($strings['photo']['rating_text'], $rating[0], + emit_a("photo.rating.edit.php?rating=$rating[1]", $strings['generic']['modify']), + emit_a("photo.rating.del.php?rating=$rating[1]", $strings['generic']['delete'])); + print "

    "; + print $thm_elem['button.back']; +} else { print "
    \n"; print "\n"; - print "\n"; + print "\n"; + print "
    \n"; print ""; - print ""; - print ""; + print emit_th($strings['photo']['rating'], "width=\"12%\""); + print emit_th($strings['generic']['remark'], "width=\"88%\""); print ""; - print ""; - print ""; + print ""; print ""; print "
    RatingComment
    "; + print ""; print ""; print "
    \n"; - print " 
    \n"; - print "\n"; - print "\"Cancel\"/\n"; + print $thm_elem['button.submit']; + print $thm_elem['button.cancel']; print "
    \n"; } -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.rating.del.2.php b/src/photo.rating.del.2.php index 14c4abf..966df5a 100644 --- a/src/photo.rating.del.2.php +++ b/src/photo.rating.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,29 +17,35 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { +$rating_id = pg_escape_string($_REQUEST['rating']); + +$rating = pg_fetch_row(pg_query($database, " + select value, users, photo, version + from rating + where identifier='$rating_id'")); + +/* Enforce ownership */ +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $rating[1])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); exit(); } -$photo_id = pg_escape_string($_REQUEST['photo']); -$rating_id = pg_escape_string($_REQUEST['rating']); - $result = pg_query($database, "delete from rating where identifier='$rating_id' and users=$po_user[id]"); if (!$result) { - print "Failed to remove rating"; -} + site_push_error($strings['errors']['db_insert_failed']); + } site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=6"); +header("Location: photo.php?photo=$rating[2]&ver=$rating[3]&detail_info=6"); ?> diff --git a/src/photo.rating.del.php b/src/photo.rating.del.php index a3c96bc..e4dd9bb 100644 --- a/src/photo.rating.del.php +++ b/src/photo.rating.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,42 +17,39 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$photo_id = pg_escape_string($_REQUEST['photo']); $rating_id = pg_escape_string($_REQUEST['rating']); $rating = pg_fetch_row(pg_query($database, " - select value, users + select value, users, photo, version from rating where identifier='$rating_id'")); +$photo_id = $rating[2]; +$version = $rating[3]; + /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && - $po_user['id'] != $rating[1])) { +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $rating[1])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } $photo_data = pg_fetch_row(pg_query($database, " - select users, caption, medium_image_path, large_image_path, hide_original, title + select users, caption, get_image_path(photo_version.identifier, 2) as preview_path, title from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' - and photo.identifier = '$photo_id'")); + and photo_version.identifier = $rating[3] + and photo_version.photo = $rating[2]")); $folder_data = pg_fetch_row(pg_query($database, " select folder.identifier, folder.caption from photo, folder @@ -63,36 +60,32 @@ $user_name = pg_fetch_row(pg_query($database, " from users where identifier=$photo_data[0]")); -site_header($page_width, "Delete Photo Rating"); +site_header(sprintf($strings['profile']['delete'], $strings['generic']['rating'])); + +$user_display_string = user_disp_string($photo_data[0], $po_user['id'], + $user_name[1], $user_name[2]); if ($po_user['id'] == $photo_data[0]) { site_navigator(5); - $user_display_string = "My folders and albums"; -} else { + } else { site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_name[1], $user_name[2]); -} -$path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[1], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Remove your rating", ""); + } + +$path_to_folder = get_path_to_folder($database, $folder_data[0]); +$title = get_photo_title($photo_data[1], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['delete'], $strings['generic']['rating']), ""); -print " 
    \n"; print "
    \n"; display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; print "
    \n"; -print "\n"; print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print "
    You are about to remove your rating $rating[0], for this picture.
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print "

    "; +print sprintf ($strings['photo']['rating_text'], $rating[0]); +print "

    "; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; print "
    \n"; -print " 
    \n"; +print "\n"; + site_footer($database); site_epilog($database); diff --git a/src/photo.rating.edit.2.php b/src/photo.rating.edit.2.php index ebc11f2..bcbaf5f 100644 --- a/src/photo.rating.edit.2.php +++ b/src/photo.rating.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,30 +17,37 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$photo_id = pg_escape_string($_REQUEST['photo']); $rating_id = pg_escape_string($_REQUEST['rating']); $comment = pg_escape_string($_REQUEST['comment']); $new_rating = pg_escape_string($_REQUEST['new_rating']); -$result = pg_query($database, "update rating set value='$new_rating', comment='$comment' where identifier='$rating_id' and users=$po_user[id]"); -if (!$result) { - print "Failed to edit rating"; +$rating = pg_fetch_row(pg_query($database, " + select value, users, photo, version + from rating + where identifier='$rating_id'")); + +/* Enforce ownership */ +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $rating[1])) { + site_epilog($database); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); + exit(); } +$result = pg_query($database, "update rating set value='$new_rating', comment='$comment' where identifier='$rating_id' and users=$po_user[id]"); +if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); + } + site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=6"); +header("Location: photo.php?photo=$rating[2]&ver=$rating[3]&detail_info=6"); ?> diff --git a/src/photo.rating.edit.php b/src/photo.rating.edit.php index 991c7c0..474fadf 100644 --- a/src/photo.rating.edit.php +++ b/src/photo.rating.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,97 +17,89 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_CLIENT); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$photo_id = pg_escape_string($_REQUEST['photo']); $rating_id = pg_escape_string($_REQUEST['rating']); $rating = pg_fetch_row(pg_query($database, " - select value, comment, users + select value, comment, users, photo, version from rating where identifier='$rating_id'")); +$photo_id = $rating[3]; +$version = $rating[4]; + /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && - $po_user['id'] != $rating[2])) { +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $rating[2])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } $photo_data = pg_fetch_row(pg_query($database, " - select users, caption, medium_image_path, large_image_path, hide_original, title + select users, caption, get_image_path(photo_version.identifier, 2) as preview_path, title from photo, photo_version where photo.identifier = photo_version.photo - and photo_version.master = 't' - and photo.identifier = '$photo_id'")); + and photo_version.identifier = $version + and photo_version.photo = $photo_id")); $folder_data = pg_fetch_row(pg_query($database, " select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); + $user_name = pg_fetch_row(pg_query($database, " select identifier, last_name, first_name from users where identifier=$photo_data[0]")); -site_header($page_width, "Edit Photo Rating"); +site_header(sprintf($strings['profile']['edit'], $strings['generic']['rating'])); +$user_display_string = user_disp_string($photo_data[0], $po_user['id'], + $user_name[1], $user_name[2]); if ($po_user['id'] == $photo_data[0]) { site_navigator(5); - $user_display_string = "My folders and albums"; -} else { + } else { site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_name[1], $user_name[2]); -} -$path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[1], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Edit your rating", ""); + } + +$path_to_folder = get_path_to_folder($database, $folder_data[0]); +$title = get_photo_title($photo_data[1], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['edit'], $strings['generic']['rating']), ""); -print " 
    \n"; print "
    \n"; display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); print "
    \n"; -print " 
    \n"; + print "
    \n"; -print "\n"; print "\n"; -print "\n"; +print "
    \n"; print ""; -print ""; -print ""; +print emit_th($strings['photo']['rating'], "width=\"12%\""); +print emit_th($strings['generic']['remark'], "width=\"88%\""); print ""; -print ""; -print ""; +print ""; print ""; print "
    RatingComment
    "; +print ""; print ""; print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.submit']; +print $thm_elem['button.cancel']; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.submission.add.2.php b/src/photo.submission.add.2.php deleted file mode 100644 index 65a5a6d..0000000 --- a/src/photo.submission.add.2.php +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/src/photo.submission.add.php b/src/photo.submission.add.php deleted file mode 100644 index e640489..0000000 --- a/src/photo.submission.add.php +++ /dev/null @@ -1,124 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Submit this photo", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_data[0]&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print ""; - -print "
    Submission dateStatusClientRemark
    \n"; -display_date_input_form("submission_timestamp", ""); -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.submission.del.2.php b/src/photo.submission.del.2.php deleted file mode 100644 index b5202a1..0000000 --- a/src/photo.submission.del.2.php +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/src/photo.submission.del.php b/src/photo.submission.del.php deleted file mode 100644 index d4fa6ce..0000000 --- a/src/photo.submission.del.php +++ /dev/null @@ -1,127 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Submit this photo", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_data[0]&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print "\n"; -if ($submission_data[3] != "" && $submission_data[2] != "") - $submission_data[3] = $submission_data[3] . ","; -print "\n"; -print "\n"; -print ""; - -print "
    Submission dateStatusClientRemark
    \n".generate_date_html($submission_data[5], 'date', 1). "$submission_data[4]$submission_data[3] $submission_data[2]$submission_data[6]
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; - -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.submission.edit.2.php b/src/photo.submission.edit.2.php deleted file mode 100644 index 6243f9c..0000000 --- a/src/photo.submission.edit.2.php +++ /dev/null @@ -1,56 +0,0 @@ - diff --git a/src/photo.submission.edit.php b/src/photo.submission.edit.php deleted file mode 100644 index bcdfbc5..0000000 --- a/src/photo.submission.edit.php +++ /dev/null @@ -1,142 +0,0 @@ -Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Submit this photo", ""); - -print " 
    \n"; -print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_data[0]&size=2&ver=$version", "", $image_repository_path . "/" . $photo_data[2]); -print "
    \n"; -print " 
    \n"; - -print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print ""; - -print "
    Submission dateStatusClientRemark
    \n"; -display_date_input_form("submission_timestamp", $submission_data[3]); -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; -print "
    \n"; - -print " 
    \n"; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/photo.version.add.2.php b/src/photo.version.add.2.php index e344586..3556728 100644 --- a/src/photo.version.add.2.php +++ b/src/photo.version.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,9 +17,9 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/import.php"; include_once "include/common.php"; include_once "include/site.php"; @@ -34,28 +34,36 @@ $file_size = $_FILES['file_name']['size'][0]; $file_name_tmp = $_FILES['file_name']['tmp_name'][0]; $original_file_type = strtolower(substr($file_name, strrpos($file_name, ".") + 1)); -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['user']) { +$photo_data = pg_fetch_row(pg_query($database, " + select users, caption + from photo, photo_version + where photo.identifier = photo_version.photo + and photo_version.master = 't' + and photo.identifier = '$photo_id'")); + +/* Enforce ownership */ +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $photo_data[0])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -$my_im_composite_options = get_im_composite_options($database, $po_user['id']); -$im_options = get_im_options($database, $po_user['id']); -$dcraw_options = get_dcraw_options($database, $po_user['id']); - -site_header($page_width, "Add Photo Version"); +site_header(sprintf($strings['profile']['add'], $strings['generic']['version'])); +$user_display_string = user_disp_string($photo_data[3], $po_user['id'], + "", ""); site_navigator(5); $folder_data = pg_fetch_row(pg_query($database, " select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -site_navigator_status("Users : My Folders and Albums : $folder_data[1] : $photo_data[0] : Uploading new version", ""); -print " 
    \n"; -print "
    " ; +$path_to_folder = get_path_to_folder($database, $folder_data[0]); + +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $photo_data[1] : ".$strings['import']['import_photos'], ""); $image_data['file'][0]['name'] = $file_name; $image_data['file'][0]['name_tmp'] = $file_name_tmp; @@ -64,14 +72,10 @@ $image_data['file'][0]['remark'] = $comment; $image_data['file'][0]['master'] = $master; $image_data['colorspace'] = $colorspace; -photo_version_import($database, 0, $im_options, $my_im_composite_options, $dcraw_options, $po_user['id'], $photo_id, $image_data); +photo_version_import($database, 0, $photo_data[0], $photo_id, $image_data); -print " 
    \n"; -print "Upload finished, changes saved."; -print " 
    \n"; -print "
    " ; +print "
    ".$strings['import']['complete']."
    "; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.version.add.php b/src/photo.version.add.php index 0273334..8c82f88 100644 --- a/src/photo.version.add.php +++ b/src/photo.version.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,97 +17,86 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, get_image_path(photo_version.identifier, 3) as original_path, users, hide_original, title, access_rights from photo, photo_version where photo.identifier = photo_version.photo and photo_version.master = 't' and photo.identifier = '$photo_id'")); -/* Admin is god */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; - } else { - $user_id = $po_user['id']; +/* Enforce ownership */ +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $photo_data[3])) { + site_epilog($database); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); + exit(); } $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[3]")); + +site_header(sprintf($strings['profile']['add'], $strings['generic']['version'])); + +$user_display_string = user_disp_string($photo_data[3], $po_user['id'], + "", ""); + +site_navigator(5); -site_header($page_width, "Add Photo Version"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} $path_to_folder = get_path_to_folder($database, $folder_data[0]); $title = get_photo_title($photo_data[5], $photo_data[0]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Add version", ""); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['add'], $strings['generic']['version']), ""); -print " 
    \n"; print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; if (!ini_get("file_uploads")) { - print "
    \n"; - print "File upload is disabled in you PHP configuration file.
    "; - print "
    \n"; - print " 
    \n"; + print err_str($strings['errors']['file_upload_disabled']); site_footer($database); site_epilog($database); } print "
    \n"; -print "\n"; +print "\n"; -print "\n"; +print "
    \n"; print "\n"; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['generic']['master'], "width=\"5%\""); +print emit_th($strings['generic']['remark'], "width=\"45%\""); +print emit_th($strings['generic']['colorspace'], "width=\"15%\""); +print emit_th($strings['import']['image_to_add'], "width=\"35%\""); print "\n"; print "\n"; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; +print ""; print "
    MasterRemarkColorspaceUpload this image:
    "; -display_yes_no_combo("master", "t"); +print ""; +display_yes_no_combo("master", "f"); print ""; -print "\n"; +print ""; +print "\n"; print ""; +print ""; display_colorspace_combo("colorspace", ""); print ""; -print "
    "; +print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print "
    \n"; +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    "; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.version.del.2.php b/src/photo.version.del.2.php index be32bb1..2997753 100644 --- a/src/photo.version.del.2.php +++ b/src/photo.version.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,56 +17,73 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - $version_id = pg_escape_string($_REQUEST['version']); $photo_id = pg_escape_string($_REQUEST['photo']); -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); -$photo_version = pg_fetch_row(pg_query($database, "select photo_version.identifier, master, small_image_path, medium_ima;5D;5Dge_path, large_image_path, users from photo_version, photo where photo.identifier = photo_version.photo and photo_version.identifier='$version_id'")); +$files_to_nuke = pg_query($database, " + select files.identifier, path + from photo_version, files + where files.version = photo_version.identifier + and photo_version.identifier = $version_id"); + +$photo_version = pg_fetch_row(pg_query($database, "select photo_version.identifier, master, users from photo_version, photo where photo.identifier = photo_version.photo and photo_version.identifier='$version_id'")); /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && - ($po_user['id'] != $photo_version[5])) { +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $photo_version[2])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } if ($photo_version[1] == 't') { site_epilog($database); - header("location: photo.php?photo=$photo_id&detail_info=5"); + site_push_error($strings['errors']['delete_master']); + header("Location: photo.php?photo=$photo_id&ver=$version_id&detail_info=5"); exit(); } pg_query($database, "begin"); -$result = pg_query($database, "delete from photo_version where identifier='$version_id'"); -if (!$result) { +$result = pg_query($database, "delete from album_content where version='$version_id'"); + +if ($result !== FALSE) { + $result = pg_query($database, "delete from files where version = $version_id"); + } + +if ($result !== FALSE) { + $result = pg_query($database, "delete from photo_version where identifier='$version_id'"); + } + +if ($result === FALSE) { + site_push_error($strings['errors']['db_insert_failed']); pg_query($database, "rollback"); site_epilog($database); - header("location: photo.php?photo=$photo_id&detail_info=5"); + header("Location: photo.php?photo=$photo_id&detail_info=5"); exit(); } -error_reporting(0); -unlink($image_repository_path . "/" .$photo_version[2]); -unlink($image_repository_path . "/" .$photo_version[3]); -unlink($image_repository_path . "/" .$photo_version[4]); -error_reporting(1); +// Lastly, remove all of the thumbnail and image from the filesystem +$err = error_reporting(0); +$files_to_nuke_cnt = pg_num_rows($files_to_nuke); +for ($i=0; $i < $files_to_nuke_cnt; $i++) { + $drop_this_image = pg_fetch_row($files_to_nuke, $i); + unlink($image_repository_path . "/" .$drop_this_image[1]); + /* if a content based search server is set up, audit the removed images */ + // audit_photo($database, $drop_this_image[3]); + } +error_reporting($err); pg_query($database, "commit"); site_epilog($database); -header("location: photo.php?photo=$photo_id&detail_info=5"); +header("Location: photo.php?photo=$photo_id&detail_info=5"); ?> diff --git a/src/photo.version.del.php b/src/photo.version.del.php index 13120f0..5b80956 100644 --- a/src/photo.version.del.php +++ b/src/photo.version.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,98 +17,80 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); $version_id = pg_escape_string($_REQUEST['version']); $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, users, title from photo, photo_version where photo.identifier = photo_version.photo and photo_version.identifier='$version_id' and photo.identifier = '$photo_id'")); /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && - ($po_user['id'] != $photo_data[3])) { +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $photo_data[2])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; - } else { - $user_id = $po_user['id']; -} - $photo_version = pg_fetch_row(pg_query($database, "select identifier, key, date_of_creation, comment, master from photo_version where identifier='$version_id'")); $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[2]")); -site_header($page_width, "Delete Photo Version"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} +site_header(sprintf($strings['profile']['delete'], $strings['generic']['version'])); +$user_display_string = user_disp_string($photo_data[3], $po_user['id'], + "", ""); + +site_navigator(5); + $path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[0], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Delete version", ""); +$title = get_photo_title($photo_data[0], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['delete'], $strings['generic']['version']), ""); -print " 
    \n"; print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version_id", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version_id", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; -print "\n"; +print "
    \n"; print "\n"; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['generic']['version'], "width=\"10%\""); +print emit_th($strings['generic']['imported'], "width=\"20%\""); +print emit_th($strings['generic']['master'], "width=\"5%\""); +print emit_th($strings['generic']['remark'], "width=\"60%\""); print "\n"; print "\n"; -print ""; -print ""; -print ""; -print ""; +print ""; +print ""; +print emit_td(emit_yes_no_text($photo_version[4])); +print ""; print "\n"; print "
    VersionDateMasterRemark
    $photo_id-V.$photo_version[1]".generate_date_html($photo_version[2], 'date', 1).""; -display_yes_no_text($photo_version[4]); -print "$photo_version[3]$photo_id-V.$photo_version[1]".emit_date_html($photo_version[2], 'date')."$photo_version[3]
    \n"; -print " 
    \n"; +print "
    "; if ($photo_version[4] == 't') { - print "\"Back\"/\n"; + print $thm_elem['button.back']; } else { - print "\n"; - print "\"Cancel\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; } +print "
    "; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/photo.version.edit.2.php b/src/photo.version.edit.2.php index 66e52ab..4d35ad1 100644 --- a/src/photo.version.edit.2.php +++ b/src/photo.version.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; -include_once "include/import.php"; +; include_once "include/common.php"; include_once "include/site.php"; -include_once "include/mime.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); $version_id = pg_escape_string($_REQUEST['version']); @@ -39,118 +31,36 @@ $master = pg_escape_string($_REQUEST['master']); $comment = pg_escape_string($_REQUEST['comment']); $colorspace = pg_escape_string($_REQUEST['colorspace']); -$file_name = $_FILES['file_name']['name'][0]; -$file_size = $_FILES['file_name']['size'][0]; -$file_name_tmp = $_FILES['file_name']['tmp_name'][0]; - $photo_data = pg_fetch_row(pg_query($database, " select caption, users from photo where photo.identifier = '$photo_id'")); /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && ($po_user['id'] != $photo_data[1])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } -$im_options = get_im_options($database, $po_user['id']); +pg_query($database, "begin"); -$preferences = pg_fetch_row(pg_query($database, " - select quota_size - from users, preferences - where preferences.identifier=users.preferences - and users.identifier=$po_user[id]")); - -if ($file_name_tmp) { - $original_file_type = strtolower(substr($file_name, strrpos($file_name, ".") + 1)); - $file_type = $mime_type[$original_file_type]['out']; - $multi_page_parameter = $mime_type[$original_file_type]['page']; - $mime_type_name = $mime_type[$original_file_type]['name']; - $decoder = $mime_type[$original_file_type]['decoder']; - - if (!$file_type) { - $file_type = "jpeg"; - } - - $result = pg_fetch_row(pg_query($database, " - select small_image_path, medium_image_path, large_image_path - from photo_version - where photo=$photo_id - and identifier=$version_id")); - - // remove old files from the repository - since the file extensions might be different, - error_reporting(0); - unlink($image_repository_path . "/" . $result[0]); - unlink($image_repository_path . "/" . $result[1]); - unlink($image_repository_path . "/" . $result[2]); - error_reporting(1); - - // generate new file names, with the apropriate file type - $thumb_name = strtolower(substr($result[0], 0, strrpos($result[0], "."))) . "." . $file_type; - $image_name = strtolower(substr($result[1], 0, strrpos($result[1], "."))) . "." . $file_type; - $hires_name = strtolower(substr($result[2], 0, strrpos($result[2], "."))) . "." . $file_type; - - site_header($page_width, "Edit Photo Version"); - $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); - site_navigator_status("Users : My Folders and Albums : $folder_data[1] : $photo_data[0] : Replacing photo version and saving changes", ""); - print " 
    \n"; - print "
    " ; - print "Uploading the $mime_type_name file $file_name as a new version of $photo_data[0]
    "; - flush(); - print "
      "; - - if ($preferences[0] > 0) { - $used_storage_space = count_storage_space_by_user($database, $po_user['id']); - $used_storage_space += filesize($file_name_tmp); - if ($preferences[0] <= $used_storage_space) { - print "Your account have reached the storage space quota of $preferences[0] Mb, imposed by your PO adminstrator.
      "; - print "No further uploads are possible."; - print "

    "; - site_footer($database); - site_epilog($database); - exit(); - } - } - - $image_data['file'][0]['name'] = $file_name; - $image_data['file'][0]['name_tmp'] = $file_name_tmp; - $image_data['file'][0]['type'] = $original_file_type; - $image_data['file'][0]['remark'] = ""; - $image_data['file'][0]['master'] = "f"; - - $my_im_composite_options = get_im_composite_options($database, $po_user['id']); - $dcraw_options = get_dcraw_options($database, $po_user['id']); - - if (file_upload($image_data, 0, $im_options, $my_im_composite_options, $dcraw_options, $hires_name, $image_name, $thumb_name, $multi_page_parameter, $decoder, $database)) { - $result = pg_fetch_row(pg_query($database, " - update photo_version - set small_image_path = '$thumb_name', - medium_image_path = '$image_name', - large_image_path = '$hires_name', - original_image_name = '$file_name', - colorspace = '$colorspace' - where photo=$photo_id - and identifier=$version_id")); - } - - print ""; - print " 
    \n"; - print "Upload finished, changes saved."; - print " 
    \n"; - print "

    " ; - - print " 
    \n"; -} - -if ($master=='t') { +$result = TRUE; +if ($master == 't') { $result = pg_query($database, "update photo_version set master='f' where photo=$photo_id"); } -$result = pg_query($database, "update photo_version set master='$master', comment = '$comment' where identifier=$version_id"); -site_epilog($database); -if (!$file_name_tmp) { - header("location: photo.php?photo=$photo_id&detail_info=5"); +if ($result) { + $result = pg_query($database, "update photo_version set master='$master', comment = '$comment' where identifier=$version_id"); } +if ($result) { + pg_query($database, "commit"); + } else { + site_push_error($strings['errors']['db_insert_failed']); + pg_query($database, "rollback"); + } + +site_epilog($database); +header("Location: photo.php?photo=$photo_id&ver=$version_id&detail_info=5"); ?> diff --git a/src/photo.version.edit.php b/src/photo.version.edit.php index 148a1a9..462ed4b 100644 --- a/src/photo.version.edit.php +++ b/src/photo.version.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,112 +17,88 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $photo_id = pg_escape_string($_REQUEST['photo']); $version_id = pg_escape_string($_REQUEST['version']); $photo_data = pg_fetch_row(pg_query($database, " - select caption, medium_image_path, large_image_path, users, hide_original, title + select caption, get_image_path(photo_version.identifier, 2) as preview_path, users, title from photo, photo_version where photo.identifier = photo_version.photo and photo_version.identifier = '$version_id' and photo.identifier = '$photo_id'")); /* Enforce ownership */ -if (($po_user['type'] != $user_type['administrator']) && - ($po_user['id'] != $photo_data[3])) { +if (($po_user['type'] != PO_USER_TYPE_ADMIN) && + ($po_user['id'] != $photo_data[2])) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } - -/* this will enable administrators to empty anybody's trash */ -if ($po_user['type'] == $user_type['administrator']) { - $user_id = $photo_data[3]; - } else { - $user_id = $po_user['id']; -} - $photo_version = pg_fetch_row(pg_query($database, "select identifier, key, date_of_creation, comment, master, colorspace from photo_version where identifier='$version_id'")); $folder_data = pg_fetch_row(pg_query($database, "select folder.identifier, folder.caption from photo, folder where photo.folder = folder.identifier and photo.identifier='$photo_id'")); -$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$user_id")); +$user_data = pg_fetch_row(pg_query($database, "select identifier, last_name, first_name from users where identifier=$photo_data[2]")); - -site_header($page_width, "Edit Photo Version"); -if ($po_user['id'] == $user_id) { - site_navigator(5); - $user_display_string = "My Folders and Albums"; -} -else { - site_navigator(1); - $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[2]); -} +site_header(sprintf($strings['profile']['edit'], $strings['generic']['version'])); +$user_display_string = user_disp_string($photo_data[2], $po_user['id'], + "", ""); +site_navigator(5); $path_to_folder = get_path_to_folder($database, $folder_data[0]); -$title = get_photo_title($photo_data[0], $photo_data[5]); -site_navigator_status("Users : $user_display_string$path_to_folder : $folder_data[1] : $title : Edit version", ""); +$title = get_photo_title($photo_data[0], $photo_data[3]); +site_navigator_status("$user_display_string $path_to_folder : $folder_data[1] : $title : ".sprintf($strings['profile']['edit'], $strings['generic']['version']), ""); -print " 
    \n"; print "
    \n"; -display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version_id", "", $image_repository_path . "/" . $photo_data[1]); +display_shaded_photo("image.display.php?image=$photo_id&size=2&ver=$version_id", "", $image_repository_path . "/" . $photo_data[1]); print "
    \n"; -print " 
    \n"; print "
    \n"; print "\n"; print "\n"; print "\n"; -print "\n"; +print "
    \n"; print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['generic']['version'], "width=\"10%\""); +print emit_th($strings['generic']['imported'], "width=\"20%\""); +print emit_th($strings['generic']['master'], "width=\"5%\""); +print emit_th($strings['generic']['remark'], "width=\"35%\""); +print emit_th($strings['generic']['colorspace'], "width=\"10%\""); print "\n"; print "\n"; -print ""; -print ""; -print ""; +print ""; +print ""; -print ""; -print ""; -print ""; -print "\n"; print "\n"; print "
    VersionDateMasterRemarkColorspaceReplace this image with:
    $photo_id-V.$photo_version[1]".generate_date_html($photo_version[2], 'date', 1).""; +print "$photo_id-V.$photo_version[1]".emit_date_html($photo_version[2], 'date').""; if ($photo_version[4]=='t') { - print "Yes"; + print $strings['generic']['yes']; print "\n"; } else { display_yes_no_combo("master", $photo_version[4]); } print ""; +print ""; print "\n"; print ""; +print ""; display_colorspace_combo("colorspace", $photo_version[5]); print ""; -print "
    \n"; -print " 
    \n"; -print "\n"; -print "\"Cancel\"/\n"; +print "
    "; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; +print "
    "; print "
    \n"; -print " 
    \n"; site_footer($database); site_epilog($database); diff --git a/src/po.dtd b/src/po.dtd index d86fc9f..c199151 100644 --- a/src/po.dtd +++ b/src/po.dtd @@ -2,7 +2,9 @@ Photo Organizer's XML Photo Description DTD - Copyright (C) 2002, 2003, 2004, 2005, 2006 Balint Kis (balint@k-i-s.net) + Copyright (C) 2002-2006 Balint Kis (balint@k-i-s.net) + Copyright (C) 2005-2006 Solomon Peachy (pizza@shaftnet.org) + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,6 +40,7 @@ + + + + + + + diff --git a/src/print.2.php b/src/print.2.php index f18429e..2fc6c04 100644 --- a/src/print.2.php +++ b/src/print.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,27 +17,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; include_once "include/common.php"; +include_once "include/site.php"; include_once "include/print.ps.php"; include_once "include/orderby.php"; -include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $mm2dpi = 72/25.4; -$source_photo_id = pg_escape_string($_REQUEST['source_photo']); -$source_folder_id = pg_escape_string($_REQUEST['source_folder']); -$source_album_id = pg_escape_string($_REQUEST['source_album']); $print_type = $_REQUEST['print_type']; $output_format = $_REQUEST['output_format']; $left_margin = $_REQUEST['left_margin']*$mm2dpi; @@ -48,7 +37,6 @@ $x_space = $_REQUEST['x_space']*$mm2dpi; $y_space = $_REQUEST['y_space']*$mm2dpi; $orientation = $_REQUEST['orientation']; $columns = $_REQUEST['columns']; -$rows = $_REQUEST['rows']; $x_paper = $_REQUEST['x_paper']; $y_paper = $_REQUEST['y_paper']; $paper_name = $_REQUEST['paper_name']; @@ -62,8 +50,7 @@ if ($orientation == "1") { $temp = $x_paper; $x_paper = $y_paper; $y_paper = $temp; -} -else { +} else { $orientation = 0; } @@ -74,33 +61,25 @@ if ($y_size == 0) { $y_size = $x_size/4; } -if ($source_photo_id != "") { - $photo_data_single = pg_fetch_row(pg_query($database, "select photo.identifier, folder, caption, small_image_path, title from photo, photo_version where photo.identifier=photo_version.photo and photo.identifier='$source_photo_id'")); - $photo_data_single[2] = makeZanza($photo_data_single[4] ? $photo_data_single[4] : $photo_data_single[2], "No Title"); - $folder_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier=$photo_data_single[1]")); - $folder_name[0] = makeZanza($folder_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $folder_name[0] : $photo_data_single[2] : Click on the link below to retrieve the document."; -} elseif ($source_album_id != "") { - $album_name = pg_fetch_row(pg_query($database, "select caption from album where identifier='$source_album_id'")); - $album_name[0] = makeZanza($album_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $album_name[0] : Click on the link below to retrieve the document."; -} elseif ($source_folder_id != "") { - $folder_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$source_folder_id'")); - $folder_name[0] = makeZanza($folder_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $folder_name[0] : Click on the link below to retrieve the document."; -} - -$photos_in_spooler = pg_query($database, " - select photo.identifier, folder, title, small_image_path, medium_image_path, date_of_exposure, photo_version.date_of_creation, - 11 - (select avg(rating.value) from rating where rating.photo = photo.identifier) as rating, views, caption, author, - view_location.place, view_location.country, view_location.city, view_location.state - from photo_spooler, photo, photo_version, view_location +$query = " + select photo.identifier, title, get_image_path(photo_version.identifier, 1) as thumb_path, get_image_path(photo_version.identifier, 2) as preview_path, original_image_name, date_of_exposure, photo_version.date_of_creation, caption, author, + 11 - (select avg(rating.value) from rating where rating.photo = photo.identifier) as rating, views, + view_location.place, view_location.country, view_location.city, view_location.state, + photo.users, can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}') as ok + from album_content, photo, photo_version, view_location where photo.identifier = photo_version.photo - and photo.identifier = photo_spooler.photo - and photo_version.master = 't' + and photo_version.identifier = album_content.version + and album_content.album = $po_user[spool_album] and view_location.identifier = photo.location - and photo_spooler.users = $po_user[id] - order by $query_order_by_string"); + group by photo.identifier, folder, title, photo.users, + thumb_path, preview_path, original_image_name, + date_of_exposure, photo_version.date_of_creation, + caption, author, rating, views, place, country, city, state + order by $query_order_by_string"; + +//print "
    $query
    "; + +$photos_in_spooler = pg_query($database, $query); $print_id = pg_fetch_row(pg_query($database, "select nextval('print_id_sequence')")); $file_name = $tmp_volume_path . "/po.slide." . $print_id[0]; @@ -109,7 +88,7 @@ $file = fopen($file_name . ".ps", "w"); $tmp_ps_title = 'Print Job #' . $print_id[0]; $tmp_ps_for_username = $po_user['last_name'] . ", " . $po_user['first_name']; -$php_version = version(); +$php_version = $po_version; $sql_version = pg_fetch_row(pg_query($database, "select major, minor, variation from version")); $tmp_ps_creator = "Photo Organizer, Version: PHP.$php_version-SQL.$sql_version[0].$sql_version[1].$sql_version[2], Balint Kis, balint@k-i-s.net"; $tmp_ps_document_version = 1.0; @@ -119,10 +98,9 @@ ps_Dictionary($file); if ($print_type == "brochure") { $border = 0; $leading_blanks = 0; -} -else { +} else { $border = 5; - $leading_blanks = $_REQUEST['leading_blanks']; + $leading_blanks = isset($_REQUEST['leading_blanks']) ? $_REQUEST['leading_blanks'] : 0 ; } $print_barcode = ($_REQUEST['display_barcode'] == "on"); @@ -143,19 +121,26 @@ if ($leading_blanks != 0) { } for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { - $photo_single = pg_fetch_row($photos_in_spooler, $photos); - $photo_dupes = pg_query($database, "select identifier, remark, storage_location, storage_index, key from photo_dupe where photo='$photo_single[0]'"); + $photo_single = pg_fetch_assoc($photos_in_spooler, $photos); + + if (($photo_single['users'] != $po_user['id']) && + !($po_user['type'] == PO_USER_TYPE_ADMIN) && + ($photo_data['ok'] != 't')) { + continue; + } + + $photo_dupes = pg_query($database, "select identifier, remark, storage_location, storage_index, key from photo_dupe where photo='$photo_single[identifier]'"); $number_of_dupes = pg_num_rows($photo_dupes); for ($dupes = 0; $dupes < $number_of_dupes; $dupes++) { /* check image name, if it's the null photo disable printing for this image */ $print_this_image = FALSE; if ($print_image) - $print_this_image = (strpos($photo_single[3], "null.photo") == FALSE); + $print_this_image = (strpos($photo_single['thumb_path'], "null.photo") == FALSE); $photo_dupe_single = pg_fetch_row($photo_dupes, $dupes); - $photo_id = $photo_single[0]; + $photo_id = $photo_single['identifier']; $dupe_id = $photo_dupe_single[4]; if (($number_of_dupes > 1) && ($_REQUEST[pd.$photo_dupe_single[0]] == "on")) { @@ -180,27 +165,33 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { $print_frameinfo = FALSE; if ($_REQUEST['display_title'] == "on") { - $frame_data['title'] = $photo_single[2]; + $frame_data['title'] = $photo_single['title']; $print_frameinfo = TRUE; } if ($_REQUEST['display_caption'] == "on") { - $frame_data['caption'] = $photo_single[9]; + $frame_data['caption'] = $photo_single['caption']; $print_frameinfo = TRUE; } - if ($_REQUEST['display_location'] == "on") { - if ($photo_single[11] != "" && ($photo_single[12] != "" || $photo_single[13] != "" || $photo_single[14] != "")) { $photo_single[11] .= ","; } - if ($photo_single[12] != "" && ($photo_single[13] != "" || $photo_single[14] != "")) { $photo_single[12] .= ","; } - if ($photo_single[13] != "" && ($photo_single[14] != "")) { $photo_single[13] .= ","; } - $frame_data['location'] = "$photo_single[11] $photo_single[12] $photo_single[13] $photo_single[14]"; + if ($photo_single['place'] != "" && ($photo_single['city'] != "" || $photo_single['state'] != "" || $photo_single['country'] != "")) { $photo_single['place'] .= ","; } + if ($photo_single['city'] != "" && ($photo_single['state'] != "" || $photo_single['country'] != "")) { $photo_single['city'] .= ","; } + if ($photo_single['state'] != "" && ($photo_single['country'] != "")) { $photo_single['state'] .= ","; } + $photo_single['location'] = "$photo_single[place] $photo_single[city] $photo_single[state] $photo_single[country]"; + $frame_data['location'] = $photo_single['location']; $print_frameinfo = TRUE; } if ($_REQUEST['display_copyright'] == "on") { - $today = getdate(time()); - $year = $today["year"]; - $frame_data['copyright'] = $year . ", ". $photo_single[10]; + if ($photo_single['date_of_exposure'] != "") { + $stamp = getdate(strtotime($photo_single['date_of_exposure'])); + } elseif ($photo_single['date_of_creation'] != "") { + $stamp = getdate(strtotime($photo_single['date_of_creation'])); + } else { + $stamp = getdate(now()); + } + $year = $stamp["year"]; + $frame_data['copyright'] = $year . ", ". $photo_single['author']; $print_frameinfo = TRUE; } @@ -263,9 +254,9 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { if ($print_this_image) { if ($x_size > $thumb_max_size) - $image = 4; + $image = 'preview_path'; else - $image = 3; + $image = 'thumb_path'; $image_file_name = $image_repository_path . "/" . $photo_single[$image]; $simg = ps_ScaleImage($image_file_name, $x_pos, $y_pos, $x_size, $x_size, $border); @@ -296,9 +287,9 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { if ($print_this_image) { if ($columns < 4) - $image = 4; + $image = 'preview_path'; else - $image = 3; + $image = 'thumb_path'; $image_file_name = $image_repository_path . "/" . $photo_single[$image]; $simg = ps_ScaleImage($image_file_name, $x_pos, $y_pos, $x_size, $x_size, $border); @@ -313,9 +304,10 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { if ($print_barcode) { $barcode_id = str_pad($photo_id, 6, "0", STR_PAD_LEFT) . "-" . str_pad($dupe_id, 2, "0", STR_PAD_LEFT) . " "; - if ($photo_dupe_single[2] == "") + if (($photo_dupe_single[2] == "") || + ($photo_dupe_single[2] == "null")) { $storage_location = ""; - else { + } else { if ($photo_dupe_single[3] == "") $storage_location = $photo_dupe_single[2]; else @@ -352,6 +344,7 @@ for ($photos = 0; $photos < pg_num_rows($photos_in_spooler); $photos++) { ps_Footer($file); fclose($file); + site_epilog($database); if ($output_format == "pdf") { diff --git a/src/print.php b/src/print.php index 7ade3d6..7b5728c 100644 --- a/src/print.php +++ b/src/print.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,56 +17,25 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; +include_once "include/site.php"; include_once "include/print.ps.php"; include_once "include/orderby.php"; -include_once "include/site.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$source_photo_id = pg_escape_string($_REQUEST['source_photo']); -$source_folder_id = pg_escape_string($_REQUEST['source_folder']); -$source_album_id = pg_escape_string($_REQUEST['source_album']); $print_type = $_REQUEST['print_type']; -if ($source_photo_id != "") { - $photo_data_single = pg_fetch_row(pg_query($database, "select identifier, folder, caption, title from photo where identifier='$source_photo_id'")); - $photo_data_single[2] = makeZanza($photo_data_single[3] ? $photo_data_single[3] : $photo_data_single[2], "No Title"); - $container_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier=$photo_data_single[1]")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : $photo_data_single[2] : Preparing to print this picture ..."; - $print_message = "This photo has dupes, "; -} elseif ($source_album_id != "") { - $container_name = pg_fetch_row(pg_query($database, "select caption from album where identifier='$source_album_id'")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : Preparing to print this album ..."; - $print_message = "Some photos in this album have dupes, "; -} elseif ($source_folder_id != "") { - $container_name = pg_fetch_row(pg_query($database, "select caption from folder where identifier='$source_folder_id'")); - $container_name[0] = makeZanza($container_name[0], "No Caption"); - $navigator_status_message = "Users : My folders and albums : $container_name[0] : Preparing to print this folder ..."; - $print_message = "Some photos in this folder have dupes, "; -} +$photos_in_spooler = pg_query($database, "select photo.identifier, photo.caption, album_content.version from album_content, photo where photo.identifier=album_content.photo and album_content.album = $po_user[spool_album] group by photo.identifier, photo.folder, photo.caption, album_content.version"); -$photos_in_spooler = pg_query($database, "select photo.identifier, photo.folder, photo.caption from photo_spooler, photo where photo.identifier=photo_spooler.photo and photo_spooler.users=$po_user[id]"); -$my_printer_defaults = pg_fetch_row(pg_query($database, "select print_out, paper, label from preferences where preferences.identifier=$po_user[prefs]")); +$num_photos = pg_num_rows($photos_in_spooler); -site_header($page_width, "Print"); +site_header($strings['generic']['print']); site_navigator(5); -site_navigator_status($navigator_status_message, ""); +site_navigator_status("", $strings['spool']['photos_in'] ." : $num_photos"); -print " 
    \n"; if ($print_type == "label") { $all_labels = pg_query($database, " select label.identifier, @@ -75,15 +44,13 @@ if ($print_type == "label") { from label, paper where label.paper=paper.identifier"); - $label_id = $_REQUEST['label']; - - if ($label_id == "") - $label_id = $my_printer_defaults[2]; + if (isset($_REQUEST['label'])) + $po_options['label'] = $_REQUEST['label']; $current_label = pg_fetch_row(pg_query($database, " select space_x, space_y, label.size_x, label.size_y, offset_x, offset_y, columns, rows, paper, paper.size_x, paper.size_y from label, paper - where label.identifier=$label_id + where label.identifier=$po_options[label] and label.paper=paper.identifier")); $x_space = $current_label[0]; $y_space = $current_label[1]; @@ -100,52 +67,27 @@ if ($print_type == "label") { $paper_width = $current_label[ 9]; $paper_height = $current_label[10]; - print "
    \n"; - print "\n"; - print "\n"; - - print "\n"; + print "
    \n"; + print "\n"; - print "Label type:\n"; - if ($source_photo_id != "") { - $argument = "source_photo"; $arg_value = "$source_photo_id"; - } elseif ($source_album_id != "") { - $argument = "source_album"; $arg_value = "$source_album_id"; - } elseif ($source_folder_id != "") { - $argument = "source_folder"; $arg_value = "$source_folder_id"; - } + print $strings['generic']['label'] ." :\n"; - print "\n"; for ($i=0; $i < pg_num_rows($all_labels); $i++) { $labels = pg_fetch_row($all_labels, $i); - if ($labels[0] == $label_id) - print "
    \n"; - print " 
    \n"; - print "\n"; - print "
     \n"; - print "
    \n"; print "\n"; -} -else { +} else { $all_papers = pg_query($database, "select identifier, name, size_x, size_y from paper"); - $paper_id = $_REQUEST['paper']; - - if ($paper_id == "") - $paper_id = $my_printer_defaults[1]; + if (isset($_REQUEST['paper'])) + $po_options['paper'] = $_REQUEST['paper']; $left_margin = 20; $top_margin = 20; @@ -157,65 +99,38 @@ else { $x_size = 0; $y_size = 0; - $current_paper = pg_fetch_row(pg_query($database, "select name, size_x, size_y from paper where identifier=$paper_id")); + $current_paper = pg_fetch_row(pg_query($database, "select name, size_x, size_y from paper where identifier=$po_options[paper]")); $paper_name = $current_paper[0]; $paper_width = $current_paper[1]; $paper_height = $current_paper[2]; - print "\n"; - print "
    \n"; - print "
    \n"; display_label_layout($left_margin, $top_margin, $x_size, $y_size, $x_space, $y_space, $columns, $rows, TRUE); print "
    \n"; - print "\n"; - print "\n"; - - print "\n"; } -print "\n"; +print "

    ".$strings['label']['details']."

    "; -print ""; -print "
    \n"; - print "Paper Size:  \n"; - if ($source_photo_id != "") { - $argument = "source_photo"; $arg_value = "$source_photo_id"; - } elseif ($source_album_id != "") { - $argument = "source_album"; $arg_value = "$source_album_id"; - } elseif ($source_folder_id != "") { - $argument = "source_folder"; $arg_value = "$source_folder_id"; - } - print "\n"; for ($i=0; $i < pg_num_rows($all_papers); $i++) { $papers = pg_fetch_row($all_papers, $i); - if ($papers[0] == $paper_id) - print "
    \n"; - print " 
    \n"; - print "\n"; - print "
     \n"; - print "
    \n"; - - print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "
    Margins   Columns     Spacing     Orientation
    "; - - print "
    "; - print "
    \n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; print "\n"; @@ -223,128 +138,92 @@ else { print "\n"; print "\n"; print "\n"; - print "\n"; + print "\n"; print "\n"; - print "\n"; + print "\n"; print "\n"; print "\n\n"; - print ""; + print ""; print "\n"; print "\n"; - print ""; + print ""; print "\n"; print "\n"; - print ""; + print ""; print "\n"; - print ""; + print ""; print "\n"; - print ""; + print ""; print "\n"; - print "\n\n"; + print "\n\n"; print "\n"; print "
    ".$strings['label']['margin']."   ".$strings['label']['columns']."   ".$strings['label']['spacing']."    ".$strings['label']['orientation']."
    "; + print ""; print "\n"; print "\nPortrait".$strings['label']['portrait'] ." Landscape".$strings['label']['landscape']."
    \n\n\n\n\n\"\"/\n\n\n\n\"\"\n\n\"\"\n\"\"\"\"
    \n\n
    \n
    \n"; - - print "
    \n"; -print " 
    \n"; -print "\n"; -print "
     \n"; -print "
    \n"; +print "\n"; -print "\n"; -print "\n"; - -print "\n"; - -print "
    \n"; -print "Please select which of the following details you want to appear on the printout.

    "; - -print "
    \n"; if ($print_type == "brochure") { - print " Image
    \n"; + print "".$strings['generic']['image']."
    \n"; } -print " Barcode
    \n"; -print " Title
    \n"; -print " Caption
    \n"; -print " Location
    \n"; -print " Copyright
    \n"; +print "".$strings['generic']['barcode']."
    \n"; +print "".$strings['generic']['title']."
    \n"; +print "".$strings['generic']['caption']."
    \n"; +print "".$strings['generic']['location']."
    \n"; +print "".$strings['generic']['copyright']."
    \n"; print "
    "; -print " Camera
    \n"; -print " Camera program
    \n"; -print " Camera metering
    \n"; -print " Shutter speed
    \n"; -print " Aperture
    \n"; -print " Exposure compensation
    \n"; +print "".$strings['generic']['camera']."
    \n"; +print "".$strings['generic']['camera_program']."
    \n"; +print "".$strings['generic']['camera_metering']."
    \n"; +print "".$strings['generic']['shutter_speed']."
    \n"; +print "".$strings['generic']['aperture']."
    \n"; +print "".$strings['generic']['exp_comp']."
    \n"; print "
    "; -print " Focal Length
    \n"; -print " Flash mode
    \n"; -print " Flash Compensation
    \n"; -print " Film ISO
    \n"; -print " Film ISO Override
    \n"; +print "".$strings['generic']['focal_length']."
    \n"; +print "".$strings['generic']['flash_mode']."
    \n"; +print "".$strings['generic']['flash_comp']."
    \n"; +print "".$strings['profile']['iso']."
    \n"; +print "".$strings['generic']['iso_override']."
    \n"; print "
    \n"; -print "

    \n"; -print " 
    \n"; -print "\n"; -print "
     \n"; -print "
    \n"; - -print " 
    \n"; -print "Output format: \n"; -display_print_format_combo("output_format", $my_printer_defaults[0]); -print "    Order by: \n"; +print "

    ".$strings['label']['output'].":\n"; +display_print_format_combo("output_format", $po_options['print_out']); +print "    ".$strings['generic']['order_by'].": \n"; display_order_by_combo(5); -print "

    \n"; -print " 
    \n"; -print "\n"; -print "
     \n"; -print "
    \n"; - - -if ($source_photo_id != "") { - print "\n"; -} elseif ($source_album_id != "") { - print "\n"; -} elseif ($source_folder_id != "") { - print "\n"; -} +print "

    "; $dupes_found = 0; for ($photos=0; $photos < pg_num_rows($photos_in_spooler); $photos++) { - $photo_identifier = pg_fetch_row($photos_in_spooler, $photos); - $photo_dupes = pg_query($database, "select photo_dupe.identifier, photo_dupe.key, date_of_creation, storage_location, storage_index, remark from photo_dupe where photo=$photo_identifier[0] order by date_of_creation"); + $photo_identifier = pg_fetch_assoc($photos_in_spooler, $photos); + $photo_dupes = pg_query($database, "select photo_dupe.identifier, photo_dupe.key, date_of_creation, storage_location, storage_index, remark from photo_dupe where photo=$photo_identifier[identifier] order by date_of_creation"); if (pg_num_rows($photo_dupes) > 1) { if ($dupes_found == 0) { $dupes_found = 1; - print "\n"; + print "
    \n"; print ""; print "
    \n"; - print $print_message . "Please select which dupe would you like to print!
     "; + print $print_message . $strings['label']['dupes']."
     "; print "
    \n"; - print "\n"; + print "
    \n"; } - print ""; for ($dupes=0; $dupes < pg_num_rows($photo_dupes); $dupes++) { $photo_dupe_single = pg_fetch_row($photo_dupes, $dupes); - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; + print ""; print "\n"; } } @@ -354,26 +233,18 @@ if ($dupes_found == 1) { print "
    \n"; - print "$container_name[0] : "; - print "$photo_identifier[2] "; + print "
    \n"; + print "$photo_identifier[caption] "; print "
    "; - print ""; + print "
    "; + print ""; print "$photo_identifier[0]-$photo_dupe_single[1]".generate_date_html($photo_dupe_single[2], 'date', 1)."$photo_dupe_single[5]$photo_dupe_single[3]:$photo_dupe_single[4]$photo_dupe_single[6]$photo_identifier[identifier]-$photo_dupe_single[1]".emit_date_html($photo_dupe_single[2], 'date')."$photo_dupe_single[5]$photo_dupe_single[3]:$photo_dupe_single[4]$photo_dupe_single[6]
    \n"; } -print " 
    \n"; -print "
    \n"; -print "\n"; -if ($source_photo_id != "") { - print "\"Cancel\"/\n"; -} elseif ($source_album_id != "") { - print "\"Cancel\"/\n"; -} elseif ($source_folder_id != "") { - print "\"Cancel\"/\n"; -} -print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; + +print "
    "; +print $thm_elem['button.print']; +print $thm_elem['button.cancel']; +print "
    "; + print "\n"; - -print " 
    \n"; - site_footer($database); site_epilog($database); ?> diff --git a/src/profile.add.2.php b/src/profile.add.2.php index 4d69bf8..82727fe 100644 --- a/src/profile.add.2.php +++ b/src/profile.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,17 +17,18 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/calendar.php"; function add_item($database, $user_id, $type, $type_id, $manufacturer_id, $model, $variation, $serial_number, $purchase_timestamp, $purchased_new, $access_rights) { + global $strings; $date_of_purchase = check_date_validity($purchase_timestamp); $type = pg_escape_string($type); @@ -42,33 +43,29 @@ function add_item($database, $user_id, $type, $purchased_new = pg_escape_string($purchased_new); $access_rights = pg_escape_string($access_rights); + pg_query($database, "begin"); + $result = TRUE; if ($type_id=='custom') { $new_type_id = pg_fetch_row(pg_query($database, "select nextval('".$type."_type_id_sequence')")); $type_id = $new_type_id[0]; $result = pg_query($database, "insert into ".$type."_type (identifier, manufacturer, model, variation, last_modified_date, last_modifying_users) values ($type_id, $manufacturer_id, '$model', '$variation', now(), $user_id)"); - if (!$result) { - print "Failed to create new $type type"; - print "insert into $type_type (identifier, manufacturer, model, variation, last_modified_date, last_modifying_users) - values ($type_id, $manufacturer_id, '$model', '$variation', now(), $user_id)"; - return; - } } - $result = pg_query($database, "insert into $type (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights) + if ($result) { + $result = pg_query($database, "insert into $type (identifier, type, users, serial_number, date_of_purchase, purchased_new, access_rights) values (nextval('".$type."_id_sequence'), '$type_id', '$user_id', '$serial_number', $date_of_purchase, '$purchased_new', '$access_rights')"); - if (!$result) { - print "Failed to create new $type"; + } + + if ($result) { + pg_query($database, "commit"); + } else { + pg_query($database, "rollback"); + site_push_error($strings['errors']['db_insert_failed']); } } -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = $_REQUEST['type']; @@ -83,5 +80,5 @@ add_item($database, $po_user['id'], $type, $_REQUEST['access_rights']); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data[$type]['idx']); +header("Location: my.profile.php?selector=".$profile_data[$type]['idx']); ?> diff --git a/src/profile.add.php b/src/profile.add.php index 14ece19..f25ec67 100644 --- a/src/profile.add.php +++ b/src/profile.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,162 +17,119 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = pg_escape_string($_REQUEST['type']); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); $manufacturer = pg_query($database, "select identifier, name from manufacturer order by name"); switch ($manufacturer_filter) { case 'All': case '': - $item_type = pg_query($database, "select identifier, name, model, variation, url from view_$type_type"); + $item_type = pg_query($database, "select identifier, name, model, variation, url from view_".$type."_type"); break; default: $item_type = pg_query($database, "select identifier, name, model, variation, url from view_".$type."_type where name='$manufacturer_filter'"); } -site_header($page_width, "Add $type"); +site_header(sprintf($strings['profile']['add'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Add new $type", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['add'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data[$type]['idx'], $profile_data, "100%"); -print " 
    "; if (pg_num_rows($manufacturer) == 0) { - print "\n"; - print "\n"; - print "
    \n"; - print "You must add manufacturers, before adding a $type."; - print "
     

    \n"; - print "\"Add\n"; - print "

    \n"; + print emit_manuf_add_needed($type); display_navigator_box_bottom("100%"); - print " 
    "; site_footer($database); site_epilog($database); exit; } -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; - print "\n"; +print "
    \n"; - -print "\n\n"; -print "\n"; -print "\n
    $type Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; - -print "
    ManufacturerModelVariation
    \n"; + +emit_profile_manuf_combo("profile.add.php?type=$type", $type, 3, $manufacturer, $manufacturer_filter); + +print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"35%\""); +print emit_th($strings['profile']['model'], "width=\"45%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); +print "\n"; + print "\n"; $num = pg_num_rows($item_type); if ($num > 0) { for ($i=0; $i < $num; $i++) { $r = pg_fetch_row($item_type, $i); print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n"; } -} -else -print "\n"; +} else + print "\n"; + print "
    $r[1]$r[2]$r[3]$r[1]$r[2]$r[3]
    No $type types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; +print "
    New $type Type
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"35%\""); +print emit_th($strings['profile']['model'], "width=\"45%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    ".sprintf($strings['profile']['new_type'], $strings['generic'][$type])."
    ManufacturerModelVariation
    \n"; - -print " 
    \n"; -print "\n"; -print "\n"; - - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; - -print "\n"; -print "\n"; -print "\n"; +print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print "\n"; print "
    $type Specific Data
    Serial NumberPurchase DateNewAccess
    \n"; -display_date_input_form("purchase_timestamp", ""); +print ""; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, ""); print "\n"; display_yes_no_combo("purchased_new", "t"); print "\n"; display_access_combo("access_rights", "t", ""); print "
    \n"; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print "\n"; +print "\n"; + +print "\n"; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); +print "\n"; + +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    \n"; +print emit_date_input_form("purchase_timestamp", ""); +print "\n"; display_yes_no_combo("purchased_new", "t"); print "\n"; display_access_combo("access_rights", "t", ""); print "
    \n"; + +print $thm_elem['button.add']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "\n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/profile.del.2.php b/src/profile.del.2.php index bfc1f82..63d24f0 100644 --- a/src/profile.del.2.php +++ b/src/profile.del.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,23 +17,17 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = $_REQUEST['type']; profile_del_item($database, $type, $_REQUEST['item_id']); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data[$type]['idx']); +header("Location: my.profile.php?selector=".$profile_data[$type]['idx']); ?> diff --git a/src/profile.del.php b/src/profile.del.php index 54d6243..02267f5 100644 --- a/src/profile.del.php +++ b/src/profile.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,20 +17,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = pg_escape_string($_REQUEST['type']); $item_id = pg_escape_string($_REQUEST['item']); @@ -38,68 +31,61 @@ $item_id = pg_escape_string($_REQUEST['item']); $number_of_references = pg_fetch_row(pg_query($database, "select number_of_".$type."_references($item_id)")); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_ADMIN) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from $type where identifier=$item_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } -site_header($page_width, "Delete $type"); +site_header(sprintf($strings['profile']['delete'], $strings['generic'][$type])); site_navigator(6); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Profile : Delete $type", ""); - break; - case 1: - site_navigator_status("Users : My Profile : There is 1 reference to this $type. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Profile : There are $number_of_references[0] references to this $type. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['delete'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data[$type]['idx'], $profile_data, "100%"); -print " 
    "; print "
    "; -print "\n"; -print "\n"; -print "\n"; +print "
    Remove $type
    \n"; +print "\n"; +print emit_td($strings['generic']['delete']." ".$strings['generic'][$type], 'colspan="7"'); print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['profile']['manufacturer']); +print emit_th($strings['profile']['model']); +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); +print emit_th($strings['generic']['refs']); print ""; -$to_be_removed = pg_fetch_row(pg_query($database, "select name, model, variation, date_of_purchase, purchased_new, url, access_rights +$to_be_removed = pg_fetch_row(pg_query($database, "select name, model, variation, date_of_purchase, purchased_new, url, access_rights, serial_number from view_$type where identifier='$item_id'")); print ""; -print ""; -print ""; -print "\n"; -print "\n"; +print emit_td(emit_a($to_be_removed[5], $to_be_removed[0])); +print emit_td("$to_be_removed[1] $to_be_removed[2]"); +print emit_td($to_be_removed[7]); +print emit_td(emit_date_html($to_be_removed[3], 'short_date')); +print emit_td(emit_yes_no_text($to_be_removed[4])); +print emit_td($strings['generic'][$access[$to_be_removed[6]]]); +print emit_td($number_of_references[0]); print ""; print "
    ManufacturerModelPurchase DatePurchased NewAccess
    $to_be_removed[0]$to_be_removed[1] $to_be_removed[2]"; -print "".generate_date_html($to_be_removed[3], 'short_date', 1).""; display_yes_no_text($to_be_removed[4]); print "$to_be_removed[6]
    "; -print " 
    "; if ($number_of_references[0]==0) { - print "\n"; - print "\"Cancel\"/\n"; + print $thm_elem['button.confirm.delete']; + print $thm_elem['button.cancel']; } else { - print "\"Back\"/\n"; + print $thm_elem['button.back']; } + print "
    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/profile.edit.2.php b/src/profile.edit.2.php index 6dbb1fc..37128ed 100644 --- a/src/profile.edit.2.php +++ b/src/profile.edit.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,20 +17,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/calendar.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = $_REQUEST['type']; @@ -46,5 +40,5 @@ profile_update_item($database, $_REQUEST['item_id'], $_REQUEST['access_rights']); site_epilog($database); -header("location: my.profile.php?selector=".$profile_data[$type]['idx']); +header("Location: my.profile.php?selector=".$profile_data[$type]['idx']); ?> diff --git a/src/profile.edit.php b/src/profile.edit.php index 5613321..8bb7f7c 100644 --- a/src/profile.edit.php +++ b/src/profile.edit.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,23 +17,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $type = pg_escape_string($_REQUEST['type']); -$manufacturer_filter = pg_escape_string($_REQUEST['filter']); +$manufacturer_filter = pg_escape_string(isset($_REQUEST['filter']) ? $_REQUEST['filter'] : ""); $type_id = pg_escape_string($_REQUEST['item']); $current_value = pg_fetch_row(pg_query($database, "select name, model, variation, serial_number, @@ -42,9 +35,10 @@ $current_value = pg_fetch_row(pg_query($database, "select name, model, variation /* Ensure the user owns it !*/ if (($po_user['id'] != $current_value[7]) && - ($po_user['type'] < $user_type['administrator'])) { + ($po_user['type'] < PO_USER_TYPE_ADMIN)) { + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); site_epilog($database); - header("location: login.php"); exit(); } @@ -58,45 +52,25 @@ switch ($manufacturer_filter) { $item_type = pg_query($database, "select identifier, name, model, variation, url from view_".$type."_type"); break; default: - $item_type = pg_query($database, "select identifier, name, model, variation, url from view_".$type."_type where name=\"$manufacturer_filter\" or identifier=\"$type_current_value[0]\""); + $item_type = pg_query($database, "select identifier, name, model, variation, url from view_".$type."_type where name='$manufacturer_filter' or identifier='$type_current_value[0]'"); } -site_header($page_width, "Edit $type"); +site_header(sprintf($strings['profile']['edit'], $strings['generic'][$type])); site_navigator(6); -site_navigator_status("Users : My Profile : Edit $type", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.profile.php", $strings['generic']['my_profile'])." : ".sprintf($strings['profile']['edit'], $strings['generic'][$type]), ""); -print " 
    "; display_navigator_box_top($profile_data[$type]['idx'], $profile_data, "100%"); -print " 
    "; -print "\n"; -print ""; -print ""; -print ""; +print ""; +print "
    \n"; -print "\n\n"; -print "\n"; -print "\n
    $type Types\n"; -print "
    \n"; -print ""; -print "
    \n"; -print "
    \n"; -print "
    \n"; + +emit_profile_manuf_combo("profile.edit.php?type=$type&item=$type_id", $type, 3, $manufacturer, $manufacturer_filter); -print ""; print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"35%\""); +print emit_th($strings['profile']['model'], "width=\"45%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); print "\n"; $num = pg_num_rows($item_type); @@ -105,88 +79,74 @@ if ($num > 0) { $r = pg_fetch_row($item_type, $i); print ""; if ($type_current_value[0] == $r[0]) - print ""; + print ""; else - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; print ""; } -} -else -print ""; +} else + print "\n"; print "
    ManufacturerModelVariation
    $r[1]$r[2]$r[3]$r[1]$r[2]$r[3]
    No $type types found.
    ".sprintf($strings['profile']['none_found'], $strings['generic'][$type])." ".$strings['generic']['types'] ."
    \n"; -print " 
    \n"; -print "\n"; -print ""; -print ""; +print "
    Edit $type Type
    \n"; +print ""; +print "\n"; print ""; print ""; -print ""; -print ""; -print ""; -print ""; +print "\n"; +print emit_th($strings['profile']['manufacturer'], "width=\"35%\""); +print emit_th($strings['profile']['model'], "width=\"45%\""); +print emit_th($strings['profile']['variation'], "width=\"20%\""); print ""; print ""; -print ""; -print ""; -print ""; -print ""; print ""; print "
    ".sprintf($strings['profile']['edit_type'], $strings['generic'][$type])."
    ManufacturerModelVariation
    "; +print ""; print ""; print ""; -$num = pg_num_rows($manufacturer); -print ""; - +print ""; +print emit_manufacturer_combo('manufacturer_id', $manufacturer, $current_value[0]); print ""; +print ""; print ""; print ""; +print ""; print ""; print "
    \n"; -print " 
    \n"; -print "\n"; -print ""; +print "
    $type Specific Data
    \n"; +print "\n"; print ""; -print ""; -print ""; -print ""; -print ""; +print emit_th($strings['profile']['serial']); +print emit_th($strings['profile']['purchased']); +print emit_th($strings['profile']['new']); +print emit_th($strings['generic']['access']); print ""; $date_of_purchase= substr($current_value[4], 0, 10); print ""; -print ""; -print ""; +print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; print ""; print "
    ".sprintf($strings['profile']['specific_data'], $strings['generic'][$type])."
    Serial NumberPurchase DatePurchased NewAccess
    \n"; -display_date_input_form("purchase_timestamp", "$date_of_purchase"); +print "\n"; +print emit_date_input_form("purchase_timestamp", $date_of_purchase); print ""; display_yes_no_combo("purchased_new", $current_value[5]); print ""; display_access_combo("access_rights", $current_value[6], ""); print ""; display_yes_no_combo("purchased_new", $current_value[5]); print ""; display_access_combo("access_rights", $current_value[6], ""); print "
    "; -print " 
    "; -print "\n"; -print "\"Cancel\"/\n"; +print $thm_elem['button.save.changes']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print ""; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/register.php b/src/register.php index 4e56f06..03e3d0d 100644 --- a/src/register.php +++ b/src/register.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,119 +17,29 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/color.php"; -include_once "$theme/theme.php"; +include_once "include/mail.php"; + +$user_id = 0; +$registration_error = 0; + +$database = site_prolog(); $username = pg_escape_string($_REQUEST['username']); $password_1 = pg_escape_string($_REQUEST['password_1']); $password_2 = pg_escape_string($_REQUEST['password_2']); $first_name = pg_escape_string($_REQUEST['first_name']); $last_name = pg_escape_string($_REQUEST['last_name']); -$company = pg_escape_string($_REQUEST['company']); -$address1 = pg_escape_string($_REQUEST['address1']); -$address2 = pg_escape_string($_REQUEST['address2']); -$city = pg_escape_string($_REQUEST['city']); -$zipcode = pg_escape_string($_REQUEST['zipcode']); -$state = pg_escape_string($_REQUEST['state']); -$country = pg_escape_string($_REQUEST['country']); $email = pg_escape_string($_REQUEST['email']); -$url = pg_escape_string($_REQUEST['url']); -$phone = pg_escape_string($_REQUEST['phone']); +$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : $po_options['lang']; -$im_preview_quality = pg_escape_string($_REQUEST['im_preview_quality']); -$im_preview_color_space = pg_escape_string($_REQUEST['im_preview_color_space']); -$im_preview_gamma = pg_escape_string($_REQUEST['im_preview_gamma']); -$im_preview_sharpen_radius = pg_escape_string($_REQUEST['im_preview_sharpen_radius']); -$im_preview_sharpen_sigma = pg_escape_string($_REQUEST['im_preview_sharpen_sigma']); -$im_preview_sharpen_amount = pg_escape_string($_REQUEST['im_preview_sharpen_amount']); -$im_preview_sharpen_threshold = pg_escape_string($_REQUEST['im_preview_sharpen_threshold']); -$im_preview_border_width = pg_escape_string($_REQUEST['im_preview_border_width']); -$im_preview_border_height = pg_escape_string($_REQUEST['im_preview_border_height']); -$im_preview_border_color = pg_escape_string($_REQUEST['im_preview_border_color']); - -$im_thumb_quality = pg_escape_string($_REQUEST['im_thumb_quality']); -$im_thumb_color_space = pg_escape_string($_REQUEST['im_thumb_color_space']); -$im_thumb_gamma = pg_escape_string($_REQUEST['im_thumb_gamma']); -$im_thumb_sharpen_radius = pg_escape_string($_REQUEST['im_thumb_sharpen_radius']); -$im_thumb_sharpen_sigma = pg_escape_string($_REQUEST['im_thumb_sharpen_sigma']); -$im_thumb_sharpen_amount = pg_escape_string($_REQUEST['im_thumb_sharpen_amount']); -$im_thumb_sharpen_threshold = pg_escape_string($_REQUEST['im_thumb_sharpen_threshold']); -$im_thumb_border_width = pg_escape_string($_REQUEST['im_thumb_border_width']); -$im_thumb_border_height = pg_escape_string($_REQUEST['im_thumb_border_height']); -$im_thumb_border_color = pg_escape_string($_REQUEST['im_thumb_border_color']); - -$im_watermark_brightness = pg_escape_string($_REQUEST['im_watermark_brightness']); -$im_watermark_location = pg_escape_string($_REQUEST['im_watermark_location']); - -$dcraw_gamma = pg_escape_string($_REQUEST['dcraw_gamma']); -$dcraw_brightness = pg_escape_string($_REQUEST['dcraw_brightness']); -$dcraw_white_balanace = pg_escape_string($_REQUEST['dcraw_white_balanace']); -$dcraw_bitdepth = pg_escape_string($_REQUEST['dcraw_bitdepth']); - -if (!$im_preview_quality) $im_preview_quality = $default_im_preview_quality; -if (!$im_preview_color_space) $im_preview_color_space = $default_im_preview_color_space; -if (!$im_preview_gamma) $im_preview_gamma = $default_im_preview_gamma; -if (!$im_preview_sharpen_radius) $im_preview_sharpen_radius = $default_im_preview_sharpen_radius; -if (!$im_preview_sharpen_sigma) $im_preview_sharpen_sigma = $default_im_preview_sharpen_sigma; -if (!$im_preview_sharpen_amount) $im_preview_sharpen_amount = $default_im_preview_sharpen_amount; -if (!$im_preview_sharpen_threshold) $im_preview_sharpen_threshold = $default_im_preview_sharpen_threshold; -if (!$im_preview_border_width) $im_preview_border_width = $default_im_preview_border_width; -if (!$im_preview_border_height) $im_preview_border_height = $default_im_preview_border_height; -if (!$im_preview_border_color) $im_preview_border_color = $default_im_preview_border_color; - -if (!$im_thumb_quality) $im_thumb_quality = $default_im_thumb_quality; -if (!$im_thumb_color_space) $im_thumb_color_space = $default_im_thumb_color_space; -if (!$im_thumb_gamma) $im_thumb_gamma = $default_im_thumb_gamma; -if (!$im_thumb_sharpen_radius) $im_thumb_sharpen_radius = $default_im_thumb_sharpen_radius; -if (!$im_thumb_sharpen_sigma) $im_thumb_sharpen_sigma = $default_im_thumb_sharpen_sigma; -if (!$im_thumb_sharpen_amount) $im_thumb_sharpen_amount = $default_im_thumb_sharpen_amount; -if (!$im_thumb_sharpen_threshold) $im_thumb_sharpen_threshold = $default_im_thumb_sharpen_threshold; -if (!$im_thumb_border_width) $im_thumb_border_width = $default_im_thumb_border_width; -if (!$im_thumb_border_height) $im_thumb_border_height = $default_im_thumb_border_height; -if (!$im_thumb_border_color) $im_thumb_border_color = $default_im_thumb_border_color; - -if (!$im_watermark_brightness) $im_watermark_brightness = $default_im_watermark_brightness; -if (!$im_watermark_location) $im_watermark_location = $default_im_watermark_location; - -if (!$dcraw_gamma) $dcraw_gamma = $default_dcraw_gamma; -if (!$dcraw_brightness) $dcraw_brightness = $default_dcraw_brightness; -if (!$dcraw_white_balanace) $dcraw_white_balanace = $default_dcraw_white_balanace; -if (!$dcraw_bitdepth) $dcraw_bitdepth = $default_dcraw_bitdepth; - - -$start_hour = 8; -$end_hour = 20; -$start_day = 1; -$print_out = "pdf"; - -$num_of_columns = $default_num_of_columns; -$num_of_rows = $default_num_of_rows_in_slide_view; -$num_of_rows_l = $default_num_of_rows_in_list_view; -$folder_view = "slide"; - -$paper = $default_paper; -$label = $default_label; -$popup_delay = $default_popup_delay; -$popup_enable = $default_popup_enable; - -$my_user_id = 0; -$registration_error = 0; - -$database = site_prolog(); - -$system_preferences = pg_fetch_row(pg_query($database, " - select new_user_type, new_user_bulk_upload_enable, new_user_paper, - new_user_label, new_user_shop_enable, - new_user_quota_size, new_user_quota_count, new_user_shared - from system_preferences")); - -if (($system_preferences[0] == $user_type['disabled']) && - ($po_user['type'] != $user_type['administrator'])) { - header("location: login.php"); +if (($po_options_default['new_user_type'] == PO_USER_TYPE_DISABLED) && + ($po_user['type'] < PO_USER_TYPE_USER)) { + site_push_error($strings['errors']['registration_disabled']); + header("Location: login.php"); exit(); } @@ -144,178 +54,157 @@ if ($username!="") { } elseif ($email == "") { $registration_error = 4; } else { + + if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $user_type = $_REQUEST['new_user_type']; + } elseif ($po_user['type'] == PO_USER_TYPE_USER) { + $user_type = PO_USER_TYPE_CLIENT; + } else { + $user_type = $po_options_default['new_user_type']; + } + + /* Optional */ + $url = pg_escape_string($_REQUEST['url']); + $phone = pg_escape_string($_REQUEST['phone']); + $company = pg_escape_string($_REQUEST['company']); + $address1 = pg_escape_string($_REQUEST['address1']); + $address2 = pg_escape_string($_REQUEST['address2']); + $city = pg_escape_string($_REQUEST['city']); + $zipcode = pg_escape_string($_REQUEST['zipcode']); + $state = pg_escape_string($_REQUEST['state']); + $country = pg_escape_string($_REQUEST['country']); + pg_query($database, "begin"); $new_user_id = pg_fetch_row(pg_query($database, "select nextval('users_id_sequence')")); $new_contact_info_id = pg_fetch_row(pg_query($database, "select nextval('contact_info_id_sequence')")); - $new_preferences_id = pg_fetch_row(pg_query($database, "select nextval('preferences_id_sequence')")); - $new_imagemagick_options_id = pg_fetch_row(pg_query($database, "select nextval('imagemagick_options_id_sequence')")); - $new_imagemagick_composite_options_id = pg_fetch_row(pg_query($database, "select nextval('imagemagick_composite_options_id_sequence')")); - $new_dcraw_options_id = pg_fetch_row(pg_query($database, "select nextval('dcraw_options_id_sequence')")); - $my_user_id = $new_user_id[0]; + + $user_id = $new_user_id[0]; $my_contact_info_id = $new_contact_info_id[0]; - $my_preferences_id = $new_preferences_id[0]; - $my_imagemagick_options_id = $new_imagemagick_options_id[0]; - $my_imagemagick_composite_options_id = $new_imagemagick_composite_options_id[0]; - $my_dcraw_options_id = $new_dcraw_options_id[0]; - $result = pg_query($database, " - insert into preferences - (identifier, print_out, start_hour, end_hour, start_day, - num_of_rows, num_of_columns, folder_view, num_of_rows_l, - bulk_upload_enable, paper, label, popup_enable, popup_delay, - shop_enable, quota_size, quota_count, download_counter, download_expiry_period, search_enable_stemming) - values ('$my_preferences_id', '$print_out', '$start_hour', '$end_hour', '$start_day', - '$num_of_rows', '$num_of_columns', '$folder_view', '$num_of_rows_l', - '$system_preferences[1]', '$paper', '$label', '$popup_enable', $popup_delay, - '$system_preferences[4]', $system_preferences[5], $system_preferences[6], 100, 1095, '$default_enable_stemming')"); - if (!$result) - $registration_error = 5; - - $result = pg_query($database, " - insert into imagemagick_options - (identifier, - preview_quality, preview_colorspace, preview_gamma, - preview_sharpen_radius, preview_sharpen_sigma, - preview_sharpen_amount, preview_sharpen_threshold, - preview_border_width, preview_border_height, preview_border_color, - thumb_quality, thumb_colorspace, thumb_gamma, - thumb_sharpen_radius, thumb_sharpen_sigma, - thumb_sharpen_amount, thumb_sharpen_threshold, - thumb_border_width, thumb_border_height, thumb_border_color) - values ($my_imagemagick_options_id, - $im_preview_quality, '$im_preview_color_space', $im_preview_gamma, - $im_preview_sharpen_radius, $im_preview_sharpen_sigma, - $im_preview_sharpen_amount, $im_preview_sharpen_threshold, - $im_preview_border_width, $im_preview_border_height, '$im_preview_border_color', - $im_thumb_quality, '$im_thumb_color_space', $im_thumb_gamma, - $im_thumb_sharpen_radius, $im_thumb_sharpen_sigma, - $im_thumb_sharpen_amount, $im_thumb_sharpen_threshold, - $im_thumb_border_width, $im_thumb_border_height, '$im_thumb_border_color')"); - if (!$result) - $registration_error = 5; - - $result = pg_query($database, " - insert into imagemagick_composite_options - (identifier, gravity, watermark, photo_version) - values ($my_imagemagick_composite_options_id, '$im_watermark_location', $im_watermark_brightness, null)"); - if (!$result) - $registration_error = 5; - - $result = pg_query($database, " - insert into dcraw_options - (identifier, gamma, brightness, white_balance, bitdepth) - values ($my_dcraw_options_id, $dcraw_gamma, $dcraw_brightness, '$dcraw_white_balanace', $dcraw_bitdepth)"); - if (!$result) - $registration_error = 5; - - if (substr($url, 0, 7) != "http://") + if (strlen($url) && (substr($url, 0, 7) != "http://")) $url = "http://".$url; $result = pg_query($database, "insert into contact_info (identifier, address1, address2, city, zipcode, state, country, phone, email, url) values ('$my_contact_info_id', '$address1', '$address2', '$city', '$zipcode', $state, $country, '$phone', '$email', '$url')"); - if (!$result) - $registration_error = 5; - $session_id = md5(mt_rand() . $my_user_id); + if ($result) { + $result = pg_query($database, "insert into users (identifier, first_name, last_name, company, username, password, contact, member_since, type) + values ('$user_id', '$first_name', '$last_name', '$company', '$username', '$password_1', '$my_contact_info_id', now(), $user_type)"); + } + if ($result) { + $result = pg_query($database, "insert into folder (identifier, parent_folder, users, caption, access_rights) + values (nextval('folder_id_sequence'), null, '$user_id', 'Trash', 3)"); + } + if ($result) { + $result = pg_query($database, "insert into album (identifier, parent_album, users, caption, access_rights, description) + values (nextval('album_id_sequence'), null, $user_id, + 'Spool', 3, null)"); + } - $result = pg_query($database, "insert into users (identifier, first_name, last_name, company, username, password, session_id, contact, member_since, preferences, imagemagick_options, imagemagick_composite_options, dcraw_options, type, shared) - values ('$my_user_id', '$first_name', '$last_name', '$company', '$username', '$password_1', '$session_id', '$my_contact_info_id', now(), '$my_preferences_id', '$my_imagemagick_options_id', '$my_imagemagick_composite_options_id', '$my_dcraw_options_id', $system_preferences[0], '$system_preferences[7]')"); - if (!$result) - $registration_error = 5; - $result = pg_query($database, "insert into folder (identifier, parent_folder, users, caption, date_of_creation, access_rights, orderby) - values (nextval('folder_id_sequence'), null, '$my_user_id', 'Orphanage', now(), 3, 1)"); - if (!$result) - $registration_error = 5; - $result = pg_query($database, "insert into folder (identifier, parent_folder, users, caption, date_of_creation, access_rights, orderby) - values (nextval('folder_id_sequence'), null, '$my_user_id', 'Trash', now(), 3, 1)"); - if (!$result) - $registration_error = 5; + if ($result) + $result = store_user_pref($database, $user_id, 'lang', $lang); + if ($result) + $result = store_user_pref($database, $user_id, 'quota_size', $po_options_default['quota_size']); + if ($result) + $result = store_user_pref($database, $user_id, 'quota_count', $po_options_default['quota_count']); + if ($result) + $result = store_user_pref($database, $user_id, 'bulk_upload_enable', $po_options_default['bulk_upload_enable']); - if ($registration_error == 5) { + /* Register the client association */ + if ($result && $po_user['type'] == PO_USER_TYPE_USER) { + $result = pg_query($database, "insert into client (identifier, users, client, date_of_creation, status, trusted) + values (nextval('client_id_sequence'), '$po_user[id]', '$user_id', now(), 2, 't')"); + } + + if (!$result) { + $registration_error = 5; pg_query($database, "rollback"); } else { pg_query($database, "commit"); - if ($po_user['type'] != $user_type['administrator']) - setcookie ($po_cookie, $session_id, 0, "", "", 0); + if ($po_user['type'] <= PO_USER_TYPE_CLIENT) { + $po_user['id'] = $user_id; + $po_user['type'] = $user_type; + $po_user['username'] = $username; + $po_user['first_name'] = $first_name; + $po_user['last_name'] = $last_name; + site_update_session(); + } + send_login_information($database, $email); } } } -if ($my_user_id!=0) { - if ($po_user['type'] != $user_type['administrator']) - header("location: login.php"); - else - header("location: admin.php?selector=3"); +if (!$registration_error && ($user_id!=0)) { + if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + header("Location: admin.php?selector=2"); + } elseif ($po_user['type'] == PO_USER_TYPE_USER) { + header("Location: my.datebook.php"); + } else { + header("Location: login.php"); + } exit(); } -site_header($page_width, "Register"); +site_header($strings['generic']['register']); site_navigator(3); switch ($registration_error) { case 1: - site_navigator_status("Username $username already registered.", ""); + site_navigator_status(err_str($strings['errors']['username_registered'] . ": $username"), ""); break; case 2: - site_navigator_status("Password mismatch.", ""); + site_navigator_status(err_str($strings['errors']['password_mismatch']), ""); break; case 3: - site_navigator_status("First name and and last name is mandatory.", ""); + site_navigator_status(err_str($strings['errors']['names_mandatory']), ""); break; case 4: - site_navigator_status("E-mail is mandatory.", ""); + site_navigator_status(err_str($strings['errors']['email_mandatory']), ""); break; case 5: - site_navigator_status("Could not create new user entry, database error.", ""); + site_navigator_status(err_str($strings['errors']['db_insert_failed']), ""); break; default: - site_navigator_status("Login : Registration : fields in bold are mandatory", ""); + site_navigator_status("".$strings['generic']['login']." : ".$strings['generic']['user_registration'] , $strings['user']['registration_text']); } $all_states = pg_query($database, "select identifier, value from state order by value"); $all_countries = pg_query($database, "select identifier, value from country order by value"); -$all_papers = pg_query($database, "select identifier, name from paper"); -$all_labels = pg_query($database, " - select label.identifier, - (select name from manufacturer where identifier=label.manufacturer), - label.name, paper.name - from label, paper - where label.paper=paper.identifier"); -print "
    \n"; print " 
    \n"; -print "\n"; +print "\n"; +print "
    \n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $all_user_types = pg_query($database, " + select user_type.identifier, user_type.value + from user_type"); + print "\n"; + } -print "\n"; - -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print emit_language_combo($lang); +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; print "
    ".$strings['generic']['username']."
    ".$strings['generic']['password']."
    ".$strings['generic']['password_again']."
    ".$strings['user']['first_name']."
    ".$strings['user']['last_name']."
    ".$strings['user']['email']."
    Username 
    Password 
    Confirm password 
    First name 
    Last name 
    Email 
    ".$strings['generic']['type'].""; + display_combo("new_user_type", $all_user_types, $po_options_default['new_user_type'], "", 1); + print "
     
    Url
    Phone
    Company
    Address -
    - -
    - -
    -
    City
    Zipcode
    State "; display_combo("state", $all_states, $state, "", 0); print"
    Country "; display_combo("country", $all_countries, $country, "", 0); print"
    ".$strings['user']['web']."
    ".$strings['user']['phone']."
    ".$strings['user']['company']."
    ".$strings['user']['address']."
    ".$strings['user']['city']."
    ".$strings['user']['post_code']."
    ".$strings['user']['state'].""; display_combo("state", $all_states, $state, "", 0); print"
    ".$strings['user']['country'].""; display_combo("country", $all_countries, $country, "", 0); print"
    \n"; print "
    "; -print " 
    \n"; -print ""; -print "\"Clear\""; -print " 
    \n"; +print $thm_elem['button.register']; +print $thm_elem['button.clear']; +print $thm_elem['button.cancel']; print "
    "; print "
    \n"; diff --git a/src/save.front.page.php b/src/save.front.page.php index f900ba5..6a18c0b 100644 --- a/src/save.front.page.php +++ b/src/save.front.page.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,26 +17,20 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/admin.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['administrator']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_ADMIN); $file_content = $_REQUEST['file_content']; -$file_descriptor = fopen ("index.php", "w"); +$file_descriptor = fopen ("index_site.php", "w"); fwrite($file_descriptor, $file_content); fclose($file_descriptor); site_epilog($database); -header("location: admin.php?selector=".$admin_data['front_page']['idx']); +header("Location: admin.php?selector=".$admin_data['front_page']['idx']); ?> diff --git a/src/search.image.color.php b/src/search.image.color.php index b496993..4631b65 100644 --- a/src/search.image.color.php +++ b/src/search.image.color.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,9 +17,9 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/site.php"; include_once "include/common.php"; include_once "include/orderby.php"; @@ -30,7 +30,7 @@ $database = site_prolog(); $photo_id = pg_escape_string($_REQUEST['photo']); -site_header($page_width, "Search Image Color"); +site_header("Search Image Color"); site_navigator(2); site_navigator_status("Create a colormap to search for:", ""); @@ -41,19 +41,19 @@ if ($photo_id) { $argon_photo_id = $photo_id; $search_type = "submit"; $file_name = $site_url."/image.display.php?image=$photo_id&size=1"; - display_frame_top($cell_size, $cell_size, 10, "#E7E7E7", $theme); + display_frame_top(); print "\n"; - display_frame_bottom($cell_size, $cell_size, 10, $theme); + display_frame_bottom(); } else { $argon_photo_id = 1; $search_type = "no_submit"; print " 
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; $width = $_REQUEST['width']; $height = $_REQUEST['height']; for ($j = 0; $j < $height; $j++) @@ -76,29 +76,15 @@ if (!$photo_id) { $file_name = createXMPFile(); } -$num_of_columns = $default_num_of_columns; -$popup_enable = $default_popup_enable; -$popup_delay = $default_popup_delay; - -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, popup_enable, popup_delay - from preferences - where preferences.identifier=$po_user[prefs]")); - $num_of_columns = $preferences[1]; - $popup_enable = $preferences[2]; - $popup_delay = $preferences[3]; -} - $index_algorithm = "ar_index_histogram:0.1.0"; $search_algorithm ="ar_search_kendall:0.1.0"; -$limit = $num_of_columns * 3; +$limit = $po_options['photos_per_page']; $offset = 0; $photo_id_list = array(); $photo_id_counter = 0; -argon_query($po_user['session'], $cbir_host, $cbir_port, $index_algorithm, $search_algorithm, $search_type, $limit, $offset, $argon_photo_id, $file_name); +argon_query($cbir_host, $cbir_port, $index_algorithm, $search_algorithm, $search_type, $limit, $offset, $argon_photo_id, $file_name); if (!$photo_id) { error_reporting(0); @@ -107,32 +93,23 @@ if (!$photo_id) { } if ($photo_id_list) { - if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "photo.access_rights = $access[public]"; - } - else { - $sql_query_access_rights_string = "((photo.access_rights = $access[public]) or - (photo.access_rights = $access[protected] and $po_user[id] in (select client from client where users=photo.users)) or - (photo.users = $po_user[id]))"; - } + $sql_query_access_rights_string = " can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; $sql_search_string = ""; for ($i = 0; $i < $photo_id_counter; $i++) { $sql_search_entry = - "(select photo.identifier, photo_version.small_image_path, photo.caption, date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + "(select photo.identifier, photo.caption, date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, photo.users, users.first_name, users.last_name, views, $i as sort_order - from photo, folder, photo_dupe, photo_version, users + from photo, folder, photo_version, users where photo.folder = folder.identifier and photo.users = users.identifier and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo and photo_version.master='t' - and photo_dupe.key = 1 and photo.identifier = $photo_id_list[$i] and $sql_query_access_rights_string)"; - + if ($sql_search_string) { $sql_search_string = $sql_search_string ." union ". $sql_search_entry; } @@ -152,40 +129,35 @@ $arguments = "&search_type=$search_type&offset=$offset"; $search_string_exp = str_replace(" ", "+", $search_string); -print ""; -print ""; - print "
    "; print ""; -print ""; +print ""; print ""; if (($offset + $limit) > $num_of_matches) { $items = $num_of_matches - $offset; -} -else { +} else { $items = $limit; } -display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); -$checkboxes = display_photo_slides("search_general", $po_user['id'], $po_user['type'], $folder_id, $search_result, $items, $num_of_columns, $popup_enable, $popup_delay, "f", true); -display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); - +display_photo_navigator("search.image.color.php?search_string=$search_string$arguments", $offset, $limit, $num_of_matches); +$checkboxes = display_photo_slides("search_general", $folder_id, $search_result, 0, $items, true, true); +display_photo_navigator("search.image.color.php?search_string=$search_string$arguments", $offset, $limit, $num_of_matches); print " 
    \n"; site_navigator_status("Searched database for $photo_id", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); print ""; print ""; -if ($checkboxes > 0 && $po_user['id'] != "") { - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and type='u' order by date_of_creation desc"); +if ($checkboxes > 0 && $po_user['id']) { + $album_all = pg_query($database, "select identifier, caption from album where users=$po_user[id] order by date_of_creation desc"); if (pg_num_rows($album_all) > 0) { print ""; } print ""; print ""; print ""; } @@ -194,7 +166,6 @@ print "
      "; - display_linkto_album($album_all, $album_id); + display_folder_actions($album_all, $album_id); print "  "; - print "\n"; + display_selectbutton(); print "
    "; print "
    "; print " 
    \n"; -print ""; site_footer($database); site_epilog($database); diff --git a/src/search.image.layout.php b/src/search.image.layout.php index 728da48..7c0e27f 100644 --- a/src/search.image.layout.php +++ b/src/search.image.layout.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,20 +17,21 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/site.php"; include_once "include/common.php"; include_once "include/orderby.php"; include_once "include/search.php"; include_once "include/search.2.php"; + $database = site_prolog(); $photo_id = pg_escape_string($_REQUEST['photo']); -site_header($page_width, "Search Image Layout"); +site_header("Search Image Layout"); site_navigator(2); site_navigator_status("Create an image layout to search for:", ""); @@ -41,21 +42,21 @@ if ($photo_id) { $argon_photo_id = $photo_id; $search_type = "submit"; $file_name = $site_url."/image.display.php?image=$photo_id"; - display_frame_top($cell_size, $cell_size, 10, "#E7E7E7", $theme); + display_frame_top(); print "\n"; - display_frame_bottom($cell_size, $cell_size, 10, $theme); + display_frame_bottom(); } else { $argon_photo_id = 1; $search_type = "no_submit"; print " 
    \n"; print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; $width = $_REQUEST['width']; $height = $_REQUEST['height']; @@ -79,29 +80,15 @@ if (!$photo_id) { $file_name = createXMPFile(); } -$num_of_columns = $default_num_of_columns; -$popup_enable = $default_popup_enable; -$popup_delay = $default_popup_delay; - -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, popup_enable, popup_delay - from preferences - where preferences.identifier=$po_user[prefs]")); - $num_of_columns = $preferences[1]; - $popup_enable = $preferences[2]; - $popup_delay = $preferences[3]; -} - $index_algorithm = "ar_index_haar:0.2.0"; $search_algorithm ="ar_search_euclidean:0.1.0"; -$limit = $num_of_columns * 3; +$limit = $po_options['photos_per_page']; $offset = 0; $photo_id_list = array(); $photo_id_counter = 0; -argon_query($po_user['session'], $cbir_host, $cbir_port, $index_algorithm, $search_algorithm, $search_type, $limit, $offset, $argon_photo_id, $file_name); +argon_query($cbir_host, $cbir_port, $index_algorithm, $search_algorithm, $search_type, $limit, $offset, $argon_photo_id, $file_name); if (!$photo_id) { error_reporting(0); @@ -110,29 +97,21 @@ if (!$photo_id) { } if ($photo_id_list) { - if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "photo.access_rights = $access[public]"; - } - else { - $sql_query_access_rights_string = "((photo.access_rights = $access[public]) or - (photo.access_rights = $access[protected] and $po_user[id] in (select client from client where users=photo.users)) or - (photo.users = $po_user[id]))"; - } + $sql_query_access_rights_string = " can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; + $sql_search_string = ""; for ($i = 0; $i < $photo_id_counter; $i++) { $sql_search_entry = - "(select photo.identifier, photo_version.small_image_path, photo.caption, date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + "(select photo.identifier, photo.caption, date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, photo.users, users.first_name, users.last_name, views, $i as sort_order - from photo, folder, photo_dupe, photo_version, users + from photo, folder, photo_version, users where photo.folder = folder.identifier and photo.users = users.identifier and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo and photo_version.master='t' - and photo_dupe.key = 1 and photo.identifier = $photo_id_list[$i] and $sql_query_access_rights_string)"; @@ -154,40 +133,36 @@ else { $arguments = "&search_type=$search_type&offset=$offset"; $search_string_exp = str_replace(" ", "+", $search_string); -print ""; -print ""; - print "
    "; print ""; -print ""; +print ""; print ""; if (($offset + $limit) > $num_of_matches) { $items = $num_of_matches - $offset; -} -else { +} else { $items = $limit; } -display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); -$checkboxes = display_photo_slides("search_general", $po_user['id'], $po_user['type'], $folder_id, $search_result, $items, $num_of_columns, $popup_enable, $popup_delay, "f", true); -display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); +display_photo_navigator("search.image.layout.php?search_string=$search_string$arguments", $offset, $limit, $num_of_matches); +$checkboxes = display_photo_slides("search_general", $folder_id, $search_result, $items, true, true); +display_photo_navigator("search.image.layout.php?search_string=$search_string$arguments", $offset, $limit, $num_of_matches); print " 
    \n"; site_navigator_status("Searched database for $photo_id", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_photos)); print ""; print ""; -if ($checkboxes > 0 && $po_user['id'] != "") { - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and type='u' order by date_of_creation desc"); +if ($checkboxes > 0 && $po_user['id']) { + $album_all = pg_query($database, "select identifier, caption from album where users=$po_user[id] and order by date_of_creation desc"); if (pg_num_rows($album_all) > 0) { print ""; } print ""; print ""; print ""; } @@ -196,7 +171,6 @@ print "
      "; - display_linkto_album($album_all, $album_id); + display_album_actions($album_all, $album_id); print "  "; - print "\n"; + display_selectbutton(); print "
    "; print "
    "; print " 
    \n"; -print ""; site_footer($database); site_epilog($database); diff --git a/src/search.image.php b/src/search.image.php index a5d37d6..2381e94 100644 --- a/src/search.image.php +++ b/src/search.image.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -22,13 +22,13 @@ $type = $_REQUEST['type']; switch ($type) { case "color": - header("location: search.image.color.php?photo=$photo_id"); + header("Location: search.image.color.php?photo=$photo_id"); $exit(); case "layout": - header("location: search.image.layout.php?photo=$photo_id"); + header("Location: search.image.layout.php?photo=$photo_id"); $exit(); default: - header("location: photo.php?photo=$photo_id"); + header("Location: photo.php?photo=$photo_id"); $exit(); } diff --git a/src/search.php b/src/search.php index f31a9e5..c13b849 100644 --- a/src/search.php +++ b/src/search.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,38 +17,35 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; +include_once "include/common.php"; include_once "include/site.php"; $database = site_prolog(); -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select search_default_mode - from preferences - where preferences.identifier=$po_user[prefs]")); +if ($po_user['id']) { site_epilog($database); - switch ($preferences[0]) { + switch ($po_options['search_engine_type']) { default: case 1: - header("location: search.text.general.php"); + header("Location: search.text.general.php"); break; case 2: - header("location: search.text.advanced.php"); + header("Location: search.text.advanced.php"); break; case 3: - header("location: search.image.layout.php"); + header("Location: search.image.layout.php"); break; case 4: - header("location: search.image.color.php"); + header("Location: search.image.color.php"); } exit(); } site_epilog($database); -header("location: search.text.general.php"); +header("Location: search.text.general.php"); ?> diff --git a/src/search.sidebar.php b/src/search.sidebar.php deleted file mode 100644 index dacd1c5..0000000 --- a/src/search.sidebar.php +++ /dev/null @@ -1,493 +0,0 @@ - 0) - $num_of_pages++; - - /* compute first page */ - if ($current_page < $proxy) - $first_page = 0; - else - $first_page = $current_page - $proxy; - - /* compute last page */ - if (($current_page + $proxy + 1) > $num_of_pages) - $last_page = $num_of_pages; - else - $last_page = $current_page + $proxy + 1; - - $html_string = ""; - if ($current_page > 0) { - $this_offset = ($current_page - 1) * $limit; - $html_string .= "Prev "; - } - - if ($first_page != 0) { - $html_string .= "1 "; - if ($first_page != 1) - $html_string .= "... "; - } - - for ($page = $first_page; $page < $current_page; $page++) { - $this_offset = $page * $limit; - $this_page = $page + 1; - $html_string .= "$this_page "; - } - - $this_page = $current_page + 1; - $html_string .= "$this_page "; - - for ($page = $current_page + 1; $page < $last_page; $page++) { - $this_offset = $page * $limit; - $this_page = $page + 1; - $html_string .= "$this_page "; - } - - if ($last_page != $num_of_pages) { - if ($last_page != ($num_of_pages - 1)) - $html_string .= "... "; - - $this_offset = ($num_of_pages - 1) * $limit; - $html_string .= "$num_of_pages "; - } - - if ($current_page < ($num_of_pages - 1)) { - $this_offset = ($current_page + 1) * $limit; - $html_string .= " Next "; - } - - return $html_string; -} - -function display_sidebar_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id) { - global $theme; - - $html_string = " 
    "; - $html_string .= ""; - - $html_string .= ""; - - $html_string .= ""; - - if ($search_type_string[$search_type] != "Users") { - $html_string .= ""; - } - - $html_string .= ""; - $html_string .= "
    "; - $html_string .= ""; - $html_string .= "
    "; - $html_string .= ""; - $html_string .= ""; - $html_string .= "
    "; - $html_string .= generate_html_users_combo("current_user", $database, $current_user_id, "style=\"width: 100%;\""); - $html_string .= "
    "; - $html_string .= "\n"; - $html_string .= "
    "; - - display_box_with_header("Type search string below", $html_string, "95%", "left"); -} - -$search_type_string = array ("Photos", "Folders", "Users"); - -$num_of_rows = $default_num_of_rows_in_list_view; -$popup_enable = $default_popup_enable; -$popup_delay = $default_popup_delay; - -$search_type = $_REQUEST['search_type']; -$search_string = $_REQUEST['search_string']; -$search_string = validate_search_string($search_string); -$current_user_id = $_REQUEST['current_user']; -if (!$current_user_id || ($current_user_id=="all")) { - $current_user_id = "null"; - $sql_photo_users_string = " "; - $sql_folder_users_string = " "; -} else { - $sql_photo_users_string = " and photo.users = $current_user_id "; - $sql_folder_users_string = " and folder.users = $current_user_id "; -} - -$sql_query_order_by_string = $order_by_string[1][0]; -$ignored_keywords = ""; - -$database = site_prolog(); - -$offset = pg_escape_string($_REQUEST['offset']); -if (!$offset) { - $offset = 0; -} - -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select num_of_rows, popup_enable, popup_delay, search_enable_stemming - from preferences - where preferences.identifier=$po_user[prefs]")); - $num_of_rows = $preferences[0]; - $popup_enable = $preferences[1]; - $popup_delay = $preferences[2]; - $enable_stemming = $preferences[3]; -} - -site_head("Search"); - -$keywords = extract_keywords($search_string, $enable_stemming); - -if (!$keywords) { - print "
    "; - display_sidebar_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); - print "
    "; - - if ($ignored_keywords != "") { - $html_string = " 
    "; - $html_string .= "

    \n"; - $html_string .= "The following keywords were ignored: $ignored_keywords
    "; - $html_string .= "Use quotation marks to force the search engine to include these keywords."; - $html_string .= "

    \n"; - display_box_with_header("Search results", $html_string, "95%", "left"); - } - - print " 
    "; - site_logo("center"); - site_credit("center", true, false); - site_foot(); - site_epilog($database); - exit(); -} - -switch ($search_type) { - default: - case 0: /* photo search */ - $status_string="Displaying photos"; - - $sql_search_identifier = build_sql_search_string($keywords, "photo.identifier"); - $sql_search_title = build_sql_search_string($keywords, "photo.title"); - $sql_search_author = build_sql_search_string($keywords, "photo.author"); - $sql_search_keyword = " photo.identifier in (select k.photo from photo_keywords k where " . build_sql_search_string($keywords, "k.keyword") . ")"; - $sql_search_caption = build_sql_search_string($keywords, "photo.caption"); - $sql_search_place = build_sql_search_string($keywords, "view_location.place"); - $sql_search_city = build_sql_search_string($keywords, "view_location.city"); - $sql_search_state = build_sql_search_string($keywords, "view_location.state"); - $sql_search_country = build_sql_search_string($keywords, "view_location.country"); - - $sql_search_combined_1 = "(".$sql_search_identifier." OR ".$sql_search_title ." OR ".$sql_search_author." OR ".$sql_search_keyword." OR ".$sql_search_caption.")"; - $sql_search_combined_2 = "(".$sql_search_identifier." OR ".$sql_search_title." OR ".$sql_search_author." OR ".$sql_search_keyword." OR ".$sql_search_caption." OR ".$sql_search_place." OR ".$sql_search_city." OR ".$sql_search_state." OR ".$sql_search_country.")"; - -if ($po_user['type'] == $user_type['administrator']) { - $sql_query_access_rights_string = " true "; -else if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "photo.access_rights = $access[public]"; - } else { - $sql_query_access_rights_string = "((photo.access_rights = $access[public]) or - (photo.access_rights = $access[protected] and $po_user[id] in (select client from client where users=photo.users)) or - (photo.users = $po_user[id]))"; - } - - /* query number of matches in a separate query, because the union might result duplicates */ - $num_of_matches_a = pg_fetch_row(pg_query($database, " - select count(identifier) from photo where identifier in - ((select photo.identifier - from photo, folder, photo_dupe, photo_version, users - where photo.folder = folder.identifier - and photo.users = users.identifier - $sql_photo_users_string - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and ($sql_search_combined_1) - and $sql_query_access_rights_string) - union - (select photo.identifier - from photo, folder, photo_dupe, photo_version, users, view_location - where photo.folder = folder.identifier - and photo.users = users.identifier - $sql_photo_users_string - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and photo.location = view_location.identifier - and ($sql_search_combined_2) - and $sql_query_access_rights_string))")); - - $num_of_matches = $num_of_matches_a[0]; - - $offset = $_REQUEST['offset']; - if (!$offset) { - $offset = 0; - } - - $limit = $num_of_rows; - if ($limit > $num_of_matches) { - $limit = $num_of_matches; - } - - $search_result = pg_query($database, " - (select photo.identifier, photo_version.small_image_path, photo.caption, date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, - 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - views, - (0) as for_sale, - photo.title, photo.author, '' as keyword, - photo_version.original_image_name, photo.users - from photo, folder, photo_dupe, photo_version, users - where photo.folder = folder.identifier - and photo.users = users.identifier - $sql_photo_users_string - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and ($sql_search_combined_1) - and $sql_query_access_rights_string) - union - (select photo.identifier, photo_version.small_image_path, photo.caption, date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, - 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, - views, - (0) as for_sale, - photo.title, photo.author, photo.keyword, - photo_version.original_image_name, photo.users - from photo, folder, photo_dupe, photo_version, users, view_location - where photo.folder = folder.identifier - and photo.users = users.identifier - $sql_photo_users_string - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and photo.location = view_location.identifier - and ($sql_search_combined_2) - and $sql_query_access_rights_string) - order by $sql_query_order_by_string - offset $offset - limit $limit"); - break; - case 1: /* folder search */ - $status_string = "Displaying folders"; - $sql_search_string = build_sql_search_string($keywords, "folder.caption"); - if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "access_rights = $access[public]"; - } - else { - $sql_query_access_rights_string = "(users = $po_user[id] or access_rights = $access[public])"; - } - - $search_result = pg_query($database, - "select caption, folder.identifier, date_of_creation, - first_name, last_name, users.identifier - from folder, users - where $sql_search_string - $sql_folder_users_string - and $sql_query_access_rights_string - and users.identifier = folder.users - order by caption"); - $num_of_matches = pg_num_rows($search_result); - break; - case 2: /* user search */ - $status_string = "Displaying users"; - - $sql_search_string = "(". - build_sql_search_string($keywords, "last_name")." OR ". - build_sql_search_string($keywords, "first_name")." OR ". - build_sql_search_string($keywords, "username").")"; - - $search_result = pg_query($database, - "select identifier, first_name, last_name, member_since - from users - where ($sql_search_string) - and type > $user_type[client] - order by last_name, first_name"); - $num_of_matches = pg_num_rows($search_result); -} - -if ($num_of_matches == 0) { - print "
    "; - display_sidebar_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); - print "
    "; - - $html_string = " 
    "; - $html_string .= "

    No matches found for ".$search_string."

    "; - - if ($ignored_keywords != "") { - $html_string .= "

    \n"; - $html_string .= "The following keywords were ignored: $ignored_keywords
    "; - $html_string .= "Use quotation marks to force the search engine to include these keywords."; - $html_string .= "

    \n"; - } - - display_box_with_header("Search results", $html_string, "95%", "left"); - print " 
    "; - site_logo("center"); - site_credit("center", true, false); - site_foot(); - site_epilog($database); - exit(); -} - -$itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); -print "
    "; -display_sidebar_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); -print "
    "; - -$html_string = " 
    "; -if ($ignored_keywords != "") { - $html_string .= "

    \n"; - $html_string .= "The following keywords were ignored: $ignored_keywords
    "; - $html_string .= "Use quotation marks to force the search engine to include these keywords."; - $html_string .= "

    \n"; -} - -switch ($search_type) { - default: - case 0: /* photo search */ - $arguments = "&search_type=$search_type"; - $search_string_exp = str_replace(" ", "+", $search_string); - - print ""; - print ""; - - print "
    "; - print ""; - print ""; - print ""; - - if (($offset + $limit) > $num_of_matches) { - $photo_count = $num_of_matches - $offset; - } - else { - $photo_count = $limit; - } - - $html_string .= "

    "; - $html_string .= generate_history_html($site_url . "/search.sidebar.php?search_type=$search_type&search_string=$search_string", $offset, $limit, 2, $num_of_matches); - $html_string .= "

    "; - -/* for ($i = 0; $i < $photo_count; $i++) { */ -/* $photo = pg_fetch_row($search_result, $i); */ -/* $photo[2] = makeZanza($photo[2], "No caption"); */ -/* if ($photo[8] == 1) */ -/* $html_string .= "

    ".($i + 1).". $photo[9]
    \n"; */ -/* else { */ -/* $on_mouse_over ="t_w=10; ttWidth=10; return escape('')"; */ -/* $html_string .= "

    ".($i + 1 + $offset).". $photo[2]
    \n"; */ -/* } */ - -/* $html_string .= "    Author: $photo[10]

    \n"; */ -/* } */ - - for ($i = 0; $i < $photo_count; $i++) { - $photo = pg_fetch_row($search_result, $i); - $photo[3] = substr($photo[3], 0, 10); - $photo[4] = substr($photo[4], 0, 10); - $photo[2] = ereg_replace("\"", """, $photo[2]); - $photo[2] = ereg_replace("'", "\'", $photo[2]); - $photo[2] = ereg_replace("\n", "", $photo[2]); - $photo[2] = ereg_replace("\r", "", $photo[2]); - - if ($popup_enable == 't') { - $tt_id = "tt_img_$photo[0]"; - echo '
    ', - ''; - print tooltip_row('Title:', $photo[9]); - print tooltip_row('Author:', $photo[10]); - print tooltip_row('Caption:', $photo[2]); - print tooltip_row('Keywords:', $photo[11]); - print tooltip_row('Exposed:', $photo[3]); - print tooltip_row('Created:', $photo[4]); - print tooltip_row('Access:', $photo[5]); - if ($photo[6] > 0) - print tooltip_row('Rating:', round(11 - $photo[6], 3)); - print tooltip_row('Views:', $photo[7]); - echo '
    ', "\n", - '
    ', "\n"; - } - - $html_string .= "

    \n"; - } - - $html_string .= "

    "; - $html_string .= generate_history_html($site_url . "/search.sidebar.php?search_type=$search_type&search_string=$search_string", $offset, $limit, 2, $num_of_matches); - $html_string .= "

    "; - - display_box_with_header("".$num_of_matches ." photo".($num_of_matches>1 ? "s" : "")." found", $html_string, "95%", "left"); - - print "
    "; - break; - case 1: /* folder search */ - $folder_count = pg_num_rows($search_result); - for ($i=0; $i < $folder_count; $i++) { - $folder = pg_fetch_row($search_result, $i); - $photos_by_folder = pg_fetch_row(pg_query($database, "select count_photos_by_folder($folder[1])")); - $html_string .= "

    ".($i + 1).". $folder[0]
    "; - $html_string .= "    Owner: $folder[3] $folder[4]
    "; - $html_string .= "    Contains $photos_by_folder[0] photos

    "; - } - - display_box_with_header("".$folder_count ." folder".($folder_count>1 ? "s" : "")." found", $html_string, "95%", "left"); - break; - case 2: /* user search */ - $user_count = pg_num_rows($search_result); - for ($i=0; $i < $user_count; $i++) { - $user = pg_fetch_row($search_result, $i); - $html_string .= "

    ".($i + 1).". $user[1], $user[2]
    "; - $html_string .= "    Member since: ".generate_date_html($user[3], 'date', 0). "

    "; - } - display_box_with_header("".$user_count ." user".($user_count>1 ? "s" : "")." found", $html_string, "95%", "left"); -} - -print ""; -print " 
    "; -site_logo("center"); -site_credit("center", true, false); -site_foot(); -site_epilog($database); -?> diff --git a/src/search.text.advanced.php b/src/search.text.advanced.php index d5b942c..49250d3 100644 --- a/src/search.text.advanced.php +++ b/src/search.text.advanced.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,141 +17,111 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/orderby.php"; include_once "include/stemming.php"; include_once "include/search.php"; -include_once "$theme/theme.php"; +; function display_search_operator($item_name, $value) { + global $strings; + print "\n"; } function display_advanced_search_entry($database, $search_data, $search_operator) { - global $theme; - global $style; + global $thm_elem; + global $strings; global $search_interface; - print " 
    \n"; - display_navigator_box_top($search_interface['text_advanced']['idx'], $search_interface, "100%"); - print " 
    "; - print ""; + print "
    "; print ""; print ""; print "
    "; - print ""; + print "
    "; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; print "
    Identifier "; - print ""; + print "
    ".$strings['photo']['identifier'].""; + print ""; display_search_operator("identifier_operator", $search_operator['identifier']); print "
    Title "; - print ""; + print "
    ".$strings['generic']['title'].""; + print ""; display_search_operator("title_operator", $search_operator['title']); print "
    Author "; - print ""; + print "
    ".$strings['generic']['author'].""; + print ""; display_search_operator("author_operator", $search_operator['author']); print "
    Keyword "; - print ""; + print "
    ".$strings['generic']['keywords'].""; + print ""; display_search_operator("keyword_operator", $search_operator['keyword']); print "
    Caption "; - print ""; + print "
    ".$strings['generic']['caption'].""; + print ""; display_search_operator("caption_operator", $search_operator['caption']); print "
    Location "; - print ""; + print "
    ".$strings['generic']['location'].""; + print ""; display_search_operator("location_operator", $search_operator['location']); print "
    "; print "
    "; - print "\n"; + print $thm_elem['button.search']; + print $thm_elem['button.clear']; print "
    "; - + display_navigator_box_bottom("100%"); - - print " 
    \n"; } -$num_of_rows_l = $default_num_of_rows_in_list_view; -$num_of_rows = $default_num_of_rows_in_slide_view; -$num_of_columns = $default_num_of_columns; -$popup_enable = $default_popup_enable; -$popup_delay = $default_popup_delay; +$folder_id = ""; +$album_id = ""; -$search_data['identifier'] = validate_search_string($_REQUEST['identifier']); -$search_data['title'] = validate_search_string($_REQUEST['title']); -$search_data['author'] = validate_search_string($_REQUEST['author']); -$search_data['keyword'] = validate_search_string($_REQUEST['keyword']); -$search_data['caption'] = validate_search_string($_REQUEST['caption']); -$search_data['location'] = validate_search_string($_REQUEST['location']); +$search_data['identifier'] = isset($_REQUEST['identifier']) ? validate_search_string($_REQUEST['identifier']) : ""; +$search_data['title'] = isset($_REQUEST['title']) ? validate_search_string($_REQUEST['title']) : ""; +$search_data['author'] = isset($_REQUEST['author']) ? validate_search_string($_REQUEST['author']) : ""; +$search_data['keyword'] = isset($_REQUEST['keyword']) ? validate_search_string($_REQUEST['keyword']) : ""; +$search_data['caption'] = isset($_REQUEST['caption']) ? validate_search_string($_REQUEST['caption']) : ""; +$search_data['location'] = isset($_REQUEST['location']) ? validate_search_string($_REQUEST['location']) : ""; -$search_operator['identifier'] = $_REQUEST['identifier_operator']; -$search_operator['title'] = $_REQUEST['title_operator']; -$search_operator['author'] = $_REQUEST['author_operator']; -$search_operator['keyword'] = $_REQUEST['keyword_operator']; -$search_operator['caption'] = $_REQUEST['caption_operator']; -$search_operator['location'] = $_REQUEST['location_operator']; +$search_operator['identifier'] = isset($_REQUEST['identifier_operator']) ? $_REQUEST['identifier_operator'] : ""; +$search_operator['title'] = isset($_REQUEST['title_operator']) ? $_REQUEST['title_operator'] : ""; +$search_operator['author'] = isset($_REQUEST['author_operator']) ? $_REQUEST['author_operator'] : ""; +$search_operator['keyword'] = isset($_REQUEST['keyword_operator']) ? $_REQUEST['keyword_operator'] : ""; +$search_operator['caption'] = isset($_REQUEST['caption_operator']) ? $_REQUEST['caption_operator'] : ""; +$search_operator['location'] = isset($_REQUEST['location_operator']) ? $_REQUEST['location_operator'] : ""; -$order_by = $_REQUEST['order_by']; -if (!$order_by) { - $order_by = $default_order_by; -} +$offset = pg_escape_string(isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0); -$sql_query_order_by_string = $order_by_string[$order_by][0]; +$order_by = $po_options['order_by']; $ignored_keywords = ""; $database = site_prolog(); -$offset = pg_escape_string($_REQUEST['offset']); -if (!$offset) { - $offset = 0; -} +$sql_query_order_by_string = $order_by_string[$order_by][0]; -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, popup_enable, popup_delay, search_enable_stemming - from preferences - where preferences.identifier=$po_user[prefs]")); - $num_of_rows = $preferences[0]; - $num_of_columns = $preferences[1]; - $popup_enable = $preferences[2]; - $popup_delay = $preferences[3]; - $enable_stemming = $preferences[4]; -} - -site_header($page_width, "Advanced Search"); +site_header($strings['generic']['search']); site_navigator(2); -$keywords['identifier'] = extract_keywords($search_data['identifier'], $enable_stemming); -$keywords['title'] = extract_keywords($search_data['title'], $enable_stemming); -$keywords['author'] = extract_keywords($search_data['author'], $enable_stemming); -$keywords['keyword'] = extract_keywords($search_data['keyword'], $enable_stemming); -$keywords['caption'] = extract_keywords($search_data['caption'], $enable_stemming); -$keywords['location'] = extract_keywords($search_data['location'], $enable_stemming); +$keywords['identifier'] = extract_keywords($search_data['identifier'], $po_options['search_enable_stemming'], 0); +$keywords['title'] = extract_keywords($search_data['title'], $po_options['search_enable_stemming'], 0); +$keywords['author'] = extract_keywords($search_data['author'], $po_options['search_enable_stemming'], 0); +$keywords['keyword'] = extract_keywords($search_data['keyword'], $po_options['search_enable_stemming'], 0); +$keywords['caption'] = extract_keywords($search_data['caption'], $po_options['search_enable_stemming'], 0); +$keywords['location'] = extract_keywords($search_data['location'], $po_options['search_enable_stemming'], 0); if (!$search_data['identifier'] && !$search_data['title'] && @@ -159,31 +129,28 @@ if (!$search_data['identifier'] && !$search_data['keyword'] && !$search_data['caption'] && !$search_data['location']) { - site_navigator_status("Type search string below:", ""); + site_navigator_status($strings['search']['string'], ""); print "
    "; display_advanced_search_entry($database, $search_data, $search_operator); + print "
    "; if ($ignored_keywords != "") { - print " 
    \n"; print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; - print "

    \n"; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; + print "\n"; } - print " 
    \n"; - print ""; site_footer($database); site_epilog($database); exit(); } -$status_string="Displaying photos"; +$status_string=$strings['search']['displaying']; $sql_search_string['identifier'] = build_sql_search_string($keywords['identifier'], "photo.identifier"); $sql_search_string['title'] = build_sql_search_string($keywords['title'], "photo.title"); $sql_search_string['author'] = build_sql_search_string($keywords['author'], "photo.author"); -if ($keywords['keyword'] != "") { - $sql_search_string['keyword'] = build_sql_search_string_keywords($keywords['keyword']); - } +$sql_search_string['keyword'] = build_sql_search_string_keywords($keywords['keyword']); + $sql_search_string['caption'] = build_sql_search_string($keywords['caption'], "photo.caption"); $sql_search_string['location'] = build_sql_search_string($keywords['location'], "(view_location.place|||view_location.city|||view_location.state|||view_location.country)"); @@ -236,74 +203,56 @@ if ($sql_combined_search_string == "") { $sql_combined_search_string = "photo.identifier=null"; } -/* compute access rights */ -if ($po_user['type'] == $user_type['administrator']) { - $sql_query_access_rights_string = " true "; -} else if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "photo.access_rights = $access[public]"; -} -else { - $sql_query_access_rights_string = "((photo.access_rights = $access[public]) or - (photo.access_rights = $access[protected] and $po_user[id] in (select client from client where users=photo.users)) or - (photo.users = $po_user[id]))"; -} +$sql_query_access_rights_string = " can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; -/* query number of matches */ -$query_string = " - select count(photo.identifier) - from photo, folder, photo_dupe, photo_version, users, view_location - where photo.folder = folder.identifier - and photo.users = users.identifier - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and photo.location = view_location.identifier - and ($sql_combined_search_string) - and $sql_query_access_rights_string"; - - //print "
     $query_string 
    "; - -$num_of_matches_a = pg_fetch_row(pg_query($database, $query_string)); - -$num_of_matches = $num_of_matches_a[0]; - -$offset = $_REQUEST['offset']; if (!$offset) { $offset = 0; } -$limit = $num_of_rows * $num_of_columns; -if ($limit > $num_of_matches) { - $limit = $num_of_matches; -} +if ($po_options['photo_view'] == "slide") { + $limit = $po_options['photos_per_page']; + } else { + $limit = $po_options['rows_list_view']; + } $query_string = - "select photo.identifier, photo_version.small_image_path, photo.caption, photo.date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + "select photo.identifier, photo.caption, photo.date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, views, - (0) as for_sale, - photo.title, photo.author, '' as keyword, + photo.title, photo.author, photo_version.original_image_name, photo.users, - view_location.place, view_location.country, view_location.city, view_location.state - from photo, folder, photo_dupe, photo_version, users, view_location + view_location.place, view_location.country, view_location.city, view_location.state, + photo_version.identifier as version + from photo, folder, photo_version, users, view_location where photo.folder = folder.identifier and photo.users = users.identifier and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 and photo.location = view_location.identifier and ($sql_combined_search_string) and $sql_query_access_rights_string - order by $sql_query_order_by_string - offset $offset - limit $limit"; + order by $sql_query_order_by_string"; -# print "
     $query_string 
    "; +// print "
     $query_string 
    "; $search_result = pg_query($database,$query_string); +$num_of_matches = pg_num_rows($search_result); + +/* Sanity checks */ +if ($limit > $num_of_matches) { + $limit = $num_of_matches; + } +while ($num_of_matches && $offset >= $num_of_matches) { + $offset -= $limit; + } +if ($offset < 0) { + $offset = 0; + } +if (($offset + $limit) > $num_of_matches) { + $items = $num_of_matches - $offset; + } else { + $items = $limit; + } if ($num_of_matches == 0) { $itemized_search_string['identifier'] = build_itemized_search_string($search_data['identifier'], "identifier", ""); @@ -313,19 +262,16 @@ if ($num_of_matches == 0) { $itemized_search_string['caption'] = build_itemized_search_string($search_data['caption'], "caption", ""); $itemized_search_string['location'] = build_itemized_search_string($search_data['location'], "location", ""); - site_navigator_status("No matches found for $itemized_search_string", ""); + site_navigator_status($strings['search']['no_matches']." $itemized_search_string", ""); print "
    "; display_advanced_search_entry($database, $search_data, $search_operator); print "
    "; if ($ignored_keywords != "") { - print " 
    \n"; print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; - print "

    \n"; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; + print "\n"; } - print " 
    \n"; - print ""; site_footer($database); site_epilog($database); exit(); @@ -338,25 +284,20 @@ $itemized_search_string['keyword'] = build_itemized_search_string($search_dat $itemized_search_string['caption'] = build_itemized_search_string($search_data['caption'], "caption", ""); $itemized_search_string['location'] = build_itemized_search_string($search_data['location'], "location", ""); -site_navigator_status("Searched database for $itemized_search_string", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_matches)); +site_navigator_status($strings['search']['searched_for']." $itemized_search_string", $strings['search']['displaying'] ." ". display_photo_index_status($offset, $limit, $num_of_matches)); print "
    "; display_advanced_search_entry($database, $search_data, $search_operator); print "
    "; if ($ignored_keywords != "") { - print " 
    \n"; print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; print "
    \n"; } print " 
    \n"; -$arguments = "&search_type=$search_type&offset=$offset"; - -if ($order_by) { - $arguments = $arguments . "&order_by=$order_by"; -} +$arguments = "&offset=$offset"; $search_string = "identifier=".$search_data['identifier']. @@ -374,24 +315,18 @@ $search_string = $search_string_exp = str_replace(" ", "+", $search_string); -print ""; -print ""; - print "
    "; -print ""; -print ""; -print ""; +print ""; -if (($offset + $limit) > $num_of_matches) { - $items = $num_of_matches - $offset; -} -else { - $items = $limit; -} +display_photo_navigator("search.text.advanced.php?search_string=$search_string_exp$arguments", $offset, $limit, $num_of_matches); + +if ($po_options['photo_view'] == "slide") { + $checkboxes = display_photo_slides("search_advanced", $folder_id, $search_result, $offset, $items, true, true); + } else { + $checkboxes = display_photo_list("search_advanced", $folder_id, $search_result, $offset, $items); + } +display_photo_navigator("search.text.advanced.php?search_string=$search_string_exp$arguments", $offset, $limit, $num_of_matches); -display_photo_navigator("search_advanced", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); -$checkboxes = display_photo_slides("search_advanced", $po_user['id'], $po_user['type'], $folder_id, $search_result, $items, $num_of_columns, $popup_enable, $popup_delay, $shop_enable, true, $order_by); -display_photo_navigator("search_advanced", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); print " 
    \n"; $itemized_search_string['identifier'] = build_itemized_search_string($search_data['identifier'], "identifier", ""); @@ -401,61 +336,54 @@ $itemized_search_string['keyword'] = build_itemized_search_string($search_dat $itemized_search_string['caption'] = build_itemized_search_string($search_data['caption'], "caption", ""); $itemized_search_string['location'] = build_itemized_search_string($search_data['location'], "location", ""); -site_navigator_status("Searched database for $itemized_search_string", "Displaying photos " . display_photo_index_status($offset, $limit, $num_of_matches)); +site_navigator_status("Searched database for $itemized_search_string", $strings['search']['displaying'] . display_photo_index_status($offset, $limit, $num_of_matches)); -print ""; -print ""; -print "
    "; +print "
    "; -print ""; -print ""; -print ""; -if ($checkboxes > 0 && $po_user['id'] != FALSE) { - print ""; -} -print ""; -print "
    "; -display_order_by_combo_with_button($order_by); -print "  "; - display_printto(); - print "
    "; - -print "
    "; - -print ""; -print ""; - -if ($checkboxes > 0 && $po_user['id'] != FALSE) { - $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] order by date_of_creation desc"); - print ""; - - print ""; - - $album_all = pg_query($database, "select identifier, caption, parent_album from -album where users=$po_user[id] and type='u' order by date_of_creation desc"); - if (pg_num_rows($album_all) > 0) { - print ""; +if ($checkboxes) { + display_order_by_combo_with_button($order_by); + + if ($po_options['photo_view'] == 'slide') { + display_photos_per_page_combo('photos_per_page', $po_options['photos_per_page']); + } else { + display_photos_per_page_combo('rows_list_view', $po_options['rows_list_view']); } + } - print ""; - print ""; +print "
    "; - display_moveto_folder($folder_all, $folder_id, "goto"); - print "  "; - display_moveto_folder($folder_all, $folder_id, "moveto"); - print "  "; - display_linkto_album($album_all, $album_id); - print "  "; - print "\n"; - print "
    \n"; + +if ($checkboxes) { + display_list_slide_option($po_options['photo_view'], "search.text.advanced.php?$search_string$arguments"); + } + +if ($checkboxes > 0 && $po_user['id']) { + display_selectbutton(); + print $thm_elem['button.add.to.spool']; + print $thm_elem['button.bulk.update']; + } + +print "
    \n"; + +if ($checkboxes > 0 && $po_user['id']) { + $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and caption != 'Trash' order by date_of_creation desc"); + display_folder_actions($folder_all, $folder_id); + + $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and caption != 'Spool' order by date_of_creation desc"); + if (pg_num_rows($album_all) > 0) { + display_album_actions($album_all, $album_id); + } } -print "
    "; -print "
    "; +if ($po_user['id']) { + display_spool_actions($database, $po_user['id']); + } + +print ""; + print ""; print " 
    \n"; -print ""; + site_footer($database); site_epilog($database); ?> diff --git a/src/search.text.general.php b/src/search.text.general.php index cb05643..f8524ce 100644 --- a/src/search.text.general.php +++ b/src/search.text.general.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,35 +17,29 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/site.php"; include_once "include/orderby.php"; include_once "include/search.php"; -include_once "$theme/theme.php"; +; function display_general_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id) { - global $theme; + global $thm_elem; global $search_interface; global $site_url; - - print " 
    \n"; + global $strings; display_navigator_box_top($search_interface['text_general']['idx'], $search_interface, "100%"); - print " 
    "; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "
    "; + print ""; + print ""; print "
    "; print ""; print ""; - print "
    "; - print "

    Add sidebar panel

    "; - display_navigator_box_bottom("100%"); - - print " 
    \n"; } -$search_type_string = array ("Photos", "Folders/Albums", "Users"); +$folder_id = ""; +$album_id = ""; -$num_of_rows_l = $default_num_of_rows_in_list_view; -$num_of_rows = $default_num_of_rows_in_slide_view; -$num_of_columns = $default_num_of_columns; -$popup_enable = $default_popup_enable; -$popup_delay = $default_popup_delay; +$search_type = isset($_REQUEST['search_type']) ? $_REQUEST['search_type'] : 0; + +$search_string = isset($_REQUEST['search_string']) ? $_REQUEST['search_string'] : ""; -$search_type = $_REQUEST['search_type']; -$search_string = $_REQUEST['search_string']; $search_string = validate_search_string($search_string); -$current_user_id = $_REQUEST['current_user']; +$current_user_id = isset($_REQUEST['current_user']) ? $_REQUEST['current_user'] : $po_user['id']; + if (!$current_user_id || ($current_user_id=="all")) { $current_user_id = "null"; $sql_photo_users_string = " "; @@ -97,157 +84,127 @@ if (!$current_user_id || ($current_user_id=="all")) { $sql_album_users_string = " and album.users = $current_user_id "; } -$order_by = $_REQUEST['order_by']; -if (!$order_by) { - $order_by = $default_order_by; -} +$offset = pg_escape_string(isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0); -$sql_query_order_by_string = $order_by_string[$order_by][0]; +$order_by = $po_options['order_by']; $ignored_keywords = ""; $database = site_prolog(); -$offset = pg_escape_string($_REQUEST['offset']); -if (!$offset) { - $offset = 0; -} +$current_user_id = isset($_REQUEST['current_user']) ? $_REQUEST['current_user'] : $po_user['id']; -if ($po_user['id'] != FALSE) { - $preferences = pg_fetch_row(pg_query($database, " - select num_of_rows, num_of_columns, popup_enable, popup_delay, search_enable_stemming - from preferences - where preferences.identifier=$po_user[prefs]")); +$sql_query_order_by_string = $order_by_string[$order_by][0]; - $num_of_rows = $preferences[0]; - $num_of_columns = $preferences[1]; - $popup_enable = $preferences[2]; - $popup_delay = $preferences[3]; - $enable_stemming = $preferences[4]; -} +site_header($strings['generic']['search']); -site_header($page_width, "Search"); site_navigator(2); -$keywords = extract_keywords($search_string, $enable_stemming); +$keywords = extract_keywords($search_string, $po_options['search_enable_stemming'], $search_type); if (!$keywords) { - site_navigator_status("Type search string below:", ""); + site_navigator_status($strings['search']['string'], ""); print "
    "; display_general_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); print "
    "; if ($ignored_keywords != "") { print " 
    \n"; - print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; - print "

    \n"; + print "
    \n"; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; + print "
    \n"; } print " 
    \n"; - print ""; + site_footer($database); site_epilog($database); exit(); } +$num_of_matches = 0; + +if ($po_options['photo_view'] == "slide") { + $limit = $po_options['photos_per_page']; + } else { + $limit = $po_options['rows_list_view']; + } + switch ($search_type) { default: case 0: /* photo search */ - $status_string="Displaying photos"; + $status_string=$strings['search']['displaying']; - $sql_search_identifier = build_sql_search_string($keywords, "photo.identifier"); - $sql_search_title = build_sql_search_string($keywords, "photo.title"); - $sql_search_author = build_sql_search_string($keywords, "photo.author"); + $entries = array(); + $cols = array('photo.identifier', + 'photo.title', + 'photo.author', + 'photo.comments', + 'photo.caption', + 'view_location.place', + 'view_location.city', + 'view_location.state', + 'view_location.country', + 'photo_version.original_image_name'); - $sql_search_keyword = build_sql_search_string_keywords($keywords); - - $sql_search_caption = build_sql_search_string($keywords, "photo.caption"); - $sql_search_place = build_sql_search_string($keywords, "view_location.place"); - $sql_search_city = build_sql_search_string($keywords, "view_location.city"); - $sql_search_state = build_sql_search_string($keywords, "view_location.state"); - $sql_search_country = build_sql_search_string($keywords, "view_location.country"); - $sql_search_filename = build_sql_search_string($keywords, "photo_version.original_image_name"); - - $sql_search_combined = "(".$sql_search_identifier." OR ".$sql_search_title." OR ".$sql_search_author." OR ".$sql_search_keyword." OR ".$sql_search_caption." OR ".$sql_search_place." OR ".$sql_search_city." OR ".$sql_search_state." OR ".$sql_search_country." OR ". $sql_search_filename .")"; - -if ($po_user['type'] == $user_type['administrator']) { - $sql_query_access_rights_string = " true "; -} else if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "photo.access_rights = $access[public]"; -} else { - $sql_query_access_rights_string = "((photo.access_rights = $access[public]) or - (photo.access_rights = $access[protected] and $po_user[id] in (select client from client where users=photo.users)) or - (photo.users = $po_user[id]))"; -} - - - $num_of_matches_a = pg_fetch_row(pg_query($database, " - select count(photo.identifier) - from photo, folder, photo_dupe, photo_version, users, view_location - where photo.folder = folder.identifier - and photo.users = users.identifier - $sql_photo_users_string - and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 - and photo.location = view_location.identifier - and ($sql_search_combined) - and $sql_query_access_rights_string")); - - $num_of_matches = $num_of_matches_a[0]; - - $offset = $_REQUEST['offset']; - if (!$offset) { - $offset = 0; + foreach ($cols as $col) { + $entries[] = build_sql_search_string($keywords, $col); } + $entries[] = build_sql_search_string_keywords($keywords); - $limit = $num_of_rows * $num_of_columns; - if ($limit > $num_of_matches) { - $limit = $num_of_matches; - } + $sql_search_combined = implode(" OR ", $entries); - $search_query = " - select photo.identifier, photo_version.small_image_path, photo.caption, photo.date_of_exposure, photo_dupe.date_of_creation, - (select value from access_type where access_type.identifier=photo.access_rights) as access_rights, + $sql_query_access_rights_string = " can_access_photo(photo.identifier, $po_user[id], '{".$passwords."}')"; + + $search_query = " + select photo.identifier, photo.caption, photo.date_of_exposure, photo.date_added, + photo.access_rights, 11 - (select avg(rating.value) from rating where rating.photo=photo.identifier) as rating, views, - (0) as for_sale, - photo.title, photo.author, '' as keyword, + photo.title, photo.author, photo_version.original_image_name, photo.users, - view_location.place, view_location.country, view_location.city, view_location.state - from photo, folder, photo_dupe, photo_version, users, view_location + view_location.place, view_location.country, view_location.city, view_location.state, + photo_version.identifier as version + from photo, folder, photo_version, users, view_location where photo.folder = folder.identifier and photo.users = users.identifier $sql_photo_users_string and photo.identifier = photo_version.photo - and photo.identifier = photo_dupe.photo - and photo_version.master='t' - and photo_dupe.key = 1 and photo.location = view_location.identifier and ($sql_search_combined) and $sql_query_access_rights_string - order by $sql_query_order_by_string - offset $offset - limit $limit"; + order by $sql_query_order_by_string"; + // print "
    $search_query
    "; $search_result = pg_query($search_query); + $num_of_matches = pg_num_rows($search_result); + + /* Sanity checks */ + if ($limit > $num_of_matches) { + $limit = $num_of_matches; + } + while ($num_of_matches && $offset >= $num_of_matches) { + $offset -= $limit; + } + if ($offset < 0) { + $offset = 0; + } + if (($offset + $limit) > $num_of_matches) { + $items = $num_of_matches - $offset; + } else { + $items = $limit; + } + break; case 1: /* folder search */ - $status_string = "Folders and Albums found: "; + $status_string = $strings['search']['albums_found']; $sql_search_string = build_sql_search_string($keywords, "folder.caption"); $sql_search_string .= " OR " . build_sql_search_string($keywords, "folder.description"); - if ($po_user['type'] == $user_type['administrator']) { - $sql_query_access_rights_string = " true "; - } else if ($po_user['id'] == FALSE) { - $sql_query_access_rights_string = "access_rights = $access[public]"; - } - else { - $sql_query_access_rights_string = "(users = $po_user[id] or access_rights = $access[public])"; - } + $sql_query_access_rights_string = "can_access_folder(folder.identifier, $po_user[id], '{".$passwords."}')"; $search_result_f = pg_query($database, - "select caption, folder.identifier, date_of_creation, - first_name, last_name, users.identifier + "select caption, folder.identifier as folder_id, date_of_creation, + first_name, last_name, users.identifier as user_id, + count_subfolders_by_folder(folder.identifier, $po_user[id], '{".$passwords."}') as subs, + count_photos_by_folder(folder.identifier, $po_user[id], '{".$passwords."}') as photos from folder, users where ($sql_search_string) $sql_folder_users_string @@ -258,9 +215,13 @@ if ($po_user['type'] == $user_type['administrator']) { $sql_search_string = build_sql_search_string($keywords, "album.caption"); $sql_search_string .= " OR " . build_sql_search_string($keywords, "album.description"); + $sql_query_access_rights_string = "can_access_album(album.identifier, $po_user[id], '{".$passwords."}')"; + $search_result_a = pg_query($database, "select caption, album.identifier as album_id, date_of_creation, - first_name, last_name, users.identifier as user_id + first_name, last_name, users.identifier as user_id, + count_subalbums_by_album(album.identifier, $po_user[id], '{".$passwords."}') as subs, + count_photos_by_album(album.identifier, $po_user[id], '{".$passwords."}') as photos from album, users where ($sql_search_string) $sql_album_users_string @@ -273,7 +234,7 @@ if ($po_user['type'] == $user_type['administrator']) { break; case 2: /* user search */ - $status_string = "Displaying users"; + $status_string = $strings['search']['display_users']; $sql_search_string = "(". build_sql_search_string($keywords, "last_name")." OR ". @@ -281,153 +242,128 @@ if ($po_user['type'] == $user_type['administrator']) { build_sql_search_string($keywords, "username").")"; $search_result = pg_query($database, - "select identifier, first_name, last_name, member_since + "select identifier, first_name, last_name, member_since, type, hide from users where ($sql_search_string) - and type > $user_type[client] + and type > ".PO_USER_TYPE_CLIENT." order by last_name, first_name"); $num_of_matches = pg_num_rows($search_result); } if ($num_of_matches == 0) { $itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); - site_navigator_status("No matches found for $itemized_search_string", ""); + site_navigator_status($strings['search']['no_matches']." $itemized_search_string", ""); print "
    "; display_general_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); print "
    "; if ($ignored_keywords != "") { - print " 
    \n"; print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; - print "

    \n"; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; + print "\n"; } - print " 
    \n"; - print ""; + site_footer($database); site_epilog($database); exit(); } $itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); -site_navigator_status("Searched database for $itemized_search_string", $status_string. " " . display_photo_index_status($offset, $limit, $num_of_matches)); +site_navigator_status($strings['search']['searched_for']." $itemized_search_string", $status_string. " " . display_photo_index_status($offset, $limit, $num_of_matches)); print "
    "; display_general_search_entry($database, $search_string, $search_type, $search_type_string, $current_user_id); print "
    "; if ($ignored_keywords != "") { print " 
    \n"; print "
    \n"; - print "The following keywords were ignored: $ignored_keywords
    "; - print "Use quotation marks to force the search engine to include these keywords."; + print $strings['search']['ignore_keywords']." $ignored_keywords
    "; + print $strings['search']['use_quotes']; print "
    \n"; } -print " 
    \n"; switch ($search_type) { default: case 0: /* photo search */ - $arguments = "&search_type=$search_type&offset=$offset"; - - if ($order_by) { - $arguments = $arguments . "&order_by=$order_by"; - } + $arguments = "&search_type=$search_type"; $search_string_exp = str_replace(" ", "+", $search_string); - print ""; - print ""; - print "
    "; - print ""; print ""; - print ""; + + display_photo_navigator("search.text.general.php?search_string=$search_string_exp$arguments", $offset, $limit, $num_of_matches); - if (($offset + $limit) > $num_of_matches) { - $items = $num_of_matches - $offset; - } - else { - $items = $limit; + if ($po_options['photo_view'] == "slide") { + $checkboxes = display_photo_slides("search_general", $folder_id, $search_result, $offset, $items, true, true); + } else { + $checkboxes = display_photo_list("search_general", $folder_id, $search_result, $offset, $items); } + + display_photo_navigator("search.text.general.php?search_string=$search_string_exp$arguments", $offset, $limit, $num_of_matches); - display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); - $checkboxes = display_photo_slides("search_general", $po_user['id'], $po_user['type'], $folder_id, $search_result, $items, $num_of_columns, $popup_enable, $popup_delay, $shop_enable, true, $order_by); - display_photo_navigator("search_general", $arguments, $po_user['id'], $search_string_exp, $offset, $limit, $num_of_matches); - - print " 
    \n"; $itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); - site_navigator_status("Searched database for $itemized_search_string", $status_string ." " . display_photo_index_status($offset, $limit, $num_of_matches)); + site_navigator_status($strings['search']['searched_for'] ."$itemized_search_string", $status_string ." " . display_photo_index_status($offset, $limit, $num_of_matches)); - print ""; - print ""; - print "
    "; - - print ""; - print ""; - print ""; - if ($checkboxes > 0 && $po_user['id'] != FALSE) { - print ""; - } - print ""; - print "
    "; - display_order_by_combo_with_button($order_by); - print "  "; - display_printto(); - print "
    "; - - print "
    "; - - print ""; - print ""; - - if ($checkboxes > 0 && $po_user['id'] != FALSE) { - $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] order by date_of_creation desc"); - print ""; - - print ""; - - $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and type='u' order by date_of_creation desc"); - if (pg_num_rows($album_all) > 0) { - print ""; + print "
    "; + if ($checkboxes) { + display_order_by_combo_with_button($order_by); + + if ($po_options['photo_view'] == 'slide') { + display_photos_per_page_combo('photos_per_page', $po_options['photos_per_page']); + } else { + display_photos_per_page_combo('rows_list_view', $po_options['rows_list_view']); } - - print "
    "; } - print ""; - print "
    "; - display_moveto_folder($folder_all, $folder_id, "goto"); - print "  "; - display_moveto_folder($folder_all, $folder_id, "moveto"); - print "  "; - display_linkto_album($album_all, $album_id); - print "  "; - print "\n"; - print "
    "; - print "
    "; + print "
    \n"; + if ($checkboxes) { + display_list_slide_option($po_options['photo_view'], "search.text.general.php?search_type=$_REQUEST[search_type]&search_string=$_REQUEST[search_string]&offset=$offset"); + } + + if ($checkboxes > 0 && $po_user['id']) { + display_selectbutton(); + print $thm_elem['button.add.to.spool']; + print $thm_elem['button.bulk.update']; + } + + print "
    \n"; + +if ($checkboxes > 0 && $po_user['id']) { + $folder_all = pg_query($database, "select identifier, caption, parent_folder from folder where users=$po_user[id] and caption != 'Trash' order by date_of_creation desc"); + display_folder_actions($folder_all, $folder_id); + + $album_all = pg_query($database, "select identifier, caption, parent_album from album where users=$po_user[id] and caption != 'Spool' order by date_of_creation desc"); + if (pg_num_rows($album_all) > 0) { + display_album_actions($album_all, $album_id); + } + + } + if ($po_user['id']) { + display_spool_actions($database, $po_user['id']); + } + + print ""; print "
    "; + break; case 1: /* folder search */ - if (pg_num_rows($search_result_f) > 0) display_folder_with_users($database, $po_user['id'], $search_result_f); if (pg_num_rows($search_result_a) > 0) display_album_with_users($database, $po_user['id'], $search_result_a); - print " 
    \n"; $itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); - site_navigator_status("Searched database for $itemized_search_string", $status_string ." " . display_photo_index_status($offset, 0, $num_of_matches)); + + site_navigator_status($strings['search']['searched_for'] ." $itemized_search_string", $status_string ." " . display_photo_index_status($offset, 0, $num_of_matches)); break; case 2: /* user search */ display_users($database, $search_result, ""); - print " 
    \n"; $itemized_search_string = build_itemized_search_string($search_string, "search_string", "search_type=".$search_type."&"); - site_navigator_status("Searched database for $itemized_search_string", $status_string ." " . display_photo_index_status($offset, 0, $num_of_matches)); + site_navigator_status($strings['search']['searched_for'] ." $itemized_search_string", $status_string ." " . display_photo_index_status($offset, 0, $num_of_matches)); } -print " 
    \n"; -print ""; site_footer($database); site_epilog($database); ?> diff --git a/src/shop.category.add.2.php b/src/shop.category.add.2.php deleted file mode 100644 index 5f0cc7e..0000000 --- a/src/shop.category.add.2.php +++ /dev/null @@ -1,43 +0,0 @@ - diff --git a/src/shop.category.add.php b/src/shop.category.add.php deleted file mode 100644 index a67474e..0000000 --- a/src/shop.category.add.php +++ /dev/null @@ -1,65 +0,0 @@ -Users : My Profile : Add New Shop Category", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print ""; -print "
    Add New Shop Category
    Description
    "; - -print " 
    "; -print ""; -print "\"Cancel\"/"; -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.category.del.2.php b/src/shop.category.del.2.php deleted file mode 100644 index aad2506..0000000 --- a/src/shop.category.del.2.php +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/src/shop.category.del.php b/src/shop.category.del.php deleted file mode 100644 index e409736..0000000 --- a/src/shop.category.del.php +++ /dev/null @@ -1,89 +0,0 @@ -Users : My Profile : Delete Shop Category", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print ""; -print "
    Delete Shop Category
    Description
    $category_data[0]
    "; - -print " 
    "; -if ($number_of_references[0]==0) { - print ""; - print "\"Cancel\"/"; -} -else { - print "\"Back\"/\n"; -} -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.category.edit.2.php b/src/shop.category.edit.2.php deleted file mode 100644 index 672e668..0000000 --- a/src/shop.category.edit.2.php +++ /dev/null @@ -1,54 +0,0 @@ - diff --git a/src/shop.category.edit.php b/src/shop.category.edit.php deleted file mode 100644 index 60bc2ba..0000000 --- a/src/shop.category.edit.php +++ /dev/null @@ -1,80 +0,0 @@ -Users : My Profile : Edit Shop Category", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print ""; -print "
    Edit Shop Category
    Description
    "; - -print " 
    "; -print ""; -print "\"Cancel\"/"; -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.item.add.2.php b/src/shop.item.add.2.php deleted file mode 100644 index 26f076e..0000000 --- a/src/shop.item.add.2.php +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/src/shop.item.add.php b/src/shop.item.add.php deleted file mode 100644 index f9135cb..0000000 --- a/src/shop.item.add.php +++ /dev/null @@ -1,73 +0,0 @@ -Users : My Profile : Add New Shop Item", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -$all_shop_categories = pg_query($database, " - select identifier, caption - from shop_category - where users=$po_user[id]"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print ""; -print "
    Add New Shop Item
    DescriptionCategory
    "; -display_combo("category", $all_shop_categories, "", "", true); -print "
    "; - -print " 
    "; -print ""; -print "\"Cancel\"/"; -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.item.del.2.php b/src/shop.item.del.2.php deleted file mode 100644 index 2c9eec2..0000000 --- a/src/shop.item.del.2.php +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/src/shop.item.del.php b/src/shop.item.del.php deleted file mode 100644 index 5e6b2c6..0000000 --- a/src/shop.item.del.php +++ /dev/null @@ -1,97 +0,0 @@ -Users : My Profile : Delete Shop Item", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print "\n"; -print ""; -print "
    Delete Shop Item
    DescriptionDescriptionCreated
    $shop_item_data[0]$shop_item_data[1]".generate_date_html($shop_item_data[2], 'date', 1). "
    "; - -print " 
    "; -if ($number_of_references[0]==0) { - print ""; - print "\"Cancel\"/"; -} -else { - print "\"Back\"/\n"; -} -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.item.edit.2.php b/src/shop.item.edit.2.php deleted file mode 100644 index ca736a6..0000000 --- a/src/shop.item.edit.2.php +++ /dev/null @@ -1,58 +0,0 @@ - diff --git a/src/shop.item.edit.php b/src/shop.item.edit.php deleted file mode 100644 index 6fc3d5a..0000000 --- a/src/shop.item.edit.php +++ /dev/null @@ -1,93 +0,0 @@ -Users : My Profile : Edit Shop Item", ""); - -print " 
    "; -display_navigator_box_top($profile_data['shop']['idx'], $profile_data, "100%"); - -$all_shop_categories = pg_query($database, " - select identifier, caption - from shop_category - where users=$po_user[id]"); - -print " 
    "; -print "
    "; -print "\n"; -print "\n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; -print "\n"; -print ""; -print "
    Edit Shop Item
    DescriptionCategory
    "; -display_combo("category", $all_shop_categories, $shop_item_data[1], "", true); -print "
    "; - -print " 
    "; -print ""; -print "\"Cancel\"/"; -print "
    "; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.item.generator.add.2.php b/src/shop.item.generator.add.2.php deleted file mode 100644 index aaac474..0000000 --- a/src/shop.item.generator.add.2.php +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/src/shop.item.generator.add.php b/src/shop.item.generator.add.php deleted file mode 100644 index 809a66b..0000000 --- a/src/shop.item.generator.add.php +++ /dev/null @@ -1,115 +0,0 @@ -Users : My Tools : Add Shop Item Generator Rule", ""); - -print " 
    "; -display_navigator_box_top($tools_data['shop_item_maker']['idx'], $tools_data, "100%"); - - -print " 
    "; - -print "
    \n"; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; - -print ""; - -print ""; -print ""; -print ""; -print "
    CategoryItemCurrencyPriceRemark
    "; -print ""; -print ""; -display_combo('shop_item', $all_shop_items, "", "", TRUE); -print ""; -display_currency_combo('currency', $all_currencies, "", TRUE); -print "
    \n"; - -print " 
    \n"; -print "
    \n"; -print ""; -print "\"Cancel\"/"; -print "
    \n"; -print "
    "; - -print " 
    \n"; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); - - - -?> diff --git a/src/shop.item.generator.del.2.php b/src/shop.item.generator.del.2.php deleted file mode 100644 index 3b521f8..0000000 --- a/src/shop.item.generator.del.2.php +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/src/shop.item.generator.del.php b/src/shop.item.generator.del.php deleted file mode 100644 index fae1c5d..0000000 --- a/src/shop.item.generator.del.php +++ /dev/null @@ -1,97 +0,0 @@ -Users : My Tools : Delete Shop Item Generator Rule", ""); - -print " 
    "; -display_navigator_box_top($tools_data['shop_item_maker']['idx'], $tools_data, "100%"); - -print " 
    "; - -print "
    \n"; -print ""; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "
    CategoryItemCurrencyPriceRemark
    $user_rule[0]$user_rule[1]$user_rule[2]$user_rule[3]$user_rule[4]
    \n"; - -print " 
    \n"; -print "
    \n"; -print ""; -print "\"Cancel\"/"; -print "
    \n"; -print "
    "; - -print " 
    \n"; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); - -?> diff --git a/src/shop.item.generator.edit.2.php b/src/shop.item.generator.edit.2.php deleted file mode 100644 index 926f7c2..0000000 --- a/src/shop.item.generator.edit.2.php +++ /dev/null @@ -1,68 +0,0 @@ - diff --git a/src/shop.item.generator.edit.php b/src/shop.item.generator.edit.php deleted file mode 100644 index 43f880c..0000000 --- a/src/shop.item.generator.edit.php +++ /dev/null @@ -1,130 +0,0 @@ -Users : My Tools : Edit Shop Item Generator Rule", ""); - -print " 
    "; -display_navigator_box_top($tools_data['shop_item_maker']['idx'], $tools_data, "100%"); - -print " 
    "; - -print "
    \n"; -print ""; -print "\n"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; - -print ""; - -print ""; -print ""; -print ""; -print "
    Category>ItemCurrencyPriceRemark
    "; -print ""; -print ""; -display_combo('shop_item', $all_shop_items, $user_rule[0], "", TRUE); -print ""; -display_currency_combo('currency', $all_currencies, $user_rule[1], TRUE); -print "
    \n"; - -print " 
    \n"; -print "
    \n"; -print ""; -print "\"Cancel\"/"; -print "
    \n"; -print "
    "; - -print " 
    \n"; - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); - -?> diff --git a/src/shop.item.generator.php b/src/shop.item.generator.php deleted file mode 100644 index 1931427..0000000 --- a/src/shop.item.generator.php +++ /dev/null @@ -1,146 +0,0 @@ -Users : My Tools", ""); - -print " 
    "; -display_navigator_box_top($tools_data['shop_item_maker']['idx'], $tools_data, "100%"); - -if ($select_folder == "all") { - $sql_selector = " users = $po_user[id] "; -} else { - $sql_selector = " folder = $select_folder "; -} - -$num_of_photos = pg_fetch_row(pg_query($database, " - select count(identifier) from photo - where $sql_selector")); - -if ($_REQUEST['delete_all']) { - $items_to_be_removed = pg_query($database, " - select identifier, (photo_item.identifier in (select item from shop_order)) as refereced - from photo_item - where deleted = 'f' - and photo in (select identifier from photo where $sql_selector)"); - - for ($item = 0; $item < pg_num_rows($items_to_be_removed); $item++) { - $to_be_removed = pg_fetch_row($items_to_be_removed, $item); - if ($to_be_removed[1] == 't') { - /* we do not remove those shop items that are referenced in a transaction */ - $result = pg_query($database, "update photo_item set deleted='t' where identifier=$to_be_removed[0]"); - } else { - $result = pg_query($database, "delete from photo_item where identifier=$to_be_removed[0]"); - } - } -} else { - $all_rules = pg_query($database, " - select identifier, shop_item, price, currency, comment from shop_item_generator_rule - where users = $po_user[id]"); - - for ($rule_counter = 0; $rule_counter < pg_num_rows($all_rules); $rule_counter++) { - $rule_data = pg_fetch_row($all_rules, $rule_counter); - $rule = $_REQUEST["rule".$rule_data[0]]; - - if ($rule) { - $shop_item = $rule_data[1]; - $price = $rule_data[2]; - $currency = $rule_data[3]; - $comment = $rule_data[4]; - - /* check all photos for the given criteria and check if the photo has already a deleted photo_item */ - $all_selected_photos = pg_query($database, " - select photo.identifier, (select photo_item.identifier from photo_item where photo_item.photo=photo.identifier and deleted='t' and shop_item=$shop_item) as already_defined - from photo - where $sql_selector"); - - - for ($photo_counter = 0; $photo_counter < pg_num_rows($all_selected_photos); $photo_counter++) { - $selected_photo = pg_fetch_row($all_selected_photos, $photo_counter); - /* if there is a deleted photo_item for the photo, for the given shop_item, undelete it */ - if ($selected_photo[1]) { - $result = pg_query($database, " - update photo_item - set deleted='f', - price=$price, - currency=$currency, - comment = '$comment', - date_of_last_edit = now() - where photo=$selected_photo[0]"); - } - else { - /* if there is no deleted photo_item for the given shop_item, create a new shop_item */ - $result = pg_query($database, " - insert into photo_item (identifier, photo, shop_item, price, currency, comment, deleted, date_of_creation, date_of_last_edit) - values (nextval('photo_item_id_sequence') as identifier, - $selected_photo[0] as photo, - $shop_item as shop_item, - $price as price, - $currency as currency, - '$comment' as comment, - 'f' as deleted, - now() as date_of_creation, - now() as date_of_last_edit)"); - } - } - } - } -} - -print "

    Updated ".$num_of_photos[0]." photos.

    "; - -print "

    "; -print ""; -print "

    "; - - -display_navigator_box_bottom("100%"); -print " 
    "; - -site_footer($database); -site_epilog($database); - - - -?> diff --git a/src/shop.order.edit.php b/src/shop.order.edit.php deleted file mode 100644 index 8d727d2..0000000 --- a/src/shop.order.edit.php +++ /dev/null @@ -1,86 +0,0 @@ - diff --git a/src/shop.order.php b/src/shop.order.php deleted file mode 100644 index 4a1ee05..0000000 --- a/src/shop.order.php +++ /dev/null @@ -1,207 +0,0 @@ -Users : My Date Book : Unknown order identifier", ""); - site_footer($database); - site_epilog($database); - exit(); -} - -$order_kind = pg_fetch_row($photos_in_order, 0); -if ($order_kind[14] == 1) { - $order_kind = "Pending Orders"; -} -else { - $order_kind = "Shipments"; -} - -site_header($page_width, "Store : Order"); -site_navigator(8); -site_navigator_status("Users : My Date Book : $order_kind : Order $transaction_id", ""); -print " 
    \n"; - - -if ($po_user['type'] > $user_type['client']) { - print "
    "; - print ""; -} - -$previous_transaction_id = 0; -$number_of_items = pg_num_rows($photos_in_order); -for ($item = 0; $item < $number_of_items; $item++) { - $photo = pg_fetch_row($photos_in_order, $item); - - if ($photo[12] != $previous_transaction_id) { - $previous_transaction_id = $photo[12]; - $display_transaction_id = str_pad($photo[12], 6, "0", STR_PAD_LEFT); - - if ($item > 0) { - print "
    Total: $total_items$total_price $currency
    "; - print " 
    \n"; - } - else { - print "\n"; - print ""; - print ""; - if ($photo[13]) { - print ""; - } - print ""; - print "
    Order  $display_transaction_id
    Client  $photo[10], $photo[11]
    Message  $photo[13]
    Status  "; - if ($po_user['type'] > $user_type['client']) { - $all_transaction_states = pg_query($database, "select identifier, value from shop_transaction_status order by identifier"); - display_combo("status", $all_transaction_states, $photo[14], "", 1); - } - else { - $transaction_state = pg_fetch_row(pg_query($database, "select value from shop_transaction_status where identifier=$photo[14]")); - print $transaction_state[0]; - } - print "
    \n"; - print " 
    \n"; - } - - $total_price = 0; - $total_items = 0; - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } - - $on_mouse_over ="t_w=10; ttWidth=10; return escape('"; - if (!$photo[3]) - $photo[3] = "No Title"; - print "$photo[3]\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print ""; - print ""; - $subtotal = $photo[2] * $photo[7]; - print ""; - print "\n"; - $currency = $photo[6]; - $total_price += $subtotal; - $total_items += $photo[2]; -} - -print ""; -print ""; -print ""; -print ""; -print ""; -print "
    Item List
    TitleCategoryItemDetailsDownload CounterDownload Expiry DatePricePiecesSubtotal
    $photo[4]$photo[5]$photo[8]"; - if ($po_user['type'] > $user_type['client']) { - print ""; - } - else { - print ($photo[15] == 3000) ? "Unlimited" : $photo[15]; - } - print "\n"; - if ($po_user['type'] > $user_type['client']) { - display_date_input_form("expiry_timestamp".$photo[0], $photo[16]); - } - else { - print generate_date_html($photo[16], 'date', 1); - } - print "$photo[7] $photo[6]$photo[2]$subtotal $photo[6]
    Total: $total_items$total_price $currency
    "; -print " 
    \n"; - -if ($po_user['type'] > $user_type['client']) { - print "
    "; - print "\n"; - print "
    "; - print ""; -} -print ""; -site_footer($database); -site_epilog($database); -?> diff --git a/src/shop.php b/src/shop.php deleted file mode 100644 index 953b91e..0000000 --- a/src/shop.php +++ /dev/null @@ -1,99 +0,0 @@ -Users : My Store", ""); -print " 
    \n"; - -for ($transaction_status = 1; $transaction_status < 3; $transaction_status++) { - $all_pending_transactions = pg_query($database, " - select distinct on (shop_transaction.identifier) - shop_transaction.identifier, - (select sum(shop_order.pieces*photo_item.price) from shop_order, photo_item where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier) as total_price, - (select sum(pieces) from shop_order where shop_order.transaction=shop_transaction.identifier) as items, - (select alpha_code from shop_order, photo_item, currency where shop_order.transaction=shop_transaction.identifier and shop_order.item=photo_item.identifier and photo_item.currency=currency.identifier limit 1) as total_price, - client, first_name, last_name, - shop_transaction.remark - from shop_transaction, shop_order, users - where shop_order.client=users.identifier - and shop_transaction.status=$transaction_status - and shop_transaction.identifier=shop_order.transaction - order by shop_transaction.identifier desc"); - - if (pg_num_rows($all_pending_transactions) == 0) { - if ($transaction_status == 1) { - print "
    There are no pending transactions.
    "; - } - continue; - } - - print "\n"; - switch ($transaction_status) { - case 1: - print ""; - break; - case 2: - print ""; - break; - } - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - - for ($item = 0; $item < pg_num_rows($all_pending_transactions); $item++) { - $transaction = pg_fetch_row($all_pending_transactions, $item); - $display_transaction_id = str_pad($transaction[0], 6, "0", STR_PAD_LEFT); - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } - - print "
    Pending Orders
    Shipped
    OrderValuePiecesClientClient's Remark
    $display_transaction_id$transaction[3] $transaction[1]$transaction[2]$transaction[6], $transaction[5]$transaction[7]
    "; - print " 
    \n"; -} - - -print ""; -site_footer($database); -site_epilog($database); -?> diff --git a/src/sql/po.data.02.05.sql b/src/sql/po.data.02.05.sql index 1976bce..5b5cb75 100644 --- a/src/sql/po.data.02.05.sql +++ b/src/sql/po.data.02.05.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.05.to.02.06.sql b/src/sql/po.data.02.05.to.02.06.sql index be81515..652610a 100644 --- a/src/sql/po.data.02.05.to.02.06.sql +++ b/src/sql/po.data.02.05.to.02.06.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.06.to.02.07.sql b/src/sql/po.data.02.06.to.02.07.sql index 943320b..ef365d1 100644 --- a/src/sql/po.data.02.06.to.02.07.sql +++ b/src/sql/po.data.02.06.to.02.07.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.07.to.02.08.sql b/src/sql/po.data.02.07.to.02.08.sql index f2108c6..f984082 100644 --- a/src/sql/po.data.02.07.to.02.08.sql +++ b/src/sql/po.data.02.07.to.02.08.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.08.to.02.09.sql b/src/sql/po.data.02.08.to.02.09.sql index 3c12245..31a02b2 100644 --- a/src/sql/po.data.02.08.to.02.09.sql +++ b/src/sql/po.data.02.08.to.02.09.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.09.to.02.10.sql b/src/sql/po.data.02.09.to.02.10.sql index 3e55a58..895e3bd 100644 --- a/src/sql/po.data.02.09.to.02.10.sql +++ b/src/sql/po.data.02.09.to.02.10.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.10.to.02.11.sql b/src/sql/po.data.02.10.to.02.11.sql index 01f54c4..51d0c6a 100644 --- a/src/sql/po.data.02.10.to.02.11.sql +++ b/src/sql/po.data.02.10.to.02.11.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.11.to.02.12.sql b/src/sql/po.data.02.11.to.02.12.sql index 97f304b..2000d16 100644 --- a/src/sql/po.data.02.11.to.02.12.sql +++ b/src/sql/po.data.02.11.to.02.12.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.12.to.02.13.sql b/src/sql/po.data.02.12.to.02.13.sql index 23915a8..36a163d 100644 --- a/src/sql/po.data.02.12.to.02.13.sql +++ b/src/sql/po.data.02.12.to.02.13.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.13.to.02.14.sql b/src/sql/po.data.02.13.to.02.14.sql index c6ab001..db879b4 100644 --- a/src/sql/po.data.02.13.to.02.14.sql +++ b/src/sql/po.data.02.13.to.02.14.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.14.to.02.15.sql b/src/sql/po.data.02.14.to.02.15.sql index 8b67dea..b98ceb7 100644 --- a/src/sql/po.data.02.14.to.02.15.sql +++ b/src/sql/po.data.02.14.to.02.15.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.15.to.02.16.sql b/src/sql/po.data.02.15.to.02.16.sql index 58f5c68..e5b895f 100644 --- a/src/sql/po.data.02.15.to.02.16.sql +++ b/src/sql/po.data.02.15.to.02.16.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.16.to.02.17.sql b/src/sql/po.data.02.16.to.02.17.sql index 2082154..64ef745 100644 --- a/src/sql/po.data.02.16.to.02.17.sql +++ b/src/sql/po.data.02.16.to.02.17.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.17.to.02.18.sql b/src/sql/po.data.02.17.to.02.18.sql index 3e061d5..9b3043e 100644 --- a/src/sql/po.data.02.17.to.02.18.sql +++ b/src/sql/po.data.02.17.to.02.18.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.18.to.02.19.sql b/src/sql/po.data.02.18.to.02.19.sql index 62a2773..1aea1f9 100644 --- a/src/sql/po.data.02.18.to.02.19.sql +++ b/src/sql/po.data.02.18.to.02.19.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.19.to.02.20.sql b/src/sql/po.data.02.19.to.02.20.sql index 3e2d8e5..62c2bfa 100644 --- a/src/sql/po.data.02.19.to.02.20.sql +++ b/src/sql/po.data.02.19.to.02.20.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.20.to.02.21.sql b/src/sql/po.data.02.20.to.02.21.sql index 188fe10..ca69394 100644 --- a/src/sql/po.data.02.20.to.02.21.sql +++ b/src/sql/po.data.02.20.to.02.21.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.21.to.02.22.sql b/src/sql/po.data.02.21.to.02.22.sql index 931a628..7e13ab8 100644 --- a/src/sql/po.data.02.21.to.02.22.sql +++ b/src/sql/po.data.02.21.to.02.22.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.22.to.02.23.sql b/src/sql/po.data.02.22.to.02.23.sql index 9165068..5a7e269 100644 --- a/src/sql/po.data.02.22.to.02.23.sql +++ b/src/sql/po.data.02.22.to.02.23.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.23.to.02.24.sql b/src/sql/po.data.02.23.to.02.24.sql index 6259447..872daf8 100644 --- a/src/sql/po.data.02.23.to.02.24.sql +++ b/src/sql/po.data.02.23.to.02.24.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.24.to.02.25.sql b/src/sql/po.data.02.24.to.02.25.sql index dd02f0f..8337918 100644 --- a/src/sql/po.data.02.24.to.02.25.sql +++ b/src/sql/po.data.02.24.to.02.25.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.25.to.02.26.sql b/src/sql/po.data.02.25.to.02.26.sql index 5f94315..5f7a947 100644 --- a/src/sql/po.data.02.25.to.02.26.sql +++ b/src/sql/po.data.02.25.to.02.26.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.26.to.02.27.sql b/src/sql/po.data.02.26.to.02.27.sql index 46a9c08..2e8ed04 100644 --- a/src/sql/po.data.02.26.to.02.27.sql +++ b/src/sql/po.data.02.26.to.02.27.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.27.to.02.28.sql b/src/sql/po.data.02.27.to.02.28.sql index 340f80f..421d9b7 100644 --- a/src/sql/po.data.02.27.to.02.28.sql +++ b/src/sql/po.data.02.27.to.02.28.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.28.to.02.29.sql b/src/sql/po.data.02.28.to.02.29.sql index 7297705..3ce8bcd 100644 --- a/src/sql/po.data.02.28.to.02.29.sql +++ b/src/sql/po.data.02.28.to.02.29.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.29.to.02.30.sql b/src/sql/po.data.02.29.to.02.30.sql index b857d32..a2c02c9 100644 --- a/src/sql/po.data.02.29.to.02.30.sql +++ b/src/sql/po.data.02.29.to.02.30.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.30.to.02.31.sql b/src/sql/po.data.02.30.to.02.31.sql index 9dd7504..0ec8e13 100644 --- a/src/sql/po.data.02.30.to.02.31.sql +++ b/src/sql/po.data.02.30.to.02.31.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.31.to.02.32.sql b/src/sql/po.data.02.31.to.02.32.sql index 069c26a..ff0a62e 100644 --- a/src/sql/po.data.02.31.to.02.32.sql +++ b/src/sql/po.data.02.31.to.02.32.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.data.02.32.to.02.33.sql b/src/sql/po.data.02.32.to.02.33.sql index 092e105..b39c336 100644 --- a/src/sql/po.data.02.32.to.02.33.sql +++ b/src/sql/po.data.02.32.to.02.33.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.05.sql b/src/sql/po.db.02.05.sql index 817377e..3a495c9 100644 --- a/src/sql/po.db.02.05.sql +++ b/src/sql/po.db.02.05.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.05.to.02.06.sql b/src/sql/po.db.02.05.to.02.06.sql index aab2726..44129bd 100644 --- a/src/sql/po.db.02.05.to.02.06.sql +++ b/src/sql/po.db.02.05.to.02.06.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.06.to.02.07.sql b/src/sql/po.db.02.06.to.02.07.sql index 4673395..a5c9fbb 100644 --- a/src/sql/po.db.02.06.to.02.07.sql +++ b/src/sql/po.db.02.06.to.02.07.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.07.to.02.08.sql b/src/sql/po.db.02.07.to.02.08.sql index df0a509..4180bfb 100644 --- a/src/sql/po.db.02.07.to.02.08.sql +++ b/src/sql/po.db.02.07.to.02.08.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.08.to.02.09.sql b/src/sql/po.db.02.08.to.02.09.sql index af9ef3e..ae8c978 100644 --- a/src/sql/po.db.02.08.to.02.09.sql +++ b/src/sql/po.db.02.08.to.02.09.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.09.to.02.10.sql b/src/sql/po.db.02.09.to.02.10.sql index fc48e4c..6595501 100644 --- a/src/sql/po.db.02.09.to.02.10.sql +++ b/src/sql/po.db.02.09.to.02.10.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.10.to.02.11.sql b/src/sql/po.db.02.10.to.02.11.sql index 25f3ee6..d15181b 100644 --- a/src/sql/po.db.02.10.to.02.11.sql +++ b/src/sql/po.db.02.10.to.02.11.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.11.to.02.12.sql b/src/sql/po.db.02.11.to.02.12.sql index 1cb025d..6f257b6 100644 --- a/src/sql/po.db.02.11.to.02.12.sql +++ b/src/sql/po.db.02.11.to.02.12.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.12.to.02.13.sql b/src/sql/po.db.02.12.to.02.13.sql index c4ba47d..6593513 100644 --- a/src/sql/po.db.02.12.to.02.13.sql +++ b/src/sql/po.db.02.12.to.02.13.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.13.to.02.14.sql b/src/sql/po.db.02.13.to.02.14.sql index b5b7241..0cd1108 100644 --- a/src/sql/po.db.02.13.to.02.14.sql +++ b/src/sql/po.db.02.13.to.02.14.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.14.to.02.15.sql b/src/sql/po.db.02.14.to.02.15.sql index 0049d72..9c9ee61 100644 --- a/src/sql/po.db.02.14.to.02.15.sql +++ b/src/sql/po.db.02.14.to.02.15.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.15.to.02.16.sql b/src/sql/po.db.02.15.to.02.16.sql index 635fdf7..dfeb453 100644 --- a/src/sql/po.db.02.15.to.02.16.sql +++ b/src/sql/po.db.02.15.to.02.16.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.16.to.02.17.sql b/src/sql/po.db.02.16.to.02.17.sql index b56170d..8cb3f47 100644 --- a/src/sql/po.db.02.16.to.02.17.sql +++ b/src/sql/po.db.02.16.to.02.17.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.17.to.02.18.sql b/src/sql/po.db.02.17.to.02.18.sql index 0ad897a..9f75e91 100644 --- a/src/sql/po.db.02.17.to.02.18.sql +++ b/src/sql/po.db.02.17.to.02.18.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.18.to.02.19.sql b/src/sql/po.db.02.18.to.02.19.sql index 6500dbe..d0ce0ca 100644 --- a/src/sql/po.db.02.18.to.02.19.sql +++ b/src/sql/po.db.02.18.to.02.19.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.19.to.02.20.sql b/src/sql/po.db.02.19.to.02.20.sql index 50718c1..962f624 100644 --- a/src/sql/po.db.02.19.to.02.20.sql +++ b/src/sql/po.db.02.19.to.02.20.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.20.to.02.21.sql b/src/sql/po.db.02.20.to.02.21.sql index 9412e95..9af3321 100644 --- a/src/sql/po.db.02.20.to.02.21.sql +++ b/src/sql/po.db.02.20.to.02.21.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.21.to.02.22.sql b/src/sql/po.db.02.21.to.02.22.sql index e345060..99227a3 100644 --- a/src/sql/po.db.02.21.to.02.22.sql +++ b/src/sql/po.db.02.21.to.02.22.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.22.to.02.23.sql b/src/sql/po.db.02.22.to.02.23.sql index 1163434..e999258 100644 --- a/src/sql/po.db.02.22.to.02.23.sql +++ b/src/sql/po.db.02.22.to.02.23.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.23.to.02.24.sql b/src/sql/po.db.02.23.to.02.24.sql index 14db87e..14dfaf8 100644 --- a/src/sql/po.db.02.23.to.02.24.sql +++ b/src/sql/po.db.02.23.to.02.24.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.24.to.02.25.sql b/src/sql/po.db.02.24.to.02.25.sql index 360e338..cd279ea 100644 --- a/src/sql/po.db.02.24.to.02.25.sql +++ b/src/sql/po.db.02.24.to.02.25.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.25.to.02.26.sql b/src/sql/po.db.02.25.to.02.26.sql index b10cebb..f8a90ce 100644 --- a/src/sql/po.db.02.25.to.02.26.sql +++ b/src/sql/po.db.02.25.to.02.26.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.26.to.02.27.sql b/src/sql/po.db.02.26.to.02.27.sql index 86e1127..17a2334 100644 --- a/src/sql/po.db.02.26.to.02.27.sql +++ b/src/sql/po.db.02.26.to.02.27.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.27.to.02.28.sql b/src/sql/po.db.02.27.to.02.28.sql index 86e1127..17a2334 100644 --- a/src/sql/po.db.02.27.to.02.28.sql +++ b/src/sql/po.db.02.27.to.02.28.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.28.to.02.29.sql b/src/sql/po.db.02.28.to.02.29.sql index adfc18f..1435771 100644 --- a/src/sql/po.db.02.28.to.02.29.sql +++ b/src/sql/po.db.02.28.to.02.29.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.29.to.02.30.sql b/src/sql/po.db.02.29.to.02.30.sql index 339c59d..5ea9e63 100644 --- a/src/sql/po.db.02.29.to.02.30.sql +++ b/src/sql/po.db.02.29.to.02.30.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.30.to.02.31.sql b/src/sql/po.db.02.30.to.02.31.sql index 3a6a368..567d679 100644 --- a/src/sql/po.db.02.30.to.02.31.sql +++ b/src/sql/po.db.02.30.to.02.31.sql @@ -3,7 +3,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/sql/po.db.02.31.to.02.32.sql b/src/sql/po.db.02.31.to.02.32.sql index 8ed4625..c18ed2c 100644 --- a/src/sql/po.db.02.31.to.02.32.sql +++ b/src/sql/po.db.02.31.to.02.32.sql @@ -2,7 +2,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, @@ -63,8 +63,7 @@ create view view_lens as and lens.access_rights = access_type.identifier order by manufacturer.name, s_min_focal_length, model, variation; -create view view_lens_type as select lens_type.identifier, -manufacturer.name, +create view view_lens_type as select lens_type.identifier, manufacturer.name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length, manufacturer.url from lens_type, manufacturer, diff --git a/src/sql/po.db.02.32.to.02.33.sql b/src/sql/po.db.02.32.to.02.33.sql index 25eba7c..33d12b5 100644 --- a/src/sql/po.db.02.32.to.02.33.sql +++ b/src/sql/po.db.02.32.to.02.33.sql @@ -2,7 +2,7 @@ -- 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 +-- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This program is distributed in the hope that it will be useful, diff --git a/src/subscription.add.2.php b/src/subscription.add.2.php index 4050891..3a1c074 100644 --- a/src/subscription.add.2.php +++ b/src/subscription.add.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,31 +17,42 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/mail.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; $user_id = pg_escape_string($_REQUEST['user']); +$type = $_REQUEST['type']; + if ($user_id == ""){ - header("location: login.php"); + site_push_error($strings['errors']['no_user']); + header("Location: login.php"); exit(); } +$database = site_prolog(PO_USER_TYPE_CLIENT); -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$result = pg_query($database, "insert into client (identifier, users, client, date_of_creation, status, trusted) +if ($type == "sub") { + $result = pg_query($database, "insert into client (identifier, users, client, date_of_creation, status, trusted) + values (nextval('client_id_sequence'), '$po_user[id]', '$user_id', now(), 2, 't')"); + } else { + $result = pg_query($database, "insert into client (identifier, users, client, date_of_creation, status, trusted) values (nextval('client_id_sequence'), '$user_id', '$po_user[id]', now(), 1, 'f')"); -send_new_client_notification($database, $user_id, $po_user['id']); + if ($result) { + send_new_client_notification($database, $user_id, $po_user['id']); + } + } + +if ($result == FALSE) { + site_push_error($strings['errors']['db_insert_failed']); + } site_epilog($database); -header("location: user.php?user=$user_id"); +if ($type == "sub") { + header("Location: user.php?user=$po_user[id]"); + } else { + header("Location: user.php?user=$user_id"); + } ?> diff --git a/src/subscription.add.php b/src/subscription.add.php index 436feb5..8da357b 100644 --- a/src/subscription.add.php +++ b/src/subscription.add.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,55 +17,64 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; +$database = site_prolog(PO_USER_TYPE_CLIENT); + $user_id = pg_escape_string($_REQUEST['user']); - if ($user_id == ""){ - header("location: login.php"); - exit(); -} - -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} - -$client = pg_fetch_row(pg_query($database, "select identifier from client where users='$user_id' and client='$po_user[id]' and status=2")); - -if ($client != "") { - site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['no_user']); + header("Location: login.php"); exit(); } $user_data = pg_fetch_row(pg_query($database, "select first_name, last_name, identifier from users where identifier=$user_id")); -site_header($page_width, "Add Subscription"); +$make_client_request = isset($_REQUEST['make_client']); + +if (!$make_client_request) { + $client = pg_fetch_row(pg_query($database, "select identifier from client where users='$user_id' and client='$po_user[id]' and status=2")); + + if ($client != "") { + site_epilog($database); + site_push_error($strings['errors']['not_client']); + header("Location: login.php"); + exit(); + } + } + +site_header($strings['users']['add_subscription']); site_navigator(1); $user_display_string = sprintf("%s, %s", $user_data[1], $user_data[0]); -site_navigator_status("Users : $user_display_string : Subscription", ""); -print " 
    \n"; -print ""; -print "
    \n"; -print "By confirming your subscription, you will disclose the following contact information to $user_display_string.\n"; -print "
    \n"; -print " 
    \n"; -display_contact_info($database, $po_user['id'], $po_user['id'], $display_header); -print " 
    \n"; -print ""; -print "
    \n"; -print "\"Confirm"; -print "\"Cancel\"/\n"; -print "
    \n"; -print " 
    \n"; +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_display_string : ".$strings['users']['add_subscription'], ""); + +if ($make_client_request) { + display_contact_info($database, $user_id); + } else { + display_contact_info($database, $po_user['id']); + } + +if (!$make_client_request) { + print "

    "; + print $strings['users']['confirm_subscription'] . " $user_display_string.\n"; + print "

    "; + } + +print "
    "; +if ($make_client_request) { + print "\n"; + } +print "\n"; +print "
    "; +print $thm_elem['button.confirm.subscription']; +print $thm_elem['button.cancel']; +print ""; + +print "
    "; + site_footer($database); site_epilog($database); ?> diff --git a/src/subscription.del.php b/src/subscription.del.php index 11a1b65..d7a2445 100644 --- a/src/subscription.del.php +++ b/src/subscription.del.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,88 +17,58 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_CLIENT); $client_id=pg_escape_string($_REQUEST['client']); /* Ensure the user owns it !*/ -if ($po_user['type'] < $user_type['administrator']) { +if ($po_user['type'] < PO_USER_TYPE_USER) { $result = pg_fetch_row(pg_query($database, "select count(identifier) from client where identifier=$client_id and users=$po_user[id]")); if ($result[0] == 0) { site_epilog($database); - header("location: login.php"); + site_push_error($strings['errors']['not_owner']); + header("Location: login.php"); exit(); } } $result = pg_fetch_row(pg_query($database, " select identifier, users, last_name, first_name, date_of_creation, value from view_users_subscribed_to where identifier=$client_id")); -$number_of_references = pg_fetch_row(pg_query($database, "select count(submission.identifier) - from submission, photo_dupe, photo - where photo_dupe.photo = photo.identifier - and photo_dupe.identifier = submission.photo_dupe - and photo.users = $result[1] - and submission.users = $po_user[id]")); - -site_header($page_width, "Delete Subscription"); +site_header($strings['users']['del_subscription']); site_navigator(8); -switch ($number_of_references[0]) { - case 0: - site_navigator_status("Users : My Date Book : Delete subscription", ""); - break; - case 1: - site_navigator_status("Users : My Date Book : There is 1 reference to this subscription. Cannot remove.", ""); - break; - default: - site_navigator_status("Users : My Date Book : There are $number_of_references[0] references to this subscription. Cannot remove.", ""); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.datebook.php", $strings['generic']['my_datebook'])." : ".$strings['users']['del_subscription'], ""); -print " 
    \n"; print "
    "; -print "\n"; -print ""; -print ""; -print "
    "; print ""; -print "\n"; -print "\n"; -print "\n"; +print "
    Delete Subscription
    \n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "\n"; print "\n"; print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print emit_td($strings['generic'][$client_status[$result[5]]]); print "\n"; print "
    ".$strings['users']['del_subscription']."
    UserSubscription DateStatus".$strings['generic']['user']."".$strings['users']['date_subscription']."".$strings['generic']['status']."
    $result[2], $result[3]".generate_date_html($result[4], 'date', 1). "$result[5]$result[2], $result[3]".emit_date_html($result[4], 'date'). "
    \n"; -print "
     
    "; -if ($number_of_references[0] == 0) { - print "\n"; - print "\"Cancel\"/"; -} -else { - print "\"Back\"/\n"; -} -print "
    \n"; +print "
    "; +print $thm_elem['button.confirm.delete']; +print $thm_elem['button.cancel']; +print "
    "; + print "
    "; site_footer($database); site_epilog($database); diff --git a/src/themes/aqua/background.png b/src/themes/aqua/background.png deleted file mode 100644 index f91777b256b2c27c740d47a270b7704e7aeec6c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1SHiab83P(>5jgR3=A9lx&I`x0{NT;9+AZi z4BSE>%y{W;-5;PJdx@v7EBggT4pDZNlK(AJfkN`0E{-7;bCUo3|8LLCv!UkC55a>! ke|}bPI(+aT<8uZEw-p=@t?pDW11e?kboFyt=akR{0O&?3LI3~& diff --git a/src/themes/aqua/button.add.client.gif b/src/themes/aqua/button.add.client.gif deleted file mode 100644 index 0b76b3964b407e07571e5b62eca9946fdffb0d0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1149 zcmV-@1cLiVNk%w1VO#(i0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;!NI{(Q&WnHilwEc z!otGr?Cj6a&!nWJ0001ph=`-3qf$~*ZfRePfu!UYS7Tof`Wp# zx3^ACPMn;aX=!QQ-Q61-8yp-Q+}zyn@9+5d_S@Ur%gf7?laq~&jcsjhSXfw4P*B3c z!2kdMA^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i003M782|tV{y=~*5D*xT$fR<~ zY&xINBT+~d3TVOfDY`1;Rie6d)3c1w+wr*zfqfe$Vgw|9uS#3=0Yg z2y6on5D^j+6BLn>la!T~mzbHFn-dZq5DxY zuI$#t6c-K!0v!q-1(3z5{vSYu_*cwAF%cmA86+@b#6p53K$K_*A|XNo2p1wC$nl{^ zh5n3Dm{7ojf(`->Bs1}#LWKh^W1awUqC$t8I6I&Kk@IH$iWEINr~rW?XVIMb_+QU_8(NWfA8Q@C|uZdt)-^D>oSH35XI2Oz}g3KvFAxiQ1Scrnu@3mGgvzh!FIFI>BI z)mD(6hU`+DpN78TsS2>q3@i5QQyPJZC^E9eR?Uc;`L+ND_7qt~iFtrj(E zm&aXz$a{UebH#9d1BWb`GSk9-3oG{C{5taJF5Q2%t~U0I`)=RISIu5FjIzC1HJ)%R zy~LDuXd(FBe$7EQA6azKha77O;)WK3aVaL43?TlDHq`;*1sB)KpjfL=XTwZ6Onw diff --git a/src/themes/aqua/button.add.duplicate.gif b/src/themes/aqua/button.add.duplicate.gif deleted file mode 100644 index 1ac978bdd317af227e21184a88a4c363f24c46c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1495 zcmdUsiC5AG0Dyn|0733R)PypXY1yw2${#+e5KDfm zEVF>apdb%KTB6Vx6c#6MY*M^vZfRAj)M_jWgGN~*pFr`1ZA22us{ifZ1KNKEhlX_{ zqx~czm4Jr=ux%K!70lXzG$NO*7gm-QR!z$vO)HBVzzoS`IK|+v>vf@W5dcAvZ4b~0 zLIVvYf$txkcWD(OS%7}hzE>XD*uAII8%YZb(GIGFR2VkVxVZeK|3`O(|) zIHpNDio%Cg1*F@AfXzhu5^F5}M}&0=t6n=lR-3PLis^cyS9P2wyPf)u8DCn9CX?Ax z%_iudG10sJOsfO^^KBFvCoUhQHld7f6C)0l0pKi@5T~>^CrA;Kbp{2p=h8tT*=*^0 zGNYtf6ax2H?zG{$ix@n#8zx(q^SoKFM$4Py;?edD8#Y=l(WoyV&OIMNddUY$uH)NX zhHjGUnF+UvE^h!yX&ZI(z%-ji!(jGTSS*3gBgA!`UfGaNnM7_%hHy=7F0{d=J z9vzRV{OT^r%pOg*U<&Po7dsmUAop1uj>VoiM?S)iMo?prT?9U2iI5Lq?Q^72b@U#7 zFs3hPmW%oGDs!H-)KAzAj{J1e{rOTlx&||7jjoZ|_jB+Hq&6-z34fq*97@p!r~<#~ zQuJcFc1B1odd^)V%im;924lcpQX6KEnenLx0lUV5$fjHCn#^K% zkfcp#v^1(|T!dUi-FRjJ;jHb4_ zn+ByRULf>$Y%vsm-sgj9LKN;H!1*6aTc1pc5{1Ts?0(3^&$%8Sr^OMG!3c(>=r5eJ z6Z7M&^d;^J=sf3j6nN#U48;d+=sy{h2+s{;yUm4-g)Y}E1%AI#&+!A4iwqdf7OGm& z{!qKQI(*5nx#p_R^$dc^dyg?x%fq?%2 DXCo_K diff --git a/src/themes/aqua/button.add.folder.gif b/src/themes/aqua/button.add.folder.gif deleted file mode 100644 index ff70274713f91161a0ca9ee0a14ab6c000599abc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1144 zcmV-;1c&=aNk%w1VOszh0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;!NI{(Q&WnHilwEc z92^|%?Cj6a&%nUI0001PZf>Kaqf$~*h=_>W+uP#e;%RAVot>RePfwhjoVT~PG&D3$ zPEOF!(B0kLf`Wn@8yno*-0$!2H#ax<`1Z@o%cP{FlarH;jg4(>ZCF@XP*70+|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i003J682|tV{y=~*5D*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V5CA*0E)XIB diff --git a/src/themes/aqua/button.add.gif b/src/themes/aqua/button.add.gif deleted file mode 100644 index 76293ec370f36ea7373e2f3f11ab0edbeaee5e93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 751 zcmV_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?ChkZq@$yw z0002u;^H(kG|Q<8yjh9X`Gy#-QC?zPENPCw}OI#ii(OiH#cr>Zrt4592^`{ zQc|U*rSI?W!NI}!`1Z@o%afCnjg5_MZEaXsSWr+<|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0EC2ui04o3)000L5K!6Ys2ndeIq;knb7KcN@fKV_TuGp-0%RLwhgn=N6NGKKz zMZ>{vyWenkL%~=m5{NNi@PI@l6B87JgoTEOh!YYO5Dx=H1Q84t6a*KS2$%?)7nz-# znVz7W1OyZo3=srI1r8XMp9ll8va__a1Gc!eqZg(a4h2UU3Ka!{rIw`*8p*z;7aJVP z&>S13gA)Z63K>TSsT~g%76;_y9vmO!8SU*L9PaKMAQ|Qs4;_*R-w+An63&tPz#)VP zf#*hWKxl!(h;tJ1C4j(BzySy(03sAoLPQ9GBSLT(IWXPGhvXu5AVINT#s>ifhA=_U z#6Wcx6rwvp&LRH9d@L(od>NBmNOUF0aWuNn#KN8^EvO9YQe3%nB|?fI_TMxO3-@!HL2P z2_5n>=#b%p9w^9>2Y|Ai2owPbGIU^2k(dk$$+K(UE+oJN8QqSw(tw@2dGi!B1QQS- z(hLv@&dX1p0K^Pc%lSBI06SwPV88$X diff --git a/src/themes/aqua/button.add.manufacturer.gif b/src/themes/aqua/button.add.manufacturer.gif deleted file mode 100644 index 0749c6b9a513d6d55f6ac0c492ffbacdaec54aeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1457 zcmV;i1y1@$Nk%w1VTu450Hpu`|NsB~{{H>_{rLF!_4W1e@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0v^P`i%a^#0B^zi0{rd^1HXXpyD$)JFv07FaBsuB^ov0-6*D|f#pRxh zzzj2t`v9$pKCl7G6YwH}4Ec)SuD~K_u&=!?AxzA_?_LaazZ&bjuE;(^{DQp(4}Gt? z^uh}#uvkVaT%<;i=(Pc2w_u6zZ0u#(|z{-e1k+HjKF|n z8sR`e@z6&v{q)pVZ~gVyvpxY1R0&{C2hV3O{`lmVZ@%gjba0UXvgA-g0_Vps|NQYM zP(lvl1VD)cI_$th4*(3H00&6G0vhmu2uz>?7s$W{4v+^s(18P90RTEYAOa3(1Ozt7 z!47)xgCGo{2uDc55}NRYDCA%s91wvANMa6J-~tOX L5QjL#AOHY6>>|Zv diff --git a/src/themes/aqua/button.add.photos.gif b/src/themes/aqua/button.add.photos.gif deleted file mode 100644 index f7dd2de6ad1344a378f7c4e8bb3421930a1b9153..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmV;11bO>MNk%w1VO;_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;!NI{(Q&WnHic(Ti z!otGr?Cj6a&%nUI0001PZf>KaqZ}L@q@<+c;^Jv(X`P*&Pft&roSe6}w=^^~PEJnH z(9qr8-GYLG8yg#?rKQ~5-0$!2H#ax<`1Z@o%afCnjg5_MZEaXsSWr+^?c_2bzY-w(EAWLa;04x9i003P882|tV{y=~*5D*xT$fR<~ zY&xG%BvD8e3TVOfGK?1;Rie6d)3c1w+wr*zfqfe$Vgw|9%Y$3=0Yg z2y6on5D^j+6BLn>la!T~mzbHFn-mig9uN-$00a>X6%+&(s|c(JuNJMbudTAQu(q_Z zuDHCmzPq!%!nGCz1QZnv5d;AR4i~Ay0|?Xu)YaM72pAdK)EXMr)!5_P8yw%X=H=?z z5 zjK?BPDBwXs2LT6`m3UC0!hx1BO+c*Bp{C6aCqUe+i2}v`&YU(Qpa2n}1BeqhVbZ+G zgU8ONHeq&nS>ZtmQwLB&NU&0ZQkWoQrueENg-oR>QmkO{H3bN?AjZb6kV1vh7Ij;; zSg~Sk%d#z$md&eFg4F~NvL1loqU+ZRFW$mf0kZ{+7i!pDS2i8{6_{7N`qbb&*(W;|E^9t}p=^MBoZ0h||>!!)^r@pkca&`5Hz` z5X~#Bt)Rkq%i+&Ko1iQkL|M&`D;O@pTQOtDcg>g2J$JeN)X`hIjR?cU@%qq(C*4~C zR#0DfEr77X3&-ikUT=&2=8{q}LB|4i*ZDQwbolHvQ?mc1s)h+3nrMR+*Ajw z*Pd@HO$bweX_+M-2)RYJ+;Q85mR^X+kq4P|1zrXdcms}Qz*JQ|=$;EK9ne8b2*dz_ z47ZFB0s%y7V=5Hco#0Td9k=B~Tez$>pcSa1zC2n74yNqI5;2*0B$@Gfdhj;p!3c=_w4h}KnE@K&_vJSKm-pU(#928nBnx( YP)F?r8fsj-Z4psqt@YMiLlFc3JIUc6RsaA1 diff --git a/src/themes/aqua/button.apply.changes.gif b/src/themes/aqua/button.apply.changes.gif deleted file mode 100644 index 0cdeab66a2b13a10c566fd03c19079d611962627..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1547 zcmdUsi$Bu|0Kk8H|I8jT>I?=5> zin|ZH`=p6to~={atw=JI8nLo=dl7SYf5v_PgYWmdci-1kpM=xEW?&cqHa0d42E+RL zx?Zo>Xf#Tt^23J@OG`^Soo;e+vZJG;rKLq65OjBU_xAS6g($Z4-fC}?>}_tkV2st9UT>kL;wIV7>tI71|pHz*x2~y&70)pw|7}t+4AzTUaytOUPVMi zw6?Ym4-e1H&5ewVR903#eE2XuJ-w!;rlO)EH8qt^r_*ROTU*%Z}U|0V$_0}J3lAkgBH((`5I7b+^Nc-7T~oJ&v`9DzjD z)nEUGf8%CDV^j03CL{t5gL0st5!x7o#^O5fb#>o=(9mPW4MPrQ7MqnEZZ(?d@ zZf-F){$k?gN7taq~}h;wp!L<6@T7XrVNT9JB4zEo2s#gG1a7$rU~yK$#qHjHd63Sd?bj`+p^i)*Rzt9sElPd*TZt z+YUdArtp@39BVT$9i`>;)F3tvO$Dj6>On4=fCKDef>IE;QuA%GbrXZAVcxg7fu}gZ zMHVhD)Z)iSKFto)+ZV{mo&7MgC7hy&Cu%Pow@JrubA$ijjyEU%Jjb zidfymJ-U$T?(6drKYyNb%vg~ZcrC@Pv?vbYA>#L^jC3eDXjhSmJ=?=oEK7E039ZlK z?T>7XsBfUQW)ZC2)~#vvT7n zd2*+Vq*cPi4@F*E;wndEo!?-B4FD{)CkUeaXE z%}U)1$mIxDAciCsRe@x(pbx1|@qqb}23ahOgG8x7sl`e*IIRlCV@dJXsyZd|XKqkZ zX*nDG`1GXPU8_4`!Sv~%Z6Ad@#5_i?l_WeEd)bdQe;dyfDB&*+UDxp7TZYFBQY!V0 z?3k190NJ$4r_pQE3k}MpuEt5D0ZH(BxU5K?Eg6!G%bY9 z1HcH(l*+`w*L2Gp8vuq6ph87ZYb6WzTM^7b2_)Tzn%4#v!JR|<(9r_(*7zZrWfZtC PTgfG3Zh*F?AmIBCu4*yi diff --git a/src/themes/aqua/button.back.gif b/src/themes/aqua/button.back.gif deleted file mode 100644 index a98090804fe1b2bc631efbb5116bbf07692bef9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 850 zcmV-Y1Fif=Nk%w1VKV?30Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^)_Q&Yjg!R+kp zQc_X?001{PH>0DY;^N{?PEOF!&>I^Yot>SWoScG!g15J~-QC?ZG&E^xY24i0ii(OH z92}*krSI?WZfZCF@XP*70+|NsC0|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i001)p82|tV{y=~*5D*xT$fR<~ zL=uHi!GKUO9In``cFXNv4F$qLAQT`HiUmW_aJb*_xO^^eC>RSx0zn=;AQ2K16BLDp zhlq)aixd+Q6%Y>t00a>X78C>*n+Ti;pBJ5>pPizlpr)r61OyZo3=sqY1r8XQqX+}J zxw^Z$1HHezq!}8&y`Zfa4g~@m3Ka!}tePAh*Bu@XtE}9b)ZPRgAKlcgjRh478v+Ng zAP*K62l62y@**K48~pwL|NJ_T07%cm0}z%Dw1bcUo&Ry9Wq+LsiK7biW4A3hM;NkAPSWWT|RgS zQJ=jLIyG8|2{Nj@kS0b*wQv%|(UmPj*&03=m*e=;4R{Q7{8D0#rf+2?>CxVucBi zKtn76_~AeeHr#;2jX370Ex48M!ALq5j?<0 c8B5kUX|J3L>76951J diff --git a/src/themes/aqua/button.cancel.gif b/src/themes/aqua/button.cancel.gif deleted file mode 100644 index 6792cd3143552244371222ac7ecb8ce9b9f25158..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 937 zcmV;a16KS;Nk%w1VLt#F0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+K!osDcrBhQ= z!NI}o?ChhXqZ}L@Qc_X?0083R;SXfX{Q2+n`|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002J#82|tV{y=~*5D*xT$fR<~ zY%Ynys9-=S7!KI1cFXO0zgt6rFc1g@h=gLnP&6FyxO`5p+wYEsg0WB}5M~1p5D^j+ z6BLPxi;RtqkC2NK5)}{+0{{dO3>Fjw7oZ5C2&5OHrlg{$simu_rlYN)7X$1v4-Hy)AY#*j ze-IJ~l(5hOi4!GDjzB?z#0Y{ZR9IL+V#UG~EJ?_;FruaYO@bkI5|qF(0fdhSAg~x& zGQ`i67Eqv2K_Wy73n~(}SP|l7iV!VStgwl2g^Cj>fC{xhR0NBoAeTNMxiBbHsCKg| zv|yJ+i$Ygw@}=DlST-Z}tkEP&s0go4j;z+giKhgApeaE+;cb|tEkVnc4tUPxNE7pZL!v)hU za{&c0NFV}d42aOd1!hE{F1w- z@|gn;H#l$!0BAfAfdhL$;OL`}Mk?u~lves^8xBP903c^jVFehVhAOHSVvvzzk3~44 L>Z+`&8Uz44Rb!}- diff --git a/src/themes/aqua/button.clear.gif b/src/themes/aqua/button.clear.gif deleted file mode 100644 index b55adf783504b9e51c8b348b4f3f2c1b998610f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 863 zcmV-l1EBmzNk%w1VKo350Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+K!osDcrBYH- z?Ck8LqoW)g8~^|Sq@<+c;^Mcrw@yw@xVX5Tot+yS8=Rb+f`Wo+X=%{V(B0kLG&D59 z!NJ_z+=_~dH#ax$@9%DIZr$D6%gf7?laq~&jcsjhSXfw4P*DH>|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i001=r82|tV{y=~*5D*xT$fR<~ zR1$?y!GKUO9In``cFXN%4F$qLAQT`HiUmW_aJb*_xO`4;C>RSx0zn=;AQ2K16BLDp zhlq)ai-r>t6%Y>t00a>X78C>*n+Ti;pBJ5>pPizlpr)jw7X$zqY9A0XJQt>@_G>#h_N z1r-V$0tc}n4;B^&`63@9`T0mh;P9aYhl2}VZ}v{C^`cCXd#9Ei4!P3l(fJC#R(HE@{M3o z)Fs3fGAY`8fN>{CofdfV?3pydcxqtzyl3;%nOzDZu7a0axxwoiEEq zr8!mK&J=4uejQ2Jf(jNUmfHQ7ui=5bW~JWq8#eHXeq#Zq==xPDV+#fvKGb`51-=6u z@*!yPVS@`&FIph@paFpg7_Sk$-T>p%h7Y?poQe@6^@GTKA8;T(fs_Vtygzu5Oh8%5n=%IoW&>)WhwSb`EhbX4FAq5~n zBS0lJl#qamG^Ut92{p(PfFBOna03oG1S#Z@L>6h}kwfBegAEQy0)QD0MBu<35L9X9 pl~`t}<(5^h;Xnir@KMGTRd`|MnP!3^hJgwe(Zri@#+gJA06XoojEVpN diff --git a/src/themes/aqua/button.confirm.delete.gif b/src/themes/aqua/button.confirm.delete.gif deleted file mode 100644 index b8b3aa0710ba4573978356031435ea69bdc04400..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1192 zcmV;Z1Xue_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;?Ck8%&(EZ!q@$yw z0002Mz`)|-;xsfg8yg!=PEJoxPlJPlH8nM9X=%{V(43r{-QC@Sf`YfVx22_}ii(Qd z+}v(%ZZ|hK92^`{Qc~~l@4>;r`1tnA%gd9KlbxNNjg5_MZEaXsSWr+^?c_2bzY-w(EAWLa;04x9i003$L82|tV{y=~*5D*xT$fR<~ zY&xIND3U0w3I>FN;lS;Bzu>TVOfH+xTtk5{5C{c`gkr%^G#vQ6e$Vgw|A2vlfei`_ z3knGcZUYYx5fT#<6qJ>gmzbHFo1C4VpA-`k84wQx00a>X6%+&(uL!URvlg+nv$3|g zw7R&pvb?~$!oRn{#<{S!$iD;x6cr2+1OWvO7p=wv2-^eO+~D4`-Q3^d<>TSs+0_4=kN2r&le5_0vHMz1(Te)a^^t8h7AcU2vq2d;Xr{JIB;;#VWGu_7ZDKXaBzc$ ziw_Az#7F>_z=sZpDZA*1q?+Xt*U<$L6hq1Khym&FAzD9I;}?#_xi7TpdJb^|7UE=L`GzebwCMl-hsc zkrvs1<&jodX4)l4T3a0B-lx2a}Z$V0`7trB{PrD><3Zz^i&sdeJH zOAMTH;KHA5z96fdhPKdW3@;2i0}OK7%4@E(Od!Jnl3Iy^1O`xmOrFd(I|~iYI!l8E z-k39Ow9HOhEiT$_o9!|b$RL3S6Effd2DcWtQN_CKRuRCu?*b67yFFZp!3c=_w4h}KnE@K&_oxlvkp1n;D9Lr!0|u? z4j2N#)Kph(_0?Est@YMickOi@4n*+4B5z=!1sZ6lt@heysKJK1?iL}%+;rD%_uT>n G0RTHk!c6l3 diff --git a/src/themes/aqua/button.confirm.purchase.gif b/src/themes/aqua/button.confirm.purchase.gif deleted file mode 100644 index 70c8f79a5bcb374e367be96e5eee25b7d1a2c272..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1359 zcmV-V1+e-@Nk%w1VS@k}0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;Z*Ok^008Xl?9b27 zZf^?c_2bzY-w(EAWLa;04x9i004sk82|tV{y=~*5D*xT$fR<~ zY&xINsB}scS_K0_!Eoq$zu>TVOfH+x=rr0;APfXT0V1JTFcb}ke$Vgw|A2vlgM@{K zfei`_3knGca03qz5fT#<6quQso1C4VpP-?lqokq}5*rW?0{{dO3>6dv7PJVp2)Guu zy12Hxy}7@=y0^i_zsJP9#>>97yv@qM(!FO9680qfp>+ikx_3QlS{{3|50C;cTzIN(zWxL>@fB+2&HWavoZ5B2T9WrRl-~gM2 ziXS~zoaG=x0uLWPSQN=}C4!Y8HfnSMVx`THy+(da39={tft(gY-W-W(LV*nmGzd7r zEyRNg6%IhHAVS0ls3b~6(7?5;*RL8%WZ-JT1lY40rdH@GwrhkP8MdNTdv?c;xl_NY zrQ20%g$E&C9ast>fl~=;M`Sp$S1k$@Q%OLUOripb6d6#EIKh~+){v*p&OP;UY^;wPO8}ez!r%iCR2){jLPX=y8EmUQtytsc z712-FuE3%>>gXa^WEc^CylK=^6*E@N{q||`nz7ryY8!io6;Qjgs9O2-3fraGhC&J= zum;s|A*f&+Vah##*i_LyN7YpokOx|HB#nGK2Jh56k^BYPy$2;D{^q`(@J?%5cj zS|l1d+G&s}#sY8q*%qdbfbqznQ&CMN0)9f;SV56i!p5PJLB5${kWM1`9F=;$S!a^a zu^1(nvWX`GWZn5j+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a)&V(9O)v(y6=`4g~@j3K<29yQ8}r8yxK% z4!gSX=<@UN9UbZR`uYg`^^7JI$e;j&fCIlgJg89N0K*C&K7e2tLPP`%7&B_zh+)JC zj3h{K9Ess!g^>;`Jn-=8z(EKJ6iP4&fw}pO$A*PCu>uINXj6m;fmd(bvJ-3GT^hFphleLrm<&8P>(;J` z-%dqq(k$!Ea`V2``xB0&dKKx*J_2uD?n#>;;jnh4-H&bDOmf~g$GJjK(K-XixsW3&;kM* zbbv|+8zA5U2d!}60s;sgXdphQEQksR9k{Ro3kLqKz#)JL42ZxBFO>AaZ`(b90f`d? z$O48Pu)xBAD|FCK2LM`l;e#!_2;qbVD##!LF!%=ph5Xsr4h*eK@WKHn+J}M!22gNJ zfG)ToA}n0C5<{0@dTGHk+Qe`rmlja)f&?CD$AAYISb&BUbk-?F0CeIBfSz{_k*A-1 z?rA5W0H}e12MoA0jtmqG>gc18Mk=YJ0Zbr6K>`djL!*;+>glJ0QZNHJ0(e4$2nm3y z>Z*_?AOa1*1W#n@^>g%t-_IiU2H8`+Ip$I$>fdhU(;Ow)|Ml0>K r)K+V4v~M^N!2^S&QNz?dLVV)B diff --git a/src/themes/aqua/button.convert.gif b/src/themes/aqua/button.convert.gif deleted file mode 100644 index 2a4456376ac0ef727bf20862e67c79b8b9690748..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 976 zcmV;>126nXNk%w1VMPEL0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;?Ck8%&(CgdZZ|hK z0002u;^G?{8-jv@(9qDGot?P2xK2(^x3{;PoSbQCY2Dr3G&D5a+}s=-9KpfCQc_Z- zrKO6Bitq35`1tnA%gdysq?41Ajg5_MZEaXsSWr+<|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002b*82|tV{y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_T-1SC)=yi0vCV0vIu3yngW4@`(o-l21U8GiM7Ksa(*0ft@#k6)(cqMj&JO_wX-jPl$1V z`RbPv3{cpWs=j^uGcF7Rh9Lj`UKdahg9IL|#()PIT;N9(3^Eu%6b}*sp%4*LXhsGe zFu;;DG<8tW;D;cFC?bRt(BRGyw`kzuh%B}UA_W>eBR~L`)KEeKF6QWB0wvTy%Y%S8 zV8abKkajMDRc#Qcz*V Y7i_lKW*B2EI7AUn)M@9POauV{JJ5-Z4FCWD diff --git a/src/themes/aqua/button.deselect.all.gif b/src/themes/aqua/button.deselect.all.gif deleted file mode 100644 index 249df8b7701143b72e118ccb9fe03afedcb11b92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1154 zcmV-|1bzEQNk%w1VO;_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;ii(Qt?Cj6a&r(uS z0000tH#eiBqvGP?PEJnH(9mgVX`P*&Pft%98ykXxg15J~-QC@soSZZ?G~C?W92^|M z!NG2BZl$HA@9*#U`1Ylxq@<*zz`(%E%gd9KlZ}myZEbB>SXfX{P>6_#H8nN=|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i003P882|tV{y=~*5D*xT$fR<~ zY&xG%BvD8e3TVOfGK?1;Rie6d)3c1w+wr*zfqfe$Vgw|9%Y$3=0Yg z2y6on5D^j+6BLn>la!T~mzbHFn-mig8W0Zy00a>X6%+&(s|c(JuNJMbudTAQu(q_Z zuDHCmzPq!%!nGCz1QZnv5d;AR4i~Ay0|?Xu)YaM7uh!Mr+TO1i7}nU`+uYjb>gnSH z1qz}BP!lds06pOnLO5n{7e z2*JSwhrDeA1C;a74C9<>9_*n4=4^(UHky+Y`q*(#1>xRb%hih^dbjZLhjP7cF*<&PF!zu ztzJP3R(U%&V#SPqXAO=#g?X8KIk096LWTJhDrmpF`<{Gq>U!UDIBS>qbGO_<<=t*5 ztt8%K`yp2rbRYmETvrP^H(z{Zov<8!dNo)U2X6lT$J7?x>6RF825JYC3a~|&A6H%( zm*Gp-&9xtfK=Fl|c@3WBp#e=jg`0?qrF1|BDk0Dj0xN95!V0gj&;gT3BG3Yq7_cBE z2QJXUWJfM=(1Ml-u&}`^D=^8y3%4Lp%qm*f2r@2S+UN#0iXG12X|A;=m0!_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?Cik6z@ww1 zq@<((0083R;!aLZ8yg#)ot?P2xKB?{oSdB9-Q6@aG||NsC0|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0EC2ui04V?&000L5K!6Ys2ndeIq;km=6o*5>fKV_TuGp-0yEPOD13?s#P%IdV zhGWfcyWi`Eg0WB}5MsdK0f|T^6BL4jgoTEM6A~2=4+BI55eya-1Q(VFmk62{n4FrJ zou3y31QZqw5d=mB4j7c42m`UPva_-SwYRjJr5FwcM;Qtg1%adl8XL+S%9Y0)9Rvv+ z$D^eb69p9t8Ak`G9uF242NoY7AL;298SNP%9T_4c?I95vR zg9J%*K-hr|@X(V_za7k&|RaDm{(i@6V`iY@UVgW(AX zRDhg3IC6&;dH)8^OL)SI1Bu^Wlwg1Yth=aFtG+w*x@YO+<(Q z1Q|RqpePIm1>DG!D-SRM2Dc-uI2>0_y*dRBznnmd5h6kL@3<3$h>=S79tSdJ(5S(_ zz5Dm@;nSEQ!$Bk82p&XmFb9JF{{RLkAb@B%5Wxd@L@`AbTr}t)7G8j1+Ym)GVc~^M H1OWg$N(EB@ diff --git a/src/themes/aqua/button.empty.trash.gif b/src/themes/aqua/button.empty.trash.gif deleted file mode 100644 index fffa9ab8d6a6a2dd9641c96dff258452981d60a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1158 zcmV;11bO>MNk%w1VPgOp0Hpu`|NsB~{{H>_{rLF!_4W1e@b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644 index a9ef21c48783ed3c6dad5357a5b24d74f3b707e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmV+|1Je9QNk%w1VKM+20Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?ChhXqokyy z+uPd!0083R;!aLZ8yg#ff`YiXxKB?{ot>SWoSfa=-83{b(9qCnX=%5&w^CA4rKP38 z!NJ_z-0$!2ii(OiH#hkB_RGu5larH;jg4(>ZCF@XP*70+|NsC0|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i001%o82|tV{y=~*5D*xT$fR<~ zJQ9Ua!GKUO9In``cFXM^3RSx0zn=;AQ2K16BLDp zhlq)aixUzR5Dx(S;KQ6$%*w2d^Fv z78VEaA0Qw0A0Z+m86+JU{1N^M97r&OJPQvzR64K@LIQUZ;LZCWv7&_%9pH5+VXNiky?ZUgHsv@KX^MCn0A@T8fdh9y r;Npug#wg>AGp^x41P}00#uQa};p2~7fFZ_r;}y}wkw_+KL=XTwI-Pu5 diff --git a/src/themes/aqua/button.goto.gif b/src/themes/aqua/button.goto.gif deleted file mode 100644 index 63084d22d0d0d1e3edd4a0e84c1f7a0f92851ade..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 833 zcmV-H1HSx6Nk%w1VKx960Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+K!osDcrR?nN zqobo792`Zo$F9+}zyn@9+5d_RGu5q@<*ilaq~&jcsjhSXfw4P*DH>|NsC0|NsC0|NsC0 z|NsC0EC2ui05$*_000L5K!7k15Ezfhq;knz5`|E~fKV_TuGp-0%k63n1;Rie6d)3c z1w+wrxZm)&d`@>X6pV!;fglea5D^j+6BL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f>jM%o- zlFyg3eO$sgX0{x*a!?`p`Qq$&FKd2Y!L@YRBTZUod|mrjvnhfDm0b1%irtD`cV2zz zm9*YU8ff8OY=zAxA64w32Ovr+sPIvcdri2n>V(jjXib0xdOWz{(38z|iB5>L8%wjWHrHn@LU}!vRyCxPk-* zQ1ApYC65gh&?@Y(#1?DpvBL&1fejuBu*?m?A}j5* z)KW{q4etmb3JxG7Q0=$ihMNEgI3N=MB2o_Ipu-M4wCnD>@Ww0ey!6&_|R4n**PA!}HH1sND;tntQPn1KeVs1^am$Rw9+ J^2k8|06Y3G{NDfo diff --git a/src/themes/aqua/button.goto.this.week.gif b/src/themes/aqua/button.goto.this.week.gif deleted file mode 100644 index b9bf42d0cfa09dd949d7617941d77dcc4453e40b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1103 zcmV-V1hD%@Nk%w1VOIbd0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;!otE*Qc~>f?9b27 z0001^qoZzaZZ|hK;^N|*oSdDVow&HT8yg#ff`U#?PPezWX=!ORG&IoA(B0kLrKP2c zii#W@9KpfC+}zyn@9(9hr1<#u-QC-yq@>Hs%afCnjg5_MZEaXsSWr+<|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i0037282|tV{y=~*5D*xT$fR<~ zY&xG#qHro05DJEacFXO0zu>TV3^o)91A$P0NGKKzMZ-a_+wb_ie$VgQ8wv~y3JC~m z0}l`p5)%^?kC2g)la!T~mzb0j5*rW?0{{dO3>6dv7N`iR2&@*WuB@uBv8}VQuB)}V zv%9#kx~c>O6cr2+1OWvO7pA`h2+sr0&cBd=U1Jg9CyHP8DP*j6;oy!zfHBut9+a z0SAnMcu=9jfs!aga44xkg9r{SV`>;NLZ;1@FKfEQ7Xc^!iIylU+_cF-#Lbfx9)K8i z03?J2BP9e)xsqyy5++KNJaM8VRud?uR^Xtuf{7FyLX<>dqNED8C{&<4VInKav=vmS z4Jtut0tihHKv)q~Yz37;Rh})up=;f%BtnE}J2eGm5+y8`jJ(;zWD;A+h9D7ktXi;B z`+`^j*eT%$QpF;sN*V9t$A+)2Ji*~DXx=4fSHNtRGHUiV%p6F_ok})E+5TmjKtf%0 zX~ltM1a@^`ZzyS?g?p_D_L_WC3HRMy_64N^X=47J#b5;~pw(3c;Y~#xf1jabfP+b` z7U5td9iTx;w6MTIjW@Ew0SgESgaD7MeBc2sthAs|EJnHz%L^O~$qEbz9P~mgQ0@qW z3mL=`Lku%M@ScPZXt3o3MB0dBEIam?B?nl#-~yCHGU+4&OlBF2jrrJ_fj&H@2?GZ$ z#4S!!7urTGLM9yG=G~CcogQT>)zyb?!#$stW7Elm_1RzAn z00Et+NhMtFF1;Dl4zN;tDGp8i2q+Q}Nh9!LQ6V>+G}8M*C|3 z6WHL90Ls*`thC&A>n*nw)ZmT)qTC=t0$$&yt8Tgph;YL(0U+W44ms$s!@c@(75P<`MK;ZDh5JxQW#1vO-@x>Cy;Xnir7_x>HSdby|$RwA{ Vg&AnPI%^S7wCwWBFh3Cl06R7c2iyPv diff --git a/src/themes/aqua/button.goto.today.gif b/src/themes/aqua/button.goto.today.gif deleted file mode 100644 index 554a2c84e8095a47b7548d316939662807af9afb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 903 zcmV;219<#LNk%w1VLSjC0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+J!NF2eQta&P z0001^qod;D;+&kEot>S~(9mgVX--Z~x3{<5-Q61-8#FXDf`WpjrKQ~5+&4Ej92^{q zii+>=?{02x`1tnY{pE$H&K2RaK;^?c_2bzY-w(EAWLa;04x9i002Ay82|tV{y=~*5D*xT$fR<~ zY$A!ms9-=S7!KI1cFXO0zgRt00a>X78C>*p9r7`qZgs2qoJm#q^hW;qO2DL1QZqw5d;AR z4j7%M2m`>t!NS1<#KyxJ8pXq-$;Ydqv=|Nr0viey1&6bq9N^*L9ka6K-m)DWp6Ko8 z-n5Yg6$%>y2e%#%78VEm{~tK;+d#0OL4zPT99+oIpM?h=G#$7HA%Q*#|1t*5Xd#4% z5h6nT3o)XkKno;3jv&GBgGhcPSpJg$F#&{$2OyNV$g$=A$$utBd>CPZUkDB&KAboy zBIyVYB0>H;@gXBk4<&9=-1z`w&y4_ony5PBgwLKFs(vVn@+ZHmS#j#*`PFU7e|OWK z1sJfZ1-(rlCjH(uA#($k!Ey~d)aX`(S$-!({B10d1XO-{ z+oE7=!GPt5SPARgcVGj*RVg^E%D_Pd0u>xGAkeVlHw)dledlh0>Ns;$E?n4t5O?c? z4bdk^%Pma<2MsKk8DFuYg>D2aSgc_2f`xDdFM3Ox;Nk#v*(D?xpzuqY{|qU-H;M`= zr~m_Q?-e-83*y0W$^{g-Ab|&jG2p=l7nl*nh8&ef5x|BY0uZ8yLqrh+2QrArAsQQa zz`#V=%s@ehG}dUNjWpC?V*nG(P>%q+*f8UbL>6h}h7{OfjR2Y4073#sMk(cn34m|| zE&&AM01i3mu)~*NhAHNlWR_{>mpbHtg9DZTfW`w6IG_gvbk=F-op|P{=bmji5Wxd~ doI!;ZU=(WTp$CXThK3#%;l!hmM#@AG06Pa%sOJCx diff --git a/src/themes/aqua/button.hide.equipment.gif b/src/themes/aqua/button.hide.equipment.gif deleted file mode 100644 index d8d11c9152ff1279d3662a5484caa4dafe3d7fcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1287 zcmV+i1^D_$Nk%w1VRrx-0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;ii(Qt?Cj6a&r(uS zqobn$005+OYC!NI|9 zZf@M%+&4Ej@9*y%931%g_NuC?%gf7ERaM8w$CHzjjg5_MZEaXsSWr+^?c_2bzY-w(EAWLa;04x9i004IY82|tV{y=~*5D*xT$fR<~ zY&xINsPsq_S_K0_!Eoq$zu>TVOfH+x==8x*APfXT0V1JTFcb}ke$Vgw|A2vlgM@{H z4GIhk3JC~s0}l`p5)%^?mzbHFo1C4VpP-?lqZ1Mu5DxTV;@4NBs_VeTU^!N1V=F=!#a8N)%1_c@lSfUnd!-iPYICP-a!2?4J1RP?#$dQ_d z4j@Bz*a(pTf|4jZaG*xACAD1)OS)wF(iY8X6ebkVpdf?(fCJb*Jg89N08tPih!PFa zAwvcc5u8dLF+!@m_rwXJBtqmh92rE4vm{b1uAo^m(Gy57=LJ2uf{6}{ zyGmf20K(e?5Kzpm>vw4fqNq8mNRdK?U*91>s6c!eafuQkPD{3H_;!Wd9YS{y-JwL_ z>6SY*o*qJl3EaYae=iaJvC`EaP`HLG`vG00!jbZI4qdd};=2nom5=l>Q^L71cNlbj znNR|F2tK!*UngkyoCxT7NK^{+!RT3URC<Ng%BiLsG z>7$Oa%BZ6)bihKUt{zIMqQ1ZYL!l4&2<8JB=sJNdi0*=`tCKoJX{jJBYph5iIl4g% zFDUA$rPE?ys-w-u5W_C0hTCeW(bkHn3;rEcyUPSH9MEf^C`e!c1zP_XjT zP)9BG)Bx0A1Jzbjt@YMJOh7|V0&wGj(_EKr_StBsoiYU;5F`LAH;9mc+H}`#_t^=E za6>i$K;i%nIq0y%;Di@$_~D2ruK41NH}3f3JLr%D4i2OOfE*7*;6Ne}bnf}*pocE{ x=%kl!`st{neuo1QJm5$iS!|)k7wojxZu{+PwDE?@L`>oP@4yEyd=o(c06S06b4maJ diff --git a/src/themes/aqua/button.link.to.gif b/src/themes/aqua/button.link.to.gif deleted file mode 100644 index 28cc6fbfa47c028c30f7ae3ae2f9d32fa6cb7e2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 927 zcmV;Q17Q3|Nk%w1VMPEL0Hpu`|NsB~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{;0uWOJrk|#& z>Z+eoP(wHZcydDs39xGGt*Ryv!VSR$P>2IK+QGThAXbOZ#WRa0~>>+QN?vi1KpMVze#J%|Dt8WrP G0029PH`4F` diff --git a/src/themes/aqua/button.login.gif b/src/themes/aqua/button.login.gif deleted file mode 100644 index 1f0bb18aeef5956e628d6b5d227ccce7847dbb02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 871 zcmV-t1DO0rNk%w1VL1R90Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?CerfQUCw| zq@<+c;^IzDPMw{d(9qCnX=%5&x15}u-QC?A8yhq^?c_2bzY-w(EAWLa;04x9i0021v82|tV{y=~*5D*xT$fR<~ zYzm0Ns9-=S7!KI1cFXO0y@mo|AP@==3B`h;XgJ>RxO`5p#~TX9LXkj}2M-Vt5)%^? zhlq)ai;Rto6A~2=4+8)M5eya-1Q(qMo(Q2ApQE9lq^6>%rlX*r1OyZo3=sqY1r8XS zr3eGPy}rM`1Hr?}}`8yw)=u@n;p6$%*w z2ecgz78VEe9v<}i8T|eJ|NlNj0NBr-g$Erl9e4*JfjkNNEZ~bs4@3wLAwcL8fiJ`e ziWWv_6v;7TLy&dq=&?AWF9^4?QRF9cS4CX5!PcjB$Sz>6&yAbhYcSrYROWT1yYTPg%7 zHl#q1Vgm{UDmJWG!D7Q{1RGl5)?HddC>Jh9KRA5%K?dLxLTT8*oVo7h8d&%awL*i6 z7Pe34-mQE(f(b4T47cl2f&mJ=Zks~U;`MFXFVxEyMZtxH4t5!I$Z(-dl>Y!m5r7ad z#1McCGtdCwfB-N!1b}B`&;bJrO;ZB}0cNP74a{}TaD#>*{ujUmHMAoDE*xMO;)*P` z2ml2fKqJ5sY4DlI6w&iXFL#r x19?E8<(6D_>E)MTddY?Z5j^0B8B|#D#hPrkiA5M=_$OcyPSk1Vok;`%06Sh@kA(mL diff --git a/src/themes/aqua/button.logout.gif b/src/themes/aqua/button.logout.gif deleted file mode 100644 index 9003f6183d943747c50c61129318cc9d27253ab8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 943 zcmV;g15o@&Nk%w1VLt#F0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?CerfQsUy` zPEJlwPfyU$&}nIDx3{;PoScG!f;2QV-QC?A8yf%s0Kvh*+}zx5Zf=T-iX0pqH#aw> zrKRuh@A&xkz`($Aa&qJ2SXfX{ zQ2+n`A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002J#82|tV{y=~*5D*xT$fR<~ zY%Ynys9-=S7!KI1cFXO0zgt6rFc1g@h=gLnP&6FyxO`5p+wYEsg0WB}5M~1p5D^j+ z6BLPxi;RtqkC2NK5)}{+0{{dO3>Fjw7oZ5C2&5OHrlg{$simu_rlYN)7X$*ww2 zi4z4C3K;?ixf>4_76+b7{H*7wBd^wukD41|n!ml)90~z|={mfI}feiZ)gky!^gb5S~P?$J@AcYAPDpr^vwL%3c z7AX+4IF3Sk3*j1Axo`peL1WMlGK`-I1TGw49&aQ_U;qWd5XZ_1Eih+cbT7S-f>@Mk(bD@6mvR zlvrjNzyvnXBS0@XK$+#3WR@8v1vy+JfF?TZkbs$R#u;S-JLsTG0D?GB0}nm;;OC!! z1}f;FgccfT4?NW1z$E~n@jwI)>;b`~lvZl#rI==_DWz>V5Wxe0oI!;ZV3ca=sal9Z R28}ot;l!)3#`_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;?Ck8%&(8n=0HdR$ ziHV8g;^IzDPBk?(ot>RDG&Hxjw;LN9oSdA{(9mgVX@Y`+-QC@#rKQ2a!8bQI+}zx5 zZf+bL9EysH@9*zYQd0Q%_N1hw!otGK%gd9KlZ}myZEbB>SXfX{Q2+n`|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002b*82|tV{y=~*5D*xT$fR<~ zY&wrbp;Ry+6by%~cFXO0zu@q}P#_EhLIEP7STGa~hkQ=2+wb`Ny`f+%6bT4u0}l`p z5)%^?i;RtqkC2g)lM@md5Dx>iybLzpHF_U(z>lCWgy(FmG^jlRiLB(eO5*3=6>P^fQ z1`|{*ce355cnhM|VAN;lgr9M@3|-+Q&!a!9vL3AQz+B3A1c9gS2qMss0)Yw*D@?I>uYm;u78+ETdSBmEi~OtD=gNEt zxbT80E3{w=3^1hk0CKQBfB}OO$k!eMDF{el3>xLc;6e z;wk8$gmOv24BQC7i47nmQ0SwO&Y1uRHuMqzAr9PtLk>E0>glJThAQf)q?W2f4mjN4 zKqdgF@jwI)^Z~)FwAO0tt+?i@tFCW25Wxe2q*28cViarav0ad1hL&Cy@x-&xMhk5a F06T0`&W->8 diff --git a/src/themes/aqua/button.order.by.gif b/src/themes/aqua/button.order.by.gif deleted file mode 100644 index f987d00359b80903549851bc9597296f9fbb824b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1018 zcmV_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NF5gQ|#>Q z&(F`JqoW)g95**NQc_Z+q@(}<0OI1}oSdA3f`Xl$of{h)X=!ORG&IoA&`wTHx3{<5 z-Q8|(Zrt45@9*#U`1X#Dj?2r-larH;jg4(>ZCF@XP*70+|NsC0|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002t>82|tV{y=~*5D*xT$fR<~ zY&x4np;Ry+6by%~cFXO0zu>UfP#_EhLIEP7STGa~hkQ=2+wb_ie%??p777UnXaf%r z5fT#<6pW3IkC2g)la!DX5*!c@0{{dO3>6dv7NiKJ2&fjOs;H)`t*NiAs;9BFueTNi z1QZnv5d;AR4i}=V2m{Cn7#JDK$pgvH$QsVm(WubK$r&2Y(%0a+6c-K!0vie(1&h0* z1RWk9ARZne?z+4Aqaq#p_yGUG6A=)>JAu3?OenxX!3F^bevNogp~8WRBt(#?SfPZ7 z2pd9*9JxV+36dyLnh-IPV}+C#D?AwS=>S9s2_{N#c>;z0%L*xcRv@7QMTv?iR-n*W zk;RG?M==(Sicv&`q%10^*vOHnO9?X*K(KiLLJOT7S%^^av&4ytB7$yAk%Gk1jcQAf z=m}S@%ZyN0tgRp-t5&ODXSNu7^X!A2ReugeEMi4fwuCo6Z92HJ>`5{ytB10!r;0UA=Y>82C`v>7J=bHX`QBGdLu`Fd-o7=%$=@+9(Afm?MBEG?Lg7 zX#ytD089XdI8cKPH{f9Ft+?i@>#n@^>g%pI*ieH5n*gB30}(jj2L#ME>+G}8Ml0>K o)IR%$0}(thNE%gKA;!1hhWjlUX0Qoo5eZMEtM0n&A`t`tI}b+Ing9R* diff --git a/src/themes/aqua/button.print.gif b/src/themes/aqua/button.print.gif deleted file mode 100644 index a78d5508a0ee37bb961294bd00d3d0b475bc6a5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VKo350Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?CerfQUCw| zH#awZCF@XP*70+|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i001=r82|tV{y=~*5D*xT$fR<~ zR1$?y!GKUO9In``cFXN%4F$qLAQT`HiUmW_aJb*_xO`4;C>RSx0zn=;AQ2K16BLDp zhlq)ai-r>t6%Y>t00a>X78C>*n+Ti;pBJ5>pPizlpr)jw7X$07!Cyj8448zgsqyb8XM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YId)Olw*|+VaCoqeZitv%x{@Q<~=}OenBHfd&Bw)P;CZp~8W-97MFOFoFXK4S4hB zEnz~hh6r}^nmFOtF9*VND-_miq6FRug!Lv~?3Zue$&y8Im|M3m<;5pBeAY|iF5b5l z9)!4c04;&9+lmmOBJu9!6;{Mmv3u_B zQh%iEhZAllQZ7u$AfIe(rCf38N#bTx=BXyA0uBhEq;o=P zs;X%&cOjpEY9?1*D3qs}kaLL`psuG5m*|rCHR%?s!~HpFmc-R{pl{19*IcKaHVdby zR~{;yv8iIYsR*sO8AD)z;%iwcWcn8dYP7q|81YMYV6 z#noGu()Agha4UdIX1n3h$);{p0-9>53)7oesG2p1rgX&pX@CZAsir8CY#pFMTL^IQ zLO8&9@WBfme82%P9KaAx1~Mb_fy^(&3``6$lzg(v82}S>3>{WoHGJMpB%%@ z2zcNDFiVG{GXgVA9rX<1RE0e1tNp9BU_Pz}n+BTqxu zoTnZR4Hnqr5A?|^AN@fHKrg*N$Y_tf_t;l2J}}FV-~ILXSU`ac5`+LO10iT&0UcP> zZ$B0R)So{9`{O@^{{QnI|LzyS0QPTy2>jpv76`xuBJh9&EZ_s}$3Ouduzz;YKnNJn znv&Fj0uc*xWXFR@P;_dp$;iv1Ca>87B@IS z0(3~kA{z0CDonr$Zm^C3T*3i3$bk-aK*cIr@rqc?q87Kv#V&gBi(m|+7{jQ89N@qK zvjBh{9uNTsKmr1AjH4Vp=Saso+VPHf%%dLn$j3hVagTd&Km;C8i8^ed3vNiHA{WWX dMmiD=aF7H2@K=N?Sn`sX%%mnaX~`e}06QxX0~-JU diff --git a/src/themes/aqua/button.register.gif b/src/themes/aqua/button.register.gif deleted file mode 100644 index 6efb41caa9c9e227146f7baf99bfc112f43754df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1243 zcmdUsi!iiwG<$DE92(s7gg>d}sovPUUb^?rn;gyyc5uKP3g`42vy&!NMSA?&m$;0pQy zc>DIP)oR_@*|AtGTU%QulWA>jZFP0^)vH$%6BBB+x~Zv2rBZcub@lZ0EG#UvwY80o zjxH@NZES3q&E}PrmF?~AzP>(#!7ws1l9-qX0C012tFN!0nVE@?j~9!@8jU6)A)&gu zy0f!Wuh$EO!l0m_si`SCojy4^85|s})9D%-8bl(I(P)%PrBhSSES7By!(=kqz`#IK zQWBfZ9vmE$%jFCPBPSQ*VNQxWo4zNrt386*4}_`eGY{+k5w)b12@@`di%@4JT zx++^61P6;@f*ne_>VVo4Q9D8-j!dCC(r8YDLw^j9=%0*^4bdE3 zDP$Z#sP@iI$gWw!9ARjL z=k0bjANXjQ(}m$=GV4f)!u$~5;LORC6xKEW)sos$L?}}?6R2MVa$2)*3BSj?cQbrY zPbksOda_176#%mc_q-Ih1774FEJ3|CBEQM_ky}FBw*u#(aPtY8tS*{U1+WPmh2JfE zeZ;rKp}_A>R3Nu`+NmT?-^z4BmZ=Gcl~L4haT2O8n({OoyPDom9;#3cC2!(1{BW=R zaeG!Wp6p{?2d%m4;}5E<@~m$z@)m#A6`vUHX0zAGjf^oyAortHJ0|*T+vkRq zaQuzr%NLX}-v5l}O5+y)ykcahxa2XbRS{^x_(klB$DG>3w({yBw=?}VjWziN7lLn} z_4P^OUOsuN^mDPZk}`h0$F=aqQ7r4u(L}r?34-^W)yh#fiv-~P8nfkP{+U)q1ko>3 z58nt2%O6JfbMoaxy2`W{j{j{FBc_K=dlZuerg>!1Y>6k*wS}ORm6c5*hBoUP?)nL} z5Iz!9D9e1B%%>`hu_g>kpOAN!U*J0_nze8z8GGZz*UL3X#(%gEtg{Pix=msMJF*c%!MB;ZUxlNND#bDqM{PZxd+8aFry$qegyomeTEFZ*_X_0!9KTF(pzArs1@y(=W?8;^ay W<4S#1qsJcY4H)p>9D)%T9QYR`VVN2L diff --git a/src/themes/aqua/button.remove.gif b/src/themes/aqua/button.remove.gif deleted file mode 100644 index 21228fbcc5419304b7eaca22d0de0b6becb1080a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 983 zcmV;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^X^wAO0tt+?i@D+F&i5Wxe2q*28cViarav0sp3MwVR`@x-&xMk{R) F06Up)&}aYv diff --git a/src/themes/aqua/button.rotate.gif b/src/themes/aqua/button.rotate.gif deleted file mode 100644 index a8bcf9ead02a457772598ea85ef6ffb0a809a6e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 927 zcmV;Q17Q3|Nk%w1VLbpD0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?Cbyl02~|~ zqobqZ;^Lf~oM~xkxVX4aPfvq`gV4~>x3{-6G&J4a-A+zU8yg#ff`X-`rNP0$ZfSXfX{Q2+n`|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002Dz82|tV{y=~*5D*xT$fR<~ zY$l1qs9-=S7!KI1cFXO0zga_pFc1g@h=gLnP&6FyxO`5p+wBbnW1&bO%mWV)5fT#< z6o`q6i;RtqkBAcz6%Y>t00a>X78C>*p9r7`qZgs2qoJm#q^hW;qO73=1QZqw5d;AR z4j7%M2m`>t!NS1<#Kyy@$;YG2$gZ>)4g~@k3Ka#1vz{8>-Wwbj+~c$5p4{l>w^Z;<*Ko2AKktDHiM2Qk5Es*fQ(xU|l6%#-v?aPoQPBDorsmZdsCsTY4BscdG`$N@L!v*f(rGeuqsGRhjrB;+8K{Ft$+l<5`j@ zEo8vL7i>?lnEkCSv2SQmyfY1dpgouLR;qFhtfuJIwNHHqGVDX3K?SN68d!{K;bN4F z76?>mc!A(Lf)_3{SjV1S1B_8GxFd)WL-~WsuODP!KVek!RV*~D_#R$^3-v8D_dc*UUfxjYuY`1*U zl~@8m0S(j$kVy?TB#`BpWD1dh4K?5rKp+m>fI|*C#3|>Tbk=F-op{Qb0}eMhU_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;?Ck8%&(EWyqokyy z0002u;^IzDPBb($f`WpaoScJ$gHKOS8yg#)ot@Co(6_g@-QC@3X=%a1!KJ08Qc_Yk zH#gke+#DPnZf=@A&xk%gf7?laq~&jcsjhSXfw4P*AF>s*aA1|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i003zK82|tV{y=~*5D*xT$fR<~ zY&xIN=#eO_3I>FN;lS;Bzu>TVOfH+x2Sb4{5C{c`gkr%^G#vQ6e$Vgw|A2vlfDH-^ z3knGcZUYYx5fT#<6qJ>gmzbHFo1C4VpA!-p5Dxh;^5xn;pp7z z>Fwv{?((zF7Y+pi7z!B$lg(NYNT6YZh6DneSqQjLVZekC8zwNQ!NEce92z2s$grcs zkGCE+Y}ky_gaR29U=VO1T89S}DjbOE;e!VcAUuS?z_X|R&!0enir_G!=m-)RN^rms zGiK1IK$}*8+H+=w2OUx!U<17{Nt~#VVsMJUAI^#mL4pI~3Lq+z0DQBt;+T{NbBJl;1BcC^ zE3=haw*v~iT=_l#+f?vjvSDM|#7qKo%4pWNJ5%WwrKQY%j?q83~bn%P#}W@9ni=?2N+o3MiuzxTSWl) z@(X~!`wr2szybfOFTn)!tHTaD*ua4f02}P@#Q4I2K?e+M#SaY>9PIJOAcrjS$Rvjx zzyvg?BtSJAbX@YwFvl!2$P{dlj{vCDP(lJT_w4h}9w$&j4blYAhyym7xaDxpFlmY-84@BUAArO>p_StBst@he%x9#@ZZ`a{K1P?6o1{PYN bq4(Z=_ict6Y}~tV5mFRx_~D2r9s~e8I!{p2 diff --git a/src/themes/aqua/button.search.gif b/src/themes/aqua/button.search.gif deleted file mode 100644 index 36c60e33a03a5acd9d1f61672292cddc375909c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmV-u1DE_qNk%w1VLAXA0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^+!?Cjgy+oPkS z0002u;^IzDPBb($f`WpaoSdDVozT$G-QC@{x3?P`8)<22o}QjkQc^cJH^ITd+}zxy zrKN6eZtw5!*Voq^92|;@ium~U%gf88q@SXfX{Q2+n`|NsC0|NsC0 z|NsC0EC2ui06G8}000L5K!6Ys2ndeIq;kn@It9hyP%t1A42P_C%k6r&8w$okkwBOM0}l`p5)%^?h>41ejE#J|fqV}-WI8|(LV|k|EQH`NLZQcxAVY@aAn>DvhzTH26mS3n35*s>kPI2Z z1cwhDEr76TqNM)6ej07gIWlN_}V@l=V0qchlAx?Nzn0GI~d|5w|wJ_5HTc#{s-qZK7rdAIo z{P_b+*XUOdmj#z(nB}lr#rPgJ_Id)dN0}WrW{#@WV_^;`GCYjfwrS`LB|@l5p#s4Q z4l6{lK+uB2a2FgzrAQ&_cMIVNI6RNu;>C*$79P}2OyWTX>o8Kp;6UERaN;V`Ge@9; zLkt-)Vjx(4s>OH?GN`9}KH}5Fi5` zWN^VBQjc`lVE|HqNJNN2h*;u@LI{9B1|2Z4QZ+PC;Ngrk)@b950Zc%HJV)eGgN!!@ zDdde5)F2HMnAjjf0z)?GBmfDBV1q3n2I9aCIOL$imRxq}<(FWF8D)MLePCqKqyP1OPko9hj~F diff --git a/src/themes/aqua/button.select.all.gif b/src/themes/aqua/button.select.all.gif deleted file mode 100644 index 5770c77b523aab59198c0bf32c295e75262a88d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1044 zcmV+v1nc`pNk%w1VNL)U0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NF5gQ&Lh= z!otGr?Cj6a&!eNG92^`sH#YzP0NmW%q@<+c;^G?{8-jv@(9qDGot>PVoVT~PPEJl~ zX=yYxG~M0Zii(PEZf@`I@A&xk%gf7?laq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4u02uGz_`T+hm#^Hy0tB$S*xB$ts3F(eM_ok;>$MSAhOeX zPyQo}z2?tM;pGfEqlQ?ab)8GTJRQzxF0Rn_RunR8RMC+pPE?Ev!b@qVaF9}I@K7)u zU~p2tAuK5&OhxGw`ZaTMxYFo};DV#jO5$aAzX#tT zouAk|we!cm+i;b|cfn}fe|Jg&36AA$ej<+Qiwqg>r;r`f&uJ%1BC|O}4f1$~`z~8y ygkx(g9M4|#Lo)D3uK2N0_iL8Q@fWyc7oqe+J}w`^N~2sSzb=}-QV9Y9XZ{E3j$ShW diff --git a/src/themes/aqua/button.show.equipment.gif b/src/themes/aqua/button.show.equipment.gif deleted file mode 100644 index 8f24e1892d0c3d5e222bfc846dad3ea161cb742f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1354 zcmV-Q1-1G|Nk%w1VSNA@0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NH1(itOy{ z&(F`JqoW)g95**NQc_X?0083R;u{+qf`Wq3(9lm$Po15eoSd9aPEKiQX}7nx-QC?Z zG&J1Y+-`1e@9*#U`1Vy*Rm;oEj*gC`q@SXfX{P`J3bQ&Us_|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i004ae82|tV{y=~*5D*xT$fR<~ zY&xINsI*BGS_K0_!Eoq$zu>TVOfH+x=(N~SAPfXT0V1JTFcb}ke$Vgw|A2vlgM@{K zdkqQ<3knGca03qz5fT#<6quQso1C4VpP-?lqokY@5*!c@0{{dO3>6dv7PJVp2)Guu zy12Hxy}7@=y0^i_zsJP9#>>97yv@qM(!qlGo8sdFlj=U0;#9%ukua@_~$Zb==m zfl?W0;6g7Lgz#!cxWtN!2O8k=!3(&ggaHB>qy$VaA^bWl0wLrYD+mb0>VgX%6pH|@ zv?B0=2e?$LEwjP$ip#9bHXA~(#v%X%4F0P=uw|eRY;f)bz^3FuM$%3juC3yJ@PP-f zPCIU|;SRf!O3W^sQMea*5bLkhhM;c<>e!oYxYfo=u*Bl(>VdZiOaQ|H>YmDi1O`yh zj0@;s(C@Lppo~EbEXRyM3>Lft&&;}Hz;L)IuZ;5mJbZwT3pCq&GcZN7kj~FG1A{@t zwom|r1R?;+fCw8{0EZP^cWp%gT!RgO*k2D3w%KKm?X?UtkgfLH0I-d=*<#myHr#K! z&9xjGh`@kd56wV<*Mt{t_~D2XP6G{zFP`}0kPk7z3_}S3P7Q-cuKDJickcP&6x6_w z0It|@LIR(suKMb$Cvbud-2@PcS_3!Wkb@4m=dSziy!Y<=@4yEy{P4v0o&ydyIIs!; zay$@$1ByT({q)pVZ~gVyXRrPC+;{JN^>;WB!2^%Pk;N8jq_6(^?6<#08*g+?#1!<` MZ~y)HPZ0zFJ5z^`CjbBd diff --git a/src/themes/aqua/button.slide.view.gif b/src/themes/aqua/button.slide.view.gif deleted file mode 100644 index 8e692aa02739b1c3535955a319d33d85e5da6e98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1107 zcmV-Z1g!f_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NH1(io(Le zQ&Usy?Cj6a&!eNG92^`sH#bsJQUCw|q@<*Xh=}6i;u{+qf`Wq3(9lm$Pq?_aot>S7 zgM&3SHJqHBPEJm@x3}Hh-83{bX=!QP+}!W)@A&xk%gf7?laq~&jcsjhSXfw4P*DH> z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i0031082|tV{y=~*5D*xT$fR<~ zY&xGzqHro05DJEacFXO0zu>TV>@^e!1A$P0NGKKzMZ-a_+wb_ie$VgI8wv~y3JC~m z0}l`p5)%^?kC2g)la!T~mza_h5*`o_0{{dO3>6dv7N`iR2&@*WuB@uBv8}VQuB)}V zv%9#kx&#Ci6$}vs0R;{hroRIS0~pa6&j=bC1J2aW8yvCD-`U^K;o8~SJ5^DMrwEF#~M{8jDekVB7cvOd4UgcE$WcbBxGc zV~hwrSZ`#P#@ z!iEtW$Glo)@372YpcVh3JPpfUPlSyjT{L;~XdRz8{-S;L*s}}QUfEWq>BnI?7T$QP znH8E>nxy~(4KQ&fo`GSB$6f`kEvQllTEKQ4Z7BZn*PmzrhB%;Daeau}2>&Vff@;*k z<(OK`8Gs>F_+ckQN(XeHQU)5-5DNw)_}C8uLy8ar0yTgz0xSFYh$K6)_;X||BVd3) zldL#7LX`+)uq7=v*r4MB8|wE!2VqXo<(44y!zGa-z=`BOA!xAVoLhbgB?3TdKns^i z=6R<-RK`im1U4K%W`2fAU;qWbAQ=q?PVOnGlQ;Yrjis#IU;#Gfc*^IdoFX8qDiqit zfeHCBU_u8Ls4>N?v`!JgthWM?tF1%e+AFWR*81zOyRLyi2PQB;)jT**AndcyMl0>K z)Y2Nj1UQT&Kr$paTkW^thD$94B)}tpC}KIVkbt=Cwi|8&EaYHJ0EjrC!wx+3pzpr? z_UrGz00%7a!2a^EgANXS0stEiMBqRm5JW8T#1vO-@x>TttntKgI1s@DhOA))7G#uc Z^2sP`VFntq+FAq@Fvl$O%uNIV06UiQ0mA?Q diff --git a/src/themes/aqua/button.submit.gif b/src/themes/aqua/button.submit.gif deleted file mode 100644 index 038dceda1ae4f55106f3d18a22f91f6c2ccf2f46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 938 zcmV;b16BM-Nk%w1VL$*G0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)4&(G@W>h|{b#l^*?rKQ2a!BbOH z?Ck8LqoW)g95**NQc_X?0083R;u{+qf`Wq3(9oToow&HTPft&roSe6}w@yw@G&D5b z-Q8(vX^M)9+}zx5Zf@`I@A&xk!otGK%gdysq?41Ajg5_MZEaXsSWr+<|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002M$82|tV{y=~*5D*xT$fR<~ zY%+<$s9-=S7!KI1cFXO0zg$CsFc1g@h=gLnP&6FyxO`5p+wbs(g0WB}5M~1p5D^j+ z6BLPxi;RtqkC2QL5)}{+0{{dO3>Fjw7oZ5C2&5OHrlg{$simu_rlYN+7X$C zu#6}a$RL3TxG^9C2N#$T#g05i5x|Z=0uZE+LjYMMky0SQfd~wgF1w- z2I{8{IpE;HB>h($ diff --git a/src/themes/aqua/button.submit.to.gif b/src/themes/aqua/button.submit.to.gif deleted file mode 100644 index 141550dfd3558b80f48d3d734b5b2c6f9f4500f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1039 zcmV+q1n~PuNk%w1VNU=V0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NF5gQ|#>Q z&(F`JqoW)g95**NQc_X?0083R;u{+qf`Wq3(9oToow&HTPft%yPEMShoVT~PG&D5b z-Q8(vX^M)9+}zx5Zf@`I@A&xk!otGK%gdysq?41Ajg5_MZEaXsSWr+<|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002(_82|tV{y=~*5D*xT$fR<~ zY&xGtqHro05DJEacFXO0zu>TVY$y;00-*qrP%IdVhGR~z+wb_ievfY`7z+vs2x$Wk z5D^j+6BLb(kC2g)la!T}6A~N{4+8)M5eyX+1Qw+TrUm)_tgfoCuB)iBwy?Oh zrvwBP6$}vs0R;{hqpb)7${5WV%FqML&>9)iuFKie*~;6|)6w0j;Jg$U4g~@m3LFKD zy`&u;A0QwhAQtfXz4;*>`~36?>{TzIK?I}*ChXN{LIDm6HV8NnOvHl<6%Jq=K>{Pj z5*tE_92vsI$df2To;a}q1&WavQ=~{aQe%Y&B0wFO2qA&~MF}1&gisOGQMbN>8E3CMyVuXvLV@0$u%Tw(GpdPb^sEahF;R-6|3jOSY1>Mhe z=@N|_w`l9uiy`Bjd^YXcqAOgCNFDfdXw`CoF9pu}bI{g9Jtp@UnRaE18H;)(5dvxJ z-@`$RUe0~B;nv4db4|WMOLNL-Ek~D5{4;goBt{7D-n+i*&m2EiuVA43P08q`b+Wo#FEN~2*mIp0xx*riVQLo z_<(ciJ+J|b6CjYmW**eTp^f)=@PdRJ_NZcq8*0emhd+Xlpesqj0D}iP?wHC1G92(? zfGtR100qe)07EkvESX9M8pc8<1~Z7Lrie3GKm!Kgv`MCdVTx!01u{q=0(uOHuz>|> zOd;r?Qv@KWp#UIS=n#i8x@e+=Iy&eY8;HQbPV3Y_L8P2^>glJTf*QaCHAEypF*a-( z>Z+`^`Y8oApd-L1H<*xstGMR6Y62$QAWQ&;IDkVAI_zNVvB)N??6S-@>+G{S+QGThAZy4O diff --git a/src/themes/aqua/button.subscribe.gif b/src/themes/aqua/button.subscribe.gif deleted file mode 100644 index b5b385a9a9357e494d36be502423c67f38fc7d53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1087 zcmV-F1i<@8Nk%w1VNn1X0Hpu`|NsB~{{H>_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;rKP38!NF5gQ;Ld; z?Ck8%&(EWyqZ}L@H#av@Qc?f_0OI1}8yg#ff`ZV{(4C!~xVX4ZPEMShoVT~PX=!QQ z-Q6@aG~C?WZfSXfX{Q2+n`|NsC0|NsC0 z|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i002<{82|tV{y=~*5D*xT$fR<~ zY&xGvqHro05DJEacFXO0zu>TVtThw}1A$P0NGKKzMZ-a_+wb_ie$U@G6buUr2?%Nf z4-gR&6B87UkC2g)la!T~mlP8c9S{!#00a>X6%+&(rwFJBs}`xPtEsNAtg^7Js-H=2Z)V$P@%$s zjwDKS>}Z06$&)BWoIuI4rAw12P*g~fqQXm-A1gcVia5qBJ|I z5YbTt%@QI+nh30d#nK9OOF*r#H!9VdDO|WvLBd5x7Ipz2?znbD3%5VzJ{UUEgbNXV zH|J%{w`k1@EG+Luy4S2;qaE|6AaQkth^x3^TOQf@^V_&{k*>h(H}~t=PH%G+;i81u z)gz(Lg#6m+-lv6IbKYq@^hS?Jv5FA;ymfHsR8b$rF5UU|kwzO=t;s=4anNvyhF*Go z&G#B$1)fC$Qo9L9n|QjtHkeYsA!R^+I(Y_QTpa!#z(GeDZ14gs7>F=p2p}L(q6n*q zfWaysz<@voBOOozzm$w zU{K?ZFU~R}G%~=F0W^lb0L_RpSWt~M2*@zQqlN}Liv<+KAi)R#GB5%M7N{}Bsi;m7 zz^SVO(5k9Kuo^3@uBJNctpKpW!3Yfa1P=`q*edL>#1?Dpv93-)gGB-$Q$w)GMl0>K z!%|Q~I|77a!wCsc>+QG4CUAlc#RPDO15P*Kkb@5Fw(IV@@Ww0ey!6(~ZVouy;D9H& zBJe;24gdndzyud;@WBWttnk7N$KgN(4-~S76TlYz7*ps#*jTAcrjS$VmhN F06XN7{jmT5 diff --git a/src/themes/aqua/button.update.basket.gif b/src/themes/aqua/button.update.basket.gif deleted file mode 100644 index 9e1b03f8e02d01813fabdb8c11ff90274d51adc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1267 zcmV_{rLF!_4W1e@bK;J?d$97_xJbO+S;|X zwW+D8u&}VZySu-?zvkxVudlDt($eVY=<@RN^z`)V>gx9P_Ql1;Qc_aE!NKh8?9b27 z0001^qoW)g9OB~QoSdAUot;llPq?_agM)+6(9pNHw`pl<-QC?zPEH#e8#FXDf`Wo> zZf-X>H{9IZrKP2cii+>=@A&xks;a8X%ga?&RmaE2q@<*ilaq~&jcsjhSXfw4P*77- zQ~&?}A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;04x9i003_Q82|tV{y=~*5D*xT$fR<~ zY&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Rie6d)3c1w+wr*zfqfe$Vgw|A2N43JePh z2?%Th4-gR&6B87Yla!T~mzbHFo1B#s5*ZK=0{{dO3>6dv7OV)Z2(T8evaqhRwXwIg zvah+lx4*o!zQeY!76b$o6$}vs0R;{hs>1^a)&thp+u5+#*V^3R-rU;X-Q?Kj9XsRV z=-<1_7Y+pi7z!B$k;w!a8_AFnNWdXMhYkW)^-HKQ;6ef%B1Y`s;UNJ84KrHcz(b?O zTK$w!m{1^t0t^BUH2d(NLWKhrKyV1*(xr$I7)X%7z_X|R&!0efawx%*gozVAYgPy< zlqgdSEzAEKVyMl_`&hd)C8Y>ff@B$&E4;+m?^UYi@Uj5$DIg+ zp#a`npH+tf3y7g+*jnr9H`;jNxo6yC$i2jubu9jfl^I?f5IERgGoesmf92I=m|Lu= z;2Cu(&==xg1|qiJh=Wn+5(ZmX2w#R()%4kdcHz}pc+ZiR!f(_qH`k37aQ5M8P|oC9 zRH@apUQGt@Xcci6Le|m&P*qS%3lX_c%Rvadz(EVJxS*y69CQH71{}PA3oLoY*#QS? zzKH+~8`$ZBo`Z4#0|I%vP$(=NY_RB{Z30?L3^73UzOoP|TjtMhnXf z(n>pn1=)miZMD!|n{6%Le(MSaF-Y*ig|iHNfPn>UP~q;oR0QCzya3P}?-29idvCq) z>Z`B4{08hV0B&IL0Rvj$LjwiFRtn4R^`QN%6x+;q?%egwvKsHmWzATKX3Cnu+^TekwGhy;rNM4gLL6H8K46p|_xoDy>~^GX!FGm9A% zf3h%gF~~FMFaQC_F$}Ec556-t8q8VlF(c!bD06pLYr>Xhjv4N&mD-LdI*Mo}97#O1 cLxW|?X@7UBnW?qSccV;nz;!hSv zE(Uo99R?r(IfjANL_wj?L7`@e1Pk-5X>YlAs{~5iFBGtHR8YU`$1b2!{4AuaLco?bx diff --git a/src/themes/aqua/frame.right.edge.gif b/src/themes/aqua/frame.right.edge.gif deleted file mode 100644 index 2b0e0828a11c89acaedd8ba807080f0ba14269f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmZ?wbhEHb@62Kb#h)yUTnzjSIt)MnGMs@$_rpog x)l(HX7Pg8o2a2>LdaxU^ICOg`b}Ou1!c?rM+SRRZ?b_fvMTBqmLjxuTYXIqdMdAPe diff --git a/src/themes/aqua/frame.top.right.gif b/src/themes/aqua/frame.top.right.gif deleted file mode 100644 index c93811ba5908148c4e0474fc3a3be00736f708cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 158 zcmZ?wbhEHbNJ@Xjn|Q2fcl$i=|Vpu+$JAj270j6R(7 z%x1MnQEXRtb(AQ|!!~>T75n}PpKnwQ5r@N+6vN2u?}AO{?v& zM%iLKyd$FG;;&xMqgJzfMlawl+Mw-vE=5Gy**n;ubqJ4)9vGSY`+p5{Y-R!j?gGC5 zY6Jg00W3~SfHGQnMP(KJTSj#a!=#Q`fA717#-{tM=KGK~c6$eh+u6l?z~`Cv3WRHNat{F$X6e|omOvih@X?YYY0#l|KS z+}?q0sx?{-Y-ihYSGRwlu{!+C2!$F?{`k`fKR$8s?D^eoomLD*W0$M4Hcc(8TwHD} zg{6d6Bb=6K%!%#kQddlTzS}*wm^zODtim1x2>?NNPv(225fxC|B&TRfX_?gW3|66V zgY$7s;48uO1P6e{Uwu2fWWVXQdKZ_lQpwb=egpr z42fa&@ily=iV{R9LpUDh{?$5Z`rPW4(zxr?Dc+fNCo);2&PXTbem*W*nE(pONYG=6UntfmQVco2Eu3>}iKK*(fi_*q&B5r5dD)L;Br_SbY)ZU3A zvd!4h!MYM1_vs`X%zxo0uXg=aK7F+RE{gtz34vt*u>@s4R~0xx;c&Ct8U4Z=+vzd7wSvU*#f+RU8wHWv{Q{bO~)P7fxbuB^&ysYJp*3%&0d!oH!9EL<;+iJ@K5EaBpxSaC8r~M11Gf@N#0ts}a>rp`WA_ H0D}Jk+#^(G diff --git a/src/themes/aqua/navigator.ad.frontpage.gif b/src/themes/aqua/navigator.ad.frontpage.gif deleted file mode 100644 index bb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_qy+L`Om+MRlq*N76(%z+3Bp)oR32>^^hm!{#4>5>cq^>rB(M1CePHEsD&DsAYhbmN-{cZufBxU8KMBe9yiE>GQn@QzY|!vDwpS`*t!nEc7SeNM9Hr3ndGGq%{zsA5DIM&x)kb-imdjql zd&?x7pq4>yVhBgjDQHJhKzlPwT1v~MXvjswxG1h2oo)LTdp^SNNlH$P-o`u&0zp3j zCr_SiYHBhV3|6bvWHOD6jOcVa06=+pd3t*K(9n=jC{!wy+1c6t{{9se72Vz40RaI? zNlE9vo8#m_Vwkbg9O#oielnzcDtd2tMF0Hv7o&f?9D9-Q{`f273X|Ca;VpQ`^2Y9PS_sgzD>2F2 z4SBDyEzeF7NY=dty&U|r5LSsys44OFiHzWT)C35YzX=Kpmefzt-yElM}@fMyfwg5>K-w2*IAsz3mD2hZ`{wD5}QL#4_yFPjq}^#WwK- z7EeW$4J%>QGQfILJf<@%x4*)(h|%V^bnZU2wSjw>PSEf&ivw|@U!Hc495^m@>(g^)-Omp}Sg_+CwV}>$ diff --git a/src/themes/aqua/navigator.db.clients.a.gif b/src/themes/aqua/navigator.db.clients.a.gif deleted file mode 100644 index 9cc08cc910122b49ec86972a83942abbc519bc84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 941 zcmZ?wbhEHbv}KTFIL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7Hl>&wJxsd?wPUH&e>O9 zQH_CtA-AkOHnq5G+G>75VV~gms@54XDMi_(t#XQLipm-SLLy07)NNT-g-<}L`+RXr>LUE(#9!1 zC2z*U4eNHCw6b-cwRlrWRa<-ioQ=Cr&t0}fL{z+M;=Hn&c56FlbxmFW;HYf}&i74S zXyf2o+0Ydj8l$15x9`~1DYKT# zj9d)$3_8F-W&p(r1N*-QhNkA0*0%PJ&aO7b-oE|`6DLicGIb);jG41$&zU=K{(?Eo zi$zCW1R%6(QM!C=8fhBj^qqlPah6r9a?IrL&I5*{!# zGaJm8yy38UnJ=46&b>Dq8X5ihZOm&vY*@(bC!kQ1_h7>2^nkem<}EY4wrVj8hOX`7 zIGAvxW3`gYgam;{+E>>p9`aKSJanXU&A$TY1v9+2=W&UazBYpP6m1uW!gU z*bw;mYp=A4#Df!it=oC;m=rut_z-2@D`OS&ctx!9alRWDGC$1l+iTS?XD0FEL*ijK zemS1H2J!RE9%XEf6@L;OZ2x?HW7CwvoV0h}gx^0tKbCiDIU(?uflcE<1G8A-gGLUu z6%U$t%w8;La&ysm*dh{^@vv1QE#je|OxcTv?Fwxgk2+MEI*xQ|EL-uYOK01QN8Q?L zijR9tu4O##wRpB-aj(~x7mxcL*fgI^a1oPyBIKdQv+~I#AG4QFCI=Wvaxho}0MQQu A%>V!Z diff --git a/src/themes/aqua/navigator.db.clients.gif b/src/themes/aqua/navigator.db.clients.gif deleted file mode 100644 index 2395b6005bdfae613a02af07cc711794a3a38733..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 930 zcmZ?wbhEHbv}KTFIL5$`nVGp_#ftm)@4tBQ;_1_;SFc`mcXwa5Y}thi7h+;!^z`%? z7#J2UTGZ9mb^iQ$adGkD;^G}Ub}U@DP+wnPLPDaiudl4EZ13K^w{G3?@bH*8abjg< z<)K4|?%uuY>FGIn@?=9pLrF==q@<)ZYt}q`_|VA6Xxg-C-rnA|wY4WsoOt~B@u^d% zrca-~apT4(PoB(}F~i5lCp9(o*|TSxH*c1blA1YlW?EXBv9a;XmoK+&-8y^r>{qW| zy?OKI{rmSHK79D}>C?Aw-?nex{(r~<#h)yUTnzOLI>2yd0L2Ld`@aT;rskH`w)T$B zt~SQrzWxalCrzF*bt2P@nX_iknLBU(f;r5Kmn>bje8tLDtCzE^TfbrBrp;TnZrikQ z=dRrgS@-QfaPS}-`=MjUPn_U5edg?GPA=|C+&moIyw`4=yM5>GJ-!DIAMx??3p^0y z7390l_v-P7#{$nke*N}PfLrL}+xHK6|6Q{5*sj;a#L9bt(WgTHCJWbbu@DV~jSj3_ zqB;p%b{sggg_~U?z#!nj0VZaR$)X1iY+8DnRWfGZm4-w{UoI2FoCOVz%szZFIY}o3 zHmCW`^e`-mIJM;^6Tk1=x)&QB9ByAOXVVaI;i1;$RkEA(SOuMqbgam*o)B?*TW*KY zzuen;298PVICraknzZ9|nO>)``i(^z8yC2A?I;Y@h&%J+NRw!fxPHRIq@wPV6C-sd z_(&E!5moea>3g$i%gf8!Vl5GgyIi@&x#JE@<5fPAExtZp$3XTrYmd;<_ziJ^O2=M4 z)=SZdKNoY1M~XY)zyinQwjNf~b?MU+nSV7&8)fN4^xd^Aku+a+Gvl0G`|s}`?mxe< zP}%*@?;oFEU*ErY|Ns9CY#I+5Si~e0_&L;8JZR!Ed-0%I!05)|7Ll-whpiH6D;~Cq z|9bGSU7=0mQHRR3j71&xOIAGU(%JUnQMbXd8%hEu*D@aWT0C3vxXrWMZ%e02#I=fB*mh diff --git a/src/themes/aqua/navigator.db.pending.orders.a.gif b/src/themes/aqua/navigator.db.pending.orders.a.gif deleted file mode 100644 index 7f8c360b777b1d446b067c992cd1d02621791889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1327 zcmcK1jX#qK0KoCbjPZDxmxs}HEOzQ2H7{zUhvWWW^Y1^^;uFXIGU(O z-+*8}11MyFw1pL}Led(Wkdap+b|w0xa|---hw2*|S=rd_i-;99v~P3YewJHejkQ0X zlv#JH`(zqS4W{vhH{88^|7__?PR}-kj6J+5SUY^_l_u`R^2XLjr!u&V*u)BPv!@Rw zx1bU-!rYb)o@V9Z>>cw-@ac+%*c;B#WlCUqV)}f!sy-8(wKpD|h4YI`#ozz8EIuJsKp+#q|4R-0_XI$FV*zXqd@h@tb3Qlk z!teQcDg}i_#U+<{{69*|$}36{0-@+i^;L0=r1n}}eXZ*C8;wmjn{VB|({lG-YYVci zUHVYg(b?7A)7#hIqc-q(Q2u1->F~(tv$5x+>f;lWQ;JuwCr}!HPtUwp*FeoKOlU4G zuYhaoS}UJEe*v{Mb#&G>$1#3^5A4F!`=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zjV322CoC+iw6ruXF3xN=3j_ifhG{ffcXv0F$t00Tr%s)E^ym?tPKO{UK0dy&vC(3& z2!+DDyu6W-k@WQRCr_Rs71OZEbC_ zv9Y0{p}D!aWo2dg`T3)xqY{avudnaz|EUdsB788wcR=*N+Q5HL0OSe>;PNV~s`)i% zYtNnkzV4ilprP@?55gvqxLML7Z3bIqZI|1B?C6wtbzgzHe1BH-T|>@3=NO`svrJoY<$9SugmYg(KI>rz-;tKPS4C*{E+^C%o|aQOV7~u=a^^9 zE;kyB3J7rj<)+c?X@TCZFX}0++A`cbTeA=Cm+=sRYtmYhdMrF-aN<5F+?5v#lDG?I*iz=T8`ipt__t11nV<4HkG&;+g&TEZ2Eaj*{+9C5IfqB>lKcnp26 zSi7OZ2g=d?rjf9Zn_&LNbze?rO;_C&C2k%pPUcl3*2Wea40ul!BACi1Xez+@u~2gT zip|31BbpB62&Ku}pFh47$DmOTllgabB_%5R>62eiX)foiP&C)SVcRK{trsbX8V7ps z8PxtauaWMDcOY5;&%&~Yqk)DX{W{Q4WHg(EJ#mA0=^g7Frh;lqjYjFmg)&QEEAsHB&)t)hWV%D2d4M#c2a~+5$$#(|9=aoPu>Vfyj{KK1i~#K;;f?AuhQ%Jz9yrKM3_F zI?aKB1F9>!8_uC^j+-7+p+n<%KDb+h+qH}ce&rvn(0mlka%xeVAtxNL&8A!B=PTf> z!j)&SmhXfhWy?eB*tX?i0{`!L#7<=|FDRlDa_P6OvbgS&hNIo1WmNVp5HT5V_w`pm{s(`cqpsrwkex!e=*76$9Sjmnu@#+ c^4^zu%`COuJ6${+^YY<|$)cAJD*#~UKR@iv{{R30 diff --git a/src/themes/aqua/navigator.db.shipments.a.gif b/src/themes/aqua/navigator.db.shipments.a.gif deleted file mode 100644 index 71f149c14c0a18c7ff76cc7b0e96535a0ab6ff2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1120 zcmZ?wbhEHb3}KLDIL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HkfROzxSnHn*%@&&ZO2 zfq`F8I5xGoYuf6n))_v*@!6%VF)2mGHQk1$*3EtM6_quTvdRU7M4a3M=C0VCQBb3- zsu>=e(LHsUiG`h@uxM5DL^to?MQis@n6)Y@A6bmWAQ0@mNrgB z6)ipi5i=HUShwS(m92A0Ra-(@zOabc#@(m8CeBOBC=?MDx3+UGt7)IRY|FL-=liBE z)X>tiad53{=n4#t*>~(}T}$7}4SV+=zgFMUcjU}XM;DJ7^H-j|a{t1$hd1v%fBN!W zVNIW{vrlX9EdSuB)U4t~t9JY!1VHg83nLdpJ%bJ~oEboI!odEofuX6nrM0cSqqD2K zr;V|H!o*3Fr%atTea6hmOmpVWo4;V;qQy&=E?dC7a@FcJYuBycuyNDowJh7V@7TF( z_ny7`_8-{AdicoEW5-XNJazia+2d>%E?&BPiJkq*jhnY_-?__i|G`5}F7Bt?JomY{ z9^U8Xee>btr_W!$@O}UBgP&XAhoI2+D^GW;KRkG#nL}8sXMw}Q!!1H$Dk4Al;~m*q z3Zx3lJ?dy@N6@@Avi(VTh4J&OJ|X~!fXRZ z$)ijsxC44P?*82T{KOLX?zjm_pPyb`Iy>=uXRF%bGu-lMpB1tn8zbNZKo9vJGl>JGy`=sHn)m>dhod4{#(OgCc8f$ znEC8~?9W)z@1XPGF_XiG1U^1TgO^Vx2YSs^6|kGq?93mfHB*H@mPxVI($0tR$t)X= zhtFmg?6N#E$K^=o^V!@yh0o{Je0%wPt}Bbyiv=xWSs4qsB?@0G>M?tjvB2F$>*bOu zVOg0=JX8u_E}K*KDszcfi`J_ZOQvPLTDfA`s#mL)>OFk5dc!fT*K4+1%X+h<~qY}#)&91;7SEqp?4^_xv+%wE6Qe8Ejyce7te_S>yD(pJCScBkz1+wC{m Hm>8@9yP{dm diff --git a/src/themes/aqua/navigator.db.shipments.gif b/src/themes/aqua/navigator.db.shipments.gif deleted file mode 100644 index 8df59a5b338d22cf2a325dc7b57f4eee267a8d1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1107 zcmd7P{WF^f0KoA_A|a1Na7vP5IBnDDO-xsH-L9$xEzJJ2!o0v?y97Dee5P?|$ zC@d_LNF2&(~`npc1tEi|*PEO9t z%j0snk&%%mlc}<@G9@L2$K&Pa=g-Z}?dRTCG-rKw!7q)6&uo4i217=h4y8@$s=zsm#jC8Xg`l zC@5gDSbDww-T%0dH?A%qa38qvFE#Mr6Ts~)3wQw4)YjEEJY+w5T<7wH)7-*sZR53f z@VN-V(`VlcMP1!Jy<#D=ApXz`>)bhVVm(g)BpBcx zqESN#BH2rY&-v&+?j(k_nwy8LKXraa>t-@tMF*Y^i1{NT6xry~myjMzkBh?ikjuL{ zsn==|7p4=)>D6aYpdU7q1K*7^fWBc%lewDH7x_M+zo(MgNOc353WifmN4m)ZeT&rc zYnluckxG_txj<;#Tf$gVhR3a9BR+8GZn~kY_;VanneE_2513@ZKH=He(3%GCjij)k z$j}lD>fxzYK(zLOd4YYUbVH_gEtu6>+nRch>BbXP2`c<%(k;!*xMTAi?=`I@&IP+OUZN!2crp3LZ~9dq;UG>^j(Yzy z^?UCSv`5Fg`wLI-UraIohD~2)f4AS}udQ|uC2Kt}vj7r`(ti_-0|O)gE;5U79fzNd z4S7IfG=$V*zs`gj+-MdN;@o_&wmMmD$b~K~ebwCiO=U1p5=esv!>=3@%m%&#k1%4 z1>cUr+Nb5_{{3h7Hu}~0N;JhHtl7ZmL=9)9mafM^q#9%+jRNnJwa^Of7SL6uo*8~VY|WE)na!|igN-yQqN9C$}J Ws=s8jD-5)7$MdC6|0)UwuKWXPeQf*y diff --git a/src/themes/aqua/navigator.eq.camera.a.gif b/src/themes/aqua/navigator.eq.camera.a.gif deleted file mode 100644 index dcdd435083b1f29f091e83257d3bb8cb3d1b5c1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1019 zcmZ?wbhEHb^k$G`IL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HsaBvDVJnS6)$#fq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u=&(F`exVWLAp^lD@FE1|`7#MbTcD=p5+S=MkNJy%xs*#bAd3kv-FfiTS-APGF zF)=Zdlas{6#2FbGVq#*ftgPYT;Y&+PmX?-%eSI=AGRVltgww3?CkIF@9^;O^78Wb_V%~8xBvhD|NsC0|NsC0 z|NsC0A^8LW3IIO{uh^`1%k6Fl z;IMd1E}PF~f_lwvyWjBm+e@$8wS~NX&+i)!eSw042!)1+2?~mf3kwPej)#(yl#~pY zn3)L)nU@U<433?nq@|{soSmPc3Jj|bpsouIn4gWO41)y+fP4=M1;4=x2M`bu5)lvz z6T8H`x&;)|)YTOc717+Rs}H5rj4;k#@Dwq;>w*%x31m0cC>oFt45upwd>cgW6PdRTegnd QxO3~?&AYd6-a!BWJ6+f~?*IS* diff --git a/src/themes/aqua/navigator.eq.filter.a.gif b/src/themes/aqua/navigator.eq.filter.a.gif deleted file mode 100644 index d94f3c5db72ef767fa9cc8e387215247047ea637..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 910 zcmZ?wbhEHbv}BNEIL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HlrA={7XA?wPSx&&ZO2 zfgv`vxNF+#s@54XDMi_(t+viSNm=EJ${J4Y0RloI&3*HOB9rH?*ll8ACnzjh)jTny zphj6$)6F}0(c1lHmi8)YS~^XDi&0jEsdGV5^%a*TLxoY)dmUZhl zY}~YY%hqk{Saz&U<#` zW|8x`X|gs6CpI)RpPTM6xh~?=7R?R;rA1v5A03Z0tqNbO$Lh$`a($ir9zEHO3NDqj8ZwmuS`FO|b_T9c2BNUQLU$dH~T-ji#ysbyt$gh8$WAc|? z)*Zpqk2&ty@lnRINBH_i2KM4d)?zOX98^BORnB69@b|>SvwB~in)+YDf8U;;pI=;F z9d9q!@%#IS$EWA}@84JZ-SN}w`{(!X|NozXZN_{77O{*6jT~w#9yIX?SsZB=aMO6$ zA`+JIu$5nE;lnnWvKJ5A71}fwwYg5oc+{z}Y{jE4oox||1PzX9Jnk{MmhrgP;*bOf GgEatbG6bIh diff --git a/src/themes/aqua/navigator.eq.filter.gif b/src/themes/aqua/navigator.eq.filter.gif deleted file mode 100644 index 28dbe58944fef02943c67e867a6d57b9bcc785d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 899 zcmZ?wbhEHbv}BNEIL5$`nVGp_#ftm)@4tBQ;_1_;SFc`OwrrWZyZeO;7hGLk85kJ4 zy1LGvKfhzgj)e;s#>B+*_4VoN>&M5(OGrrU-MhD}tnAjUTOJ-Bt5&U=IB}wZfk9$o z;@!Jgwu;4Ha>IaOhZG%=FOX>q@-THeEI6tt2b}n zynp}x!-o%_K7IQ3?c4V4+y4(`p!k!8k&B_8K?fMr44^n+VE@;^(A3=0+ScCD+113@ z+t)u~;-tw_ruH(;m^o|qoVoMnFPOo+c*)Xb%U7&iwR$njy7e12ZrZ$M>$Y_ZckbFf zmv!I%0|yVWu^&2i{KNr{(`U|da$UH{&CSJeUxuc`?5utZ?No0my0otjvy4&Ya%yB3^zH3ZwOX|1=4KU-Il9qK2RpVs%)i^G zkhrMju8{h(Rl40ut{kkI*SNwQcWijLrHylaz=EX07NzskB={*Dk;9V^T2>>jvlYX$N<2e}8^o<@o@GWQ%+$uCx;? z9xBb^l{}Do=Kv#b`=V|IJ?$T*a z&db+toZ`BD=PozTgNMAlJa?Zx=i=sm@#gI_z7HQiz54WlpXck(uU~%s{rCT~*puDj z?+-F_d{UCAVd$4*Y5TJT4qRqxkJ)i64ivArI$L^E*4mR+2wpV;P9HAU*S~V3jwAUjxQlC!-N``x%C2_3=)KS zJmxqwDz$bUX$W4B(C~pG*#L(|kH5BrH=^$TMZ- l(`hkfFP~0NXwys+@|u$QY-Yx?mCt77Y*M&bgr|Ar?j| zyk;e65gKK72xYSayeV-Ln&xwc21X$Ye4Kg@VW9Z8jU7PVejM zlgs7R)zx;poxxyGsnpiiR+GuZ;cy59f=;Kasi|?fTudfYp-_yEk7s0L)YjH=x!nH# zeh7k;N@ZDD+2r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qua/navigator.eq.label.gif b/src/themes/aqua/navigator.eq.label.gif deleted file mode 100644 index 3bd257f44af9a51be35746d46b9921b59576899b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHbv}TZGIL5$`nVGp_#ftm)@4tBQ;_1_;SFc_zD=S;JY?-^e`-KY^7#JA3 zy1HClUC*CCzi{Eg9XodP_4VoN>q|&T#K*_qx^-*f#EBjr9+j1qhYlUOd-v|-$&-&9 zIg*r=5V@B}ZL5})^FIjY4et?+cqrRxoh`) z)_waA96WS@jqUIuc8=qxInSOu&&7TI@_8PfD>t~gZrnM`d;h`1iw~bXy!Q0PtrxG~ zJb3(+o15>!^G{Dc^51{;>&M&EtXv8l!3_+Ij`18y9tIW%#aTE7cpP*X92s3%1-ayY zxG!9Myq`;}MkdnH(VbgSGbW&+v594(mTG{8=fS4di59kLH%@L|&cth5nRnrUCakuljCZ41OSHhfoXztL z7BaM6UmqR(;_m72My`FDVLcaCJ2l2_sfyIdxOhna!J&qiOl)r!ZF+i|D=wytF}a0X z%s?chjd5`i&-polTUPA()tYf^YWRX1dm`K3-rgbl;vR1@8!xL#){O;<$|k&*jPveq zSU9_am({4?&9aFy+rP@(*qnX;+}_>a-#^&;TEc(do}ZszTwWa?U)TQo`-jJ;=lk#9 zSNp@})9d@^_wWDzpMh;hJU@$A#)C!AvU$RYuf6V zl%lHE8QG<+Nm=EFrq)jG0RloI&3*F~l{JDQlZ$J*=dReDQBYIWJW*Ly)6F~B#KJB- zHbYQYbkW-VImPv6mi9uzq7!DVQc=^2O2}Hh^;l6wi=~Z|nubnm@2nXMH~0iZ2#biV z+i|j_s?9ej(#qDky?@Te-KWcH+UG9YA|fhoZRgxIah`v0)V2fXZ5&(|t=f^ARb1K7 z)i-rvU}%hnmfpT&SN9*kcI3>>vsdn4xc2boz2{F~zALQh`#%(b;!hSvE{1vr9bkYn zfZ~LK{a*t^Q*%peTYE=mR|jKnU;l)OlO|7@I+0OO`HMzGCI7 z)hk)nt>3V5)8;K(w{2nFxoh{Hz5DhbIJlqf$kAiRPn0p;o#nWT9vmdcAiRIj0mV0o= z#$*;fne7#g4n^D&1`@khys6mSEipmYyzO9Q3Af~m;MHyh&Rcn;Omi+c)H=8EO0P&) zsJI(-jF)9=?v)j9Z<`m&n8xfrcW}?n&+QikU!2(J%w8gAS>kj4BC{i(ys6x^7Z?Ay zSFkt~eQ4lIY5)A)vgyQp|NZ;^{{Hd#^>O_r`~UxEVAFWez#?YxK!8JS#e*guvlkDV z1*|-dw1|XdJZzOnTk)_>QtaWwc7-;LM;$8DGL$;qmaKTxrL*nDqi%y^KOPC1T+4Xe gYw>Kw<35{L9Y^{d*fgI^a1qOVGSQWdk%_??05P-&$N&HU diff --git a/src/themes/aqua/navigator.eq.lens.gif b/src/themes/aqua/navigator.eq.lens.gif deleted file mode 100644 index 90864e6177f74217ea0a8fbaca1f7c70d98770f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmdVX`%e-90KoAh(F4IWhjut>l)5?RChF#BQMO#D(_UNIPYx(?*wzni&E|0HGy+8< ziB#+*q|s$fBuvSCppXx=LHS56f;*HQ#3r*cny>25==&#pzIg>)_8~zIKnKPEpuD^s zK@gYAh2!|j%F5i_oWtP&06;F6+wFFf$)we46$(XOULKFfgCJ;da4OG}GTC^Q%h%gf7Zwc2L06%`eEz252RX&8oETU(7rV?shgSy@?DR+i7_ z^ZWgQKwx!sH5d%8t*x!EulM!!?flOj_)R240yluPzvjTdCjht&12s1#x1_S#I(aSO zw&G5s@~-M$lWLc`_5Op0j~=&a9*4DeJk>ozo_D@@PVCZm8(tZEUibEB-}Jxj4<8yf zkBnNZ@5ZbVleQ_4G-Y>u_&75=N&d93_PL-sN#wgRm_hoVNGNVuT9==6>gmwHSDK?pl>=R&VQ44`~5bHWmnJ3nT?YG^Jd+?+iwSeas zrwo`Gqb23jiqQ~D7?&2Clf8M}h{kJj>yNsRU#s7{pFaS+e-ciGG$jmnN&gA&Jd4xQ zdqw;!GFo?X96B|?9`%5HYa_uEYJl{z8Foy&G)j^!iW$DT1t_2_g{SfCKve?+pLxNv z4-Ibo3Oc{3PY(}mZG^smbG6-&?d$*%DQ=h;FJe}6k`Q+dH5+%|jNyj((X?U_dJ8H; yP$}awZjmviDOhb%vk0q8-qv99v|b#mXN{#KHXNH3d2X}4h)2O$H(g=^hyMUqKQFTY diff --git a/src/themes/aqua/navigator.eq.location.a.gif b/src/themes/aqua/navigator.eq.location.a.gif deleted file mode 100644 index 516915cf004d05efcddf371b077c02e775c4e303..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1032 zcmZ?wbhEHb^ka}@IL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HsaBv6g{>AvU$RYuf6V zlp;MN%k0wDs@55{&OS+5<%Xu#0zx8+${Njm^MfLj=dReDQBYIWJh6M~GG$dwH}7B* z3p+t!(eT)eMQiux6xW+s+Sj#DRZ-It5*A&(^;l6wi=~Z|u!xwNhE9A+-ntzpORCy@ zgCf;5brRC@t!$m!`{&GBylLa^(`7a7bC+!q5fx9$DD0Xz&)UveT~l}4f%7&Fu9Xd4 z8d`dRp)sjh#fw($*mvye{^Qq>4sJRC+0S2r9y)V9Q}x#$7Il#Hv3 zWNjF}UO0G&l|{xVWkZ(fs+;^7mshzmIK6Eb_@{WO$>9T|W6XAWmj;Q#>AF$dimx|u z{Mr7NL&(eJ!O`eN8y_F%@UhV=eAJRG%;BZ5;m-}0E@8Exg1$QzMrkM1{H9NfadPEi z(VXTpZ_lD_Z*Ox%+=;t*sP(P5M%aQ6wbDnsZy6+9Ik$I?D-VlN)@cWUW>%)#XL3(F zEUfwdR`S8&Zg&UgKRr@U&fnf)_?V69n{mOJ3i_6%pMJft-i=Sz_(Fq2#mkEU zhbyfN66aM~o4k0?Z0Xv;z;FHK0W*`?p9cy8W>1zR^2>g@z|7?EhT%wywZetNe2yO` z2=hCJbTl+;y(?JQ&j0Mj0s)(EFC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%q>Xqt_d{tXnzWD4ar29WVk&K`q*e|2uRolg^?d@f z%{Zv(G#h$`dY`^DnO_Z!y!&%v`UIzl9vSC?b7S*LU2$&SKK=(->A9CGSx1iVj6d-A z{}ge-$pHki0n)$Jz<*Bw#1a=c&*SIj2`*gBFDSfJ#B(SuyId~3a<$@GWmR=e8B8RW z+_-s5DwE%?ty72{e^sg)?l#_QYF7VtzeVZPrqSy3?S>9xXV=4S4ZOGSv8n&bz|%qV zv*$y7%ZC3Lc{%#(^%w$)92=jQoO-!@dd3QZC@Ttdwk~}BGP44WS%iU}QE>!54~gqe zE-BHq^08hqTjT`2;i9WIbGS?86$!`T2{(bVS30DNKS3dCINxy@k8a>&BXZ!vka+s3 zYh`-=@|CG{ku?Yg7jH?Vv!ZwV#8kWY`>6wkzr&q9f->VvgaOTpRd14>vq$U9&R`%j zQ0rE|$8l-3{z$7*H$2pgz-OF3N|?&=MTXcrxU`&QEgojcm{zSyhJQunuoj68h)&N< z5X%zbfJ75EW^sEKY~$#P4Z&zJjh~E>CI#;aU!6Y%NhlnoP8^*6qJkH^CgOqm1l&6c zf|BUE3pn5WtArf=!rZu5IWBUC=jSu7Pj3IPm)olTIAyq3Ji5dL?YQawVo1yag|5aq z_nkV8CL8X5Qwc*kNlkQ=pW3QN1u8{AHo_*;^ZWoL@x0qIIe~|^$$-4Swx$vCaO_p0 zoUi2~37Am${5p!H5CN#A!LCGS@>}^0SdbyG9SksG87nq?N^>jY5` zac?e%_hqIyN559qBJBkZOv^)tlt~OOf?V`wF z!nWI!7)8@$EsUlFw_p_@(STuK#efUVPBUPdx@&>Dt&oY~qFVw2?%cOc2B@n1Sq4l* zM$CKZHvFT>1_hePr-FC~OZ~I%0fyp^^h>*orDoN3_-znz$s2?qJk7_zJJH= ZWAlUiQtRi<%(L(3pRokTP7{Eze*l?qpql^y diff --git a/src/themes/aqua/navigator.eq.manufacturer.gif b/src/themes/aqua/navigator.eq.manufacturer.gif deleted file mode 100644 index e695abcd853311febe114ddc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(&Q;qr%j*EG;8*px%1{PSh#5MV&-MbSFBvMdd=E(>({ev+Pr1!w(UE1?%KVZb>IF2 z2M--Sa`f2o<7}r+pE-N({Dq5`E?;K9cKrqiC)XV=?i&vtK6?D*=`)@eFJJO<@xA01 zc=hS?m#^Qx|M(`r_5FhY{|hOHh6@U^j%@##jtNJ6h;=Gqk!NtR*pRq4Lr}zH#)BLt z)?Ohki46sghupbOi6rbe;JbvCRdiS3oPvc-tXx7tUKf4{EpOqtWW*us6~eroSH_Cx z>jDSOiwouLI6@heT-tbpdh1?XaBOVjkz11XB5UfZODp^@^NAkZwl-SupR&i42Wd@f zn}qUj&U2W^w4Q@i|m!HHbQqCwRCdRZ>S}hehqpPd)b!G;_~)Y(B;#ZrZYY!^hn} z@>$JiN$+3CVDaVgvDSETzs0`_9#|ae7N75Yyh6tM%Z(2;6zY;L@r7&%njp(dFZVK6{CWkNX{dRUDb%!IJr8qK8`k z$|sW?)gC^X9N?z;bV^8A=F_R+S__{}iz$2gbb3OY=Cc{edWp|wW-MFzY*x;;m(OPB z8!0}YQ*tfy`P_5Q~hFPF_Jd-Zbpd^RQqYXJTtHDv$* diff --git a/src/themes/aqua/navigator.eq.scanner.gif b/src/themes/aqua/navigator.eq.scanner.gif deleted file mode 100644 index c6a752cc324bebd3563af48ca80a91a58dbb0c2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1030 zcmd7P{Zo<$0KoC5N7PUf(^G*hm)3b%-3fwSo?VwS5z}3E*JWEj2o5p2cGnHh%a|tk z8ZLx1ULq6FDUyYb7Boi!q7muI+UebJ2>3j_jtOy%)@|or{)>J8gwMCCntZ&J_6dLm zmH>dsWU5pum&+9h1iW7F+S;1kZdWRmm6eqM0OaK4tgf!=^?DYIrBEn%Jl@2_L{(Ll z!C)vVDr#+Q<@5O%45p!>!QpTSg+e?Y-`3Vc+;# z>FMdAp&?%t(8b5 zHk-}o^J%qO91ce$5<5FP84QM0Dh&pMGMOwC3WdYrNF)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u)-R)!je^mos%Gb`}bXbQbxj~5m@V}4(e zLv2Qaw62XIyJE?X0;VR06^;vA+ov!zD^#}>Ft^6a7`3z8Xk{_y7QCHoO1&xdh z4hGH&noJMedd;;Sv2$_TBs43UG6guWS}SaNG_lKI(UVC&W-p&i_GeOHpWSJ)4m-E%VvTbft+Lv(oGyJ)2!{O!N7il53jkDizOGKA%_f?d9|N xHEv2T7PN?Ey;#_xmbF5q$L!UM#S`4LUM`s+mH2Y$jI>oRm(3|#mFd7>4FH-g?*;$> diff --git a/src/themes/aqua/navigator.eq.shop.gif b/src/themes/aqua/navigator.eq.shop.gif deleted file mode 100644 index 3fa4d585a40fcbf733efe00b728b9ff7f4b8b842..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 893 zcmV-@1A_cVNk%w1VKV?30LF6w000020s;dA0|W#F1_lNR2?+}e3k(bl4-XF!5fKs+ z5)%^>7Z(>87#JEF8XO!P9v&VbARr|rB_}5*DJdy0FE21KFflPPI5;>uIyyc+K0`x8 zMn*R8(16Sz20JTwGjWU|?ZkVP$1yX=!O{YHDk1Yj<~ddU|?( zetw6Chl`7gjEszrkB^X$kd%~^n3$NHoSdDVot~bapP!$gprE3nqNSy!sHmu^si~@} zs;;iCudlDNva+sxVgExy1Kf(y}iD^zQ4b}z`(%4!NJ4B!^FhI z#l^+P$H&OX$jQmc%F4>i%gfBn%+Aiv&(F`$(9qJ-($mw^)YR0~)z#S8*xA|H+S=ON z+uPjS+}+*X-rnBd-{0Zk;p5}ult)=IH3?>FMd}>gw$5?C_C zX>@2HRA^-&M@dak03rDV0SW+r04x9i001)p82|tW{(vZggM@{Khlq)WJdBNwkC2g) zlaOVWmzbHFo1C4RYoMW`qok##r=)4BtE{cAuduPMp0u^LnO(WMyS%$sTfM=;!&$|~ z$2}Pb00t8;#Q;FZ)6~`0SlHRwR0}FfQbH~>*Z@D;=jiF`>p=if>E-M4^TSvPA4kvWbIg|?Arkh3D8yQ5dl@Jo>|Mbty?3)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CKA-J#CG+{* zif1dI&#U?N^7%Yp7OfWxTEwzmEbLHQ^*W&vlvOX6%_)2J Pa`}Qbtyjw%85pbqLRcy; diff --git a/src/themes/aqua/navigator.eq.support.gif b/src/themes/aqua/navigator.eq.support.gif deleted file mode 100644 index 1088a6c67e239048432e75ecbaff67a97ea4f84a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmZ?wbhEHb^kR@?IL5$`nVGp_#ftm)@4tBQ;_1_;SFc{ZaN)wDMT=ZrT^Se{#KpzW zpFh82$ByFS;)M$rc6D{d#KbIHw#?n#eed4AeSLir5)%6Q`nPV~nmBQyfq_9~W#yqm zhdewyR;^l+0&JPoHjNWR#kk`sB%zjT<-m`1s72G2_&!Q_r3~+q`+Rl$4aQv2j{jT0=v_%$YOK zoH_II<;&T#XTN&&YR;TFZ{ED|^YeTE{{4p!A3lBh^zGZX?c2BiA0j~UCkrDNLp_5I zFtiy!al*jf5OB`lc!9bHhl`ytl4ws&YQnr;iAP0n3pYI zv2xYwHEY+cU&FF#^OmjKw(r=vYxj;N`}Q9=IEVGf(PPI?oIG{<%-K_H7cO36=it1? z$#v=0?K^kx-M`EI=<#D7PTt3S{7>GzefRzyAIFC;@A*03^YK06dCkqw^ULtTc0XC` zQs$$KSJ)L99a{P24n>P8Hnwn{Q1MW3Q)D#kzOE$lLgQc*Ym%^5#DsvvWX1_XIuSh= z3YW4>JgxWQ&Pn0stvpg@Z=M`*T<$-YQ>$dh1jWOw^JUC(JQh4`VqY%4OwU*A%L~>; zHiz5(I&52WlV8E9V}n`K8V?}IH?{7f3{+)gDpXxX!I<(x~+~KVe zcV@@NP8KzjvXr^s2U+kjIk3`gkR$RC<<73zL4aukD3}=4p zysjg($L|8u_AXJ~lKo{LlUljNHgv9k@Ym|cn=6}>56|$MTg4-GHBqKr(fMePxR#KQ zzX3B_?_1*|hdun6*|eA6wTWart2S`MAaV>;IeGnZUqjbfTb{=P&CF2RGs2`e7_0$QqEg-f diff --git a/src/themes/aqua/navigator.search.advanced.a.gif b/src/themes/aqua/navigator.search.advanced.a.gif deleted file mode 100644 index 3cb06aef3afa52b2c966218a21e613384c8c15d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1111 zcmZ?wbhEHb3}ldGIL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HlrA={7XA?wPSRx2&Ck zfx*t%H#W7nYuajCXP=mqqU_Svs@54nk;wu=B8tiy&3*HevdW#@1Lm&St*ol)<{ca! zo6$XWSw=xkRr5p>3%f;Y_fMF$s;+%%R6~ z{ez>_HFd4+oRcyNyC%-tcHq2?gKJ=D%%W90G_>?mvx+Mly85Or+;{Bi{^Qqm3Tx93Cdh^!pTf)M(IUhcH z{D_O2=gA{p?w4=hz5nniIQRqKx9>l`^K*0m{4VhK52uXBh6Q^o*@X3Ouq(#1aQv2W z=_v4ba_$t+v)Zsju!*IHUol|I_kt((93jg@o}?ulVqzB2a@p*Vc&L?2-|$3B8)Gvg zi>N@rf`o$yT3Pjeif(NXW^Bqg$z^LTYdqA-DY7B+^ntCb!`Dffr99ZMfcZLal5s`E zgon;7@u)xuA#9&zBtkxl_s9}B&WmY<&;o8heE@Ug;?OJsxL{4}25ACpCQ6u%DJn8et9pF8S7 z+ykcV-K;y}IodxmeeV*}?i074H+u)y{oUd&!T!b81COV63+jv00O=jZ(K@T0xlqsG(D^vJgMJ_fAd3snLVG8AIbm9LaqL?D& zr?=s$faiqBmWdupJCDpMxt95SZpE{e&*#;A^HdjZVAFcBphYa}#ljA?RT&F>OsO z*6X!9o~?SlZqK(@*=qw?wBKwvB9{GT;|aCZZ#EtBdiZAZ1vl-tTdssUUqP%C&okPPM$bZh61Z?S)V-{61a?dyq2>>S_{ zFb4qT<>d&1?Ck8ID0*;ku(q}~Ha3=d%WHK3#$1|JFsi~V_5GMVe^>w9~9wY9Zct#*EXzN4dK zV`GEOX7BIsn@pyNhzLHPpPrsxT3QOj@WR5v;o)IfS(#8M+}hg8$jF$On6TMwcDvo- za5$Y#m&a^iNoM@L6};E# z)AgH+2!barfA{H&mw%l*-|c+)3R3gjqmmSA`~<*YbzX!^^tuh8WR^hQeYMKsDxCWE zER;dsP=0{%2Ei;C9-Q*@4vOi~>93lEJ~$#PF@c>X#0F8|!P61`q6a}WE*O8kP3RpI zl~qUcgVqLa50x2f*btVOca1k|WMc6CMMH5e@q0|d@Ht55Su8=2Nb~-+DpltFPbu1q zbjQ<%K!J6-jwxV;r>Xg5QJ^>>E3MWV5X}(B)V5|EJdya{#CKUTN^mjRNK3F;WuK|P zW$1h-MF`^JKZ`G>e#rDOy+$!q{P;rXV~V?tc%7%5ad%>QzvQWO!Y?i^eRQNKOc9+r zEu|{)m2RCc?v0Wd#QIo-bZtTmCI;-5aqlY#4I28UWf{k|7Mfan!J2X4mEe>s; z>A9E3vGul=_1pTS6`Aq?SQKYRdRjPkInvk9L2hd7_5syg-0`4hopU^-xY~8B(7El$ fN*PwX~&KcvIFRxW`2{cD diff --git a/src/themes/aqua/navigator.search.color.a.gif b/src/themes/aqua/navigator.search.color.a.gif deleted file mode 100644 index 7d8f6e77d6e63473065d26ad8b16e7515647f111..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1668 zcmaLWk3SRm1IO{tMm8f>9R1MO%Fq1BXxLaRQ#OZI%8!nYF5migB{}5bM{OBqer+s< zE&FBjV`gTB63cOzUv>KBj!WmdC{n(zNY{PmANal=&&T^ecn6UWV{!5EU^{sA0qBB2 zAW$e&ZzFv@eSQ5+oAfssY|=5%1%tuhFgP4;h%nSa7#Sjr5k|T;8*et|Is z2PZd2XS9>QrRRcaf+56Ps{3HsOcU|4xiQdnx{0O2YSP2^TZYC8nRgME^c1{d_X@LUQ)S zRNAG~Yf0&Om$OPzvI^3&@=~*zso6y-S6M07SgF_8X;gMPwfG8+l};;7r?E3=MH#f> zjO(n->m`}=vMf3)n_iMZuguKlWapM&&1GlhRb=OJvhypi=2uV)xYUBGYs~5#W<_ox z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eKeLy%7 z&vC5v59ia|gANxm{7Vk!vqLuzm$DP|KP~4y4*IlGkTBV@%B$Y|w8n4MKU%LC4mw(c HAaL#*ykBF%mC6_qs%O|9py*ll8ACnzkMQBV^e zo6$XWnVWZTRrAC}YxkR3+D9d1Lk7H(+momEuPqNbr^ zY2y^1lDBTh$&#uz-=Ih}hYMMG5cb`_*)J@7Lw6=2=5f$&6IIpaxeeSX? z+YX!$42`jIaMjS#t8D1%o4Rn(svY}|U9D^B+kgDpkux{XUb%na+QXaooW$Lu){Yhzhj=gwcacZp@72FQt~10x9Bk(JCTFpu{emn@%{xA)6X^!`?OFdVkxfugyv4#L%-3LI(0I_T zK$ItBK|w-OEB7ghmJ@$T`?^xHH1_U`JH z<|zm{KQXzAPu6-_`}2bhR?Ko{C$hI+T-@IK`Ck5p^MUu+%3oireR2PM{C|EnD+b0E zKAt}t?(?%43AFG#8ElYec6y=iBJkjaK?}dYD|ePwM~;Puo0z^`j~7&#ma(YQZAr$F zPMvKp9(5aRsyNbPaxLR=uf?+!kNa#cbsXt;VAFgu!9^_d$wUt(-!< aap>lec{Sf&KA+#fruAY$%O^<=25SJt6ys9> diff --git a/src/themes/aqua/navigator.search.general.gif b/src/themes/aqua/navigator.search.general.gif deleted file mode 100644 index 9936c41919d024c5bebeb8612e08a92cfd1cf577..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 999 zcmZ?wbhEHbbY+laIL5$`nVGp_#ftm)@4tBQ;_1_;SFc{}>gu|1;ljp^8v_FaWn^R+ z85whOa?YPWKXc~HfPjGY>(?JRaA3!d9g7w%I&tEJrKM#^NXV^Qw<04WWo2bou3R~B z;>2_3&Xtvw?c2BS?%lgFF)>r8PF=Tdot>TC#fuj!D=Qy9d{|#!f9=|}EnBuYIy%P3 z$IqHI>+$2q+qP|MY-~(SOgwe!l%k^IlP6D{ot+mfSdg5YtfZuL`t<3WH*Y?B_N=wF zH7za8#l>a!?%j9p+hxhYw$tnvFI~RK z!O6valbh$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WU zIX*rlp-m6g@i)wQ*? z_4Rd;NVKuBvAMaqwY9aqy}i4;yZ^uc3Shr0k)wjB%%DI_YzQ+LLkSMT*g?*&0Q*@S zCI$8Z;m0CBW&z0WAPcExUsv3ffK=4;9jGfI>jY~#aP0Y|y=f|j^yvY<_8mtI`L-HV zUoOZw;>Pn8Y@@ks;;%vu)Nt=fAt_okjpF4z`_m#pO5LH6J6vX;qxW{KzH+p}wd_Ka zbrbJJm1hHeM%Yv}UhA)pJM8#?z%mXR<@pUhI6m3HSQOs%`6+9rH4awSHP~D`+riot z$vQnGz9w9e*;lWA7)kBR)P9w?$36x~6j(%;KY-L^B$!5}-a%wI0^&V|_+3`4!<3nV z6bu!iRn6w-o86ttl2UPx-HO;*l}JFGVVn}St9?KKL{h|E>-Lu4Kr~kjIV>py4u)5M z2V8Qyj0Qvl;&+zTtmL5_kBNfZU@Ju^@q`h-=FF+N<_RLq{cryx<~5)!B@!;5WkxuDJ#ca@VjubmL;2^|7+kyvRH%7O%-mS^=zYX?qX zlTThqDZTxNQG^Z7EyWem0y~i5F06*rPb|23PExiG^#=L>cbVQ19U?)b+sx9j!L5sbCv$Ctk3c5#$n@{^_`f$Xr| z$>55sF`A*CQ79$YQpxT#lO2{Sc46$k$+elXowuK6SqOd7Toluy6KJLz{JoIAe?J+` zG150(ET=F&FBi~iKCf_M-+f*!PIhrPTFz#CS?5;Nd=XVQzx(p0jvXM}XdGvJefw~= z=Igt*Pw&2N-s5QPZS^RJ@4X+;t=-!mGTGca8g2dax1F(H!oPi-pw)icosKoPvjC_5 E0Zgr@;s5{u diff --git a/src/themes/aqua/navigator.set.calendar.a.gif b/src/themes/aqua/navigator.set.calendar.a.gif deleted file mode 100644 index 2b44f0b2e0c5037650333601e9444d1bef75b40e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1042 zcmZ?wbhEHb^k$G`IL5$W;T)Qj-?Dt;p*=@0Z`pTt*~UXt7HlrA={7XA4vI|fnX%T+ z*;igsje&t7x2!!jwOG%{vTNFEenDZM;P|T688InE*`=*=ifW3=8UjKh&3*HevdW#@ z1Lm&SZDL`UQBYIWJW*Ly)6F|LJT^m6Sai|a{brW-ImPut!lDyqt@7{WgdXlib0ZENr7 z?CS1h?CYN}anj@|Q>RUz$~0^CoVoMnFIc!}@j~Wh%U7&iwR+9kb?eu%Y}&kK>$dGX zcJA7}lXc(z0|yTsK63Qf@uO^~PMYK4ROIVtQQkkCGB@%T9BlrlX0pNHf>SHkf2LQ}7U!9q z+rP@iHGEjl>0FaN|JZQpTAQM-l_JDIRWPkz68~ zp)fh)%p`-Ar4gsLWHR&nE;h>ju<&p@o2)}Ztdx@rJ3p^miNwaKEFDYb7MShrnzri7 zihrt)PR+f2;K-fbs(y1a3Y7Ajh13FONa#pxh~3}um~YzbM=f3Z+de*ub=5Pj>ZQX1eBD3%LF5dqBzNyrWA9sJZ zeYnS4aN)qk2DiRvN3yTHI9v0xP|9lA^9zo$yGkBC$b2K=zt5(h&9-8~_lJ+&nZG(n z{kie5j=f*b@yh!T8>D*jDU2Gv#ZEO zXMPu+M3yQyiGvRXd0jeO1Rtvyy0i&Sy78#hZ9_+k5U)m|3%}Qz2$ohGzKuuv9oRTk zgndm8woLF)D_r?xl8@QX#lit@nop;Mgk?UR8j)7{R5+&W<a*+l$trrVg#Ijy2>`<$EA<|>^>c!#- gZdxywObN5n6rGW_>gBRIWv^Z?U(og|Q-Q%605aPyjQ{`u diff --git a/src/themes/aqua/navigator.set.calendar.gif b/src/themes/aqua/navigator.set.calendar.gif deleted file mode 100644 index cc3eb2fd825aeb6f16c71c0793211457364d0597..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1032 zcmZ?wbhEHb^k$G`IL5$`nVGp_#ftm)@4tBQ;_1_;SFc`OwrrWZyL(w#*@X)iVq#+S z^z;}Q7#1yB)YaAH>gsy_{CRP4@#5m*9Xoa`T)0qQUtdB(V(;F)eSLlL@$t8A-SY78 zm^g9bs#U8D3=9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`$O9byr3U_c0_Yv* z1BFCVQ8AfPQd(C2JyEN&s``f-Dy^3OfbnA$sJ?;O$ZBeCVYjxmH)wZub@y<2y?y-y zgF{_9{L!&-!Gv&9G$o!M1<%aRJ(A8pUXU$5S(??A|GcdD<=2(f=Py=HnwcpTdRyB& zTkoBKXdwEkHwTBmA3~u=2L1s@2QWYzlB5()YUdkSd796pD2YTE$^~y(fb=MV!M%ku zyftkw0_C$zNr@2^8KM0x9|Wxls~|QQrqOxjw5}tHRPOXitcYPU9%?zXR|tZd!y}yV z7pAbV_a#wyf))f%e^{rS{QVvO*i@Y%=%m%hdH$}V&NhF zTUnq@;Um2;z+@wFb+mXR%P95k{;G(K$jlUd>K!Wzgp(-tpt+3^lvkNWSH3uY(FR`W zSQXx1XoB*io84xKPb{@Z^>}=6??^4{#l17I;5#QTVyf*U>%FGaHtpdKVO%SInhJBB z>nE@Rmm%y1eIs9=`73>IcD~8CAjch|UZ@?S2Tlm|!5^s>$OU=F`d}w96Uc#xWrg~V z(%M4k0dg6X2bG60bM?^6A`;^9#VB~N>?{rfmtUNsSkwH7AZM8;3+5tC(KbM>r%XZJ zFrF-so78fH0@-#V!kmTM(Xew*n9=ubB z%z2+nG;|+cA{t`fGKEygTc%BILYjie@GL(i#zun{Z_#dsE7;T=&Hgux5T>~|jRI-h zW|cc$(lPdiE^as1TqEqX(BlXR#t$=8JFU!OJ5^gVji73;JKd=2=p0n3I9!RHy0c%- zR~Zk#>`-@)9jVkkLS6e^?ub>?E^h|S+3l6OsCWBhKKGJLo?c7b8(5Cx>|c!?$`fCW|M8OZO7L121YrLGfZ%iA diff --git a/src/themes/aqua/navigator.set.contact.info.gif b/src/themes/aqua/navigator.set.contact.info.gif deleted file mode 100644 index 659c4507cb1a30484228cbec1d5e3a5a28c4125d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1140 zcmdVX{WF^f0KoA_C>{w3+6vtq7B5FjLhD-Vtwa+XYqMMDCx>(uFI{)J={ee!h}WuF zA{tMoNHQWKDN2ZXOG90#The-|3o5C|^744UI^51){)~P9gwHo2iG2AAH68Ey7^ zI~Sk?IRCFU@ZS@_>4X6=%gQS%tEwN@JgNPq%#Ovb=QKR!HbT7Ln%IbzR=z;^dt1Ax zL)_VFFO@y-?&*Ee*DoI!lsUW{9vK}QSH4nBOuinLsHbP%NKXBs(Y}2*H@~p>e*Uzl z=h9opHN9cY$r&_(E+4HncoRkiH=r7SzYkjymUp)CrwIqBL@3{2+uLRs&r?H-(#>XQfM(`7; z$jR6Vq-i8J9(4)Fzk|4R@d(#=b4=Urn)-o$<7ss4^qqzzCJ*NP@XFj`j2N?^I!Iy`)<#RrZY*-BrL7?~&(aRjBo+~SPjBhqSB6@}ZQML-r&x5H ziVjX)M%&;%Ejetne;PsE olrPb`HV0M;Y@37n%7^zbM(*9MA+xA!>m@v3+Zx_*L;zp@1BT>}GXMYp diff --git a/src/themes/aqua/navigator.set.identification.a.gif b/src/themes/aqua/navigator.set.identification.a.gif deleted file mode 100644 index 73e3052edb63148df514251b4f89ce23102f09ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1198 zcmd7P2|Jqy0KoBA>WGMVMO+V4?>cG3(efxEuF8aNSk_g`9=b4XGi-Gg&GO8Vgf`TY zI+|&bq$KW}np+&LYphl3XiAqxH3y!pEnBDCzQz6@;r9!!kC&@h&wsF%5+A4EG_w{y;Jw_oVS1A)ojk^;ZdUco(u7*MWw>QiN{0t7sqCn zXBVE$FK#T$HeYOMk{Lw>rD7c3`ThSaXkS|k0b~J=|55}0JpuF%vVmMCi=CH$?K-ER z@CI9p%ez@zQd)M4|5N$xVpwIBKq$IfT_cv%)(H8;3~Ey48>2J4E=mn%r6N^NMUR&MY9 z@mhsIA&o$!@!lI?$&&)MQi=L-6Ffr#LZf-0l{-J18=#|a%9H&1J&xTVo30jgjpeGq-)REkb&KhtEhX9g@%%?Qv6OF2!ac zqHgu7-6!1R!r}Dq&~{;RRP$eNHL{N|{Msh#9*rEEd2A?}NKchL{@%(@<4wHs3MVZ% zT=k(2!W1!fD~K1%=Dfv6w0dOu`XF@h(%-6D-v52D>(nz3qwfpND|3_|@XzP!7HzH@ zfMgtmJl+p7VXpoJ659=D3$ZW(nGg#x<}bPq4N_ta5l?KP0?T^Z^J`}G;8CRU%DU9R z{^4E>%R}2<&LymaaVYZh13@;=%eIchC9YB8xZXIh8s-x<$t)qu1jA*%aWy_hNBm*rbA+CfgaU$W-WSgBiL!CM-a8brbZ*QE|q8@IOf)V(kyCTSg>!Of4+%o!}c(0GvmXd=@-KtE$PROGFaIR=siS1YX(Lxfri(>QU4yn>%ba zlr6)$4yx8MvjkP!1FV%Jdd6L;>X;`xs5=+VCaAmSutIhBTDnqwZ#~aJ(<3iiZ9=~k zH)wiQ-AYa0&V<8uztTBodtgt|us!(hjdFVk(7SWYMB6-ZX9Rw^SM diff --git a/src/themes/aqua/navigator.set.identification.gif b/src/themes/aqua/navigator.set.identification.gif deleted file mode 100644 index 7a8ee1a0ae416e7b8a9b3d024dbd90e817866410..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1182 zcmdVXi&NSK0KoB|%7h>2P`foXn^+9>5MkQG*6Pf+)2&*a*E~<5;aj`a%IV!s89t`g z7>Gliwm~Xm=%(NUaJnHlk1-S4sq;(+#v>j-9#N6YSM_J~{S!Xl%8H zhr>xoNEjIzp;D;^gQ2UdORZKH7Z-~}qWb!JqtTd~o7>&pZ8n>GdV0dc!%Ip^78Vw0 zG}_qMnAK{v*=!I5xm+%{+wJjqyk4(FB2g$5iHV8(|IeaczGKEMg_T@TZTaJ#jYtB@I#)64#LdR5vT+vFgn|WfWM0Ci@EG02Lo{x>q)>|5Xew@K4JC@>J+M$z#NZl{vt1yHaO*|YKHACF6Dop|7S&BRj9|d z(HoUohzj?3A915DKM#x`QM0r@sc>azNUaKgR-{w030134WMa7L78s4_I4t^no)L9n zWt%r)e}+lEgkZ_PfzX(=xkbXZ7g~!9X(}T`NFaSw8MJC2w%E)W@csb=4>d$^FcS6xa* zB5(ro#aIDTjzru@PC>?DxfpuDTV)g^D4>zA#8Ou&C{W79v;}=-;WZ+}Dmn;GVNzOO zs;J#;CK?3>21(BBN4&3K(yrkFSqg(Ny{kRPIEH1OYx{7XJ8+GN#SDV4VPy*BsUueU zb>i1yd^VnTb^!HBg4M{VQtQpV=e-tlz#G_)8v7DfF;ri09piU15vw-`rmC6pfCh!$ z%&S|Gm-;5D^f7^NE+wZ9q(p>U`g+dTa9p|~w&LIbr^0qez!%zt!;?1K&}|#WK0Lls zVZSRi3+?x&z4`Woa(_HDI`?uVBvRpqAhFV;hsLxSc*posUZrDVwd9p*^m>imA&elXmBQ_dMP;{m07BPV|;}$n{{yYj-^a;BjvGwlBp!i-;a}D+1nz O+{&QLzVjI1-G2an!Ln2U diff --git a/src/themes/aqua/navigator.set.photo.browser.a.gif b/src/themes/aqua/navigator.set.photo.browser.a.gif deleted file mode 100644 index 439cc824fe9e56275c9e71d7f0846e4d4ab8e8e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1276 zcmc)HjXTo`0KoBIv-)i|nQe}GoHo|BymS@S)|j>BEpxYWPIc6*lG6&&%a!Mny?JZq ziX5Y%B%2zkM90hwT{OkwF4{V*!o1d%?s0eh75DuUKHuQbAPO}$5m*K20f54aOEdT&?R`~i&)HQfw%;A*mLS^)!6YPisM^B2*ii+$V zF#aqyFX6O6dX*W>*|?d8cPFQ$<)F~m((2~;q_muZDqjlytRO!sCf)(#=)QJcP*_Ao zZR-|lz)z9_e#&_Q(IX^0Qh8T@;*5~$#}r*GK5*#xt;X)uv*K<3EJ>ccxUxQc_g>;U zFK%2S2Kz-_^KYlpBs4mUw9dP&d*{i5r&F1X+CSqT9ewnnO{Gb0d{72|ATi`t4 z^`AEI`3V3nr2`oPp-3#r%*xKmy(kqg%m4Y(<$}U1MZXl6$V&?#it>ueYuBr8RNt&o zs;=4GR@c?vX}Ejue&d6t<~z`qR!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~2&2uyvYl y9OBxkn}B(AO2p=&giQ(B?o`_5BqpWPYbqjZeRCSiCTz_(*QRaF;_K}ofZxCJY=S8O diff --git a/src/themes/aqua/navigator.set.photo.upload.gif b/src/themes/aqua/navigator.set.photo.upload.gif deleted file mode 100644 index 221ad378cfa01b05ad6196d38f76a58c8fcc6139..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1202 zcmdVXi!<8?0KoB|Uqap$F_oB2)Ge!eBn#cN-As#yd2K!0^{^2`sh;UEn>qTEXen#F zT9R5T=`_-aN4(pjkwliNozPl|nwUr<2?^_Rx|%)yjD7!v&zBK>GUNy|3m^e10LaP7 z5s5_0%gaWiacymFZf>rqs7RyH005AZk`fsiSzTQ{Jw07eP#_QphKGka9M0(IXliOI zgTbIusY0QUNF-{t+WPu>xm+F<6(tsni;IhCG#Zo1Tv}R+j*gZ{B#n)YD=RBaO-(T| zF{`Vq&CShHsdRF3GBY!iPN$cZm61p!y~I+EiKK+$bcZ|@Bc&I zFX0Yo-~!e{m#b^Ozf$8+SKrWh^;%Oimv_B|2i|Pu3vT_` zc3apky3-Dmbar+3NPGMG2L^`*;P>v2jE+5!jms6v358hwaPrYqtK+n0W_HHO>G9L~ z1?^K;x5WiFS1m%nW50Tl=_PuGe&yg4MQsEb1#|C3h z2UaQyT_62{CrQ&E7JMlB;^(7p9L0MlvH?L7oaH>2T%-PrX+QgGN2z%;F8MI%;>Cd_ zaCQ}Vmx#Qe?tmMI%`WqOxs0$AC3eDFJ&j?s^xYzYfdNh5+$-7n-Lzb*3-$WorR7G|hHl-II#<;WlM`QPo{?N}u=is!h8CF3$AlO}J|NY|^}*6~J0KX+g>S>qBzrn}o$qiOv(~p? z#;PUUs`I%L0`hJ*1lo+O`s4$5GSD>qItv}pMr-4R8i&S~=a;c+X`VQ;ZuH9^X y03iHrGC0OlIgWf=Vv}Rvv)B}PhW|Ut6NJQbTNA`Hk}Z|zH!Oqz?Hnq5G z+Ul5;BA?*+s@56VrLB5KmbT75Nm=F1ee<2%0}M^A6_qsvghYZOlZ$J*=dReDQBc!8 zb(x8UT~+f$L19s4RZTbV;6-cqn_1e|wNK3{t``y(UA^^KQALZTjgy*&PHXS1bvsU$ zRJB>zI{OAiZrpvktft-C&Ux;#Eh3`gT@&YRJ8-_Tq07d>RYOZ}(W)J(S;hN~UEP2D z+L1Fi&tAEI;o8HS_ntp}`L3|0@Ba`4ia%KxxftphbbtZQ0E!a^_J0iwP0cN>ZS5VM zU9F70ef<+APMSPr>I9}4GiS}7Gk4zn1+$qKFIl>5`HGdRRxe{&w|>LMO`ErD-L{c+ z=dRs*_U_w%;NTv%BS()NKXLNZ=`+XK&tJI6arp}8#S0u<*Kgmsdzbsc!$%xE4|zFw zA3fmVd-afC;N7RsUmibw$nlY%pYQ1#?*9@t4C0M3yIKFf)4g$hy__+NP?xWR!$AjD zZgByLh8+`~+*l-dA{+t~n~!n{+4ybf2z+eBYmj`(WdoyHJ0FKl#(~ISX5abpB~33D zBr-G2kn20dBAE2te`bJb#|*EnT3a)fJ$z&ho3xsQl=kJljbb_&CLH6wK=k0&Rne>7 zs6RS2x0~T;%udaq6KkuR-goX%4^Zfs?Zn!3SR?Gu)#~kr-Nz>=D`yBwZsHc7puYLS znMX$5VjOb&Ibv@XKfP=av^uU=;aJvHqm&hSyv=4kHw=;#W-unR@k;JVys|_0_trw` z6O*;w3!E#9WGp5bZ#TTlR`SGh+3N$2x$R$HoICtk!hheMpPye`ULBvmul@J;506jJ z_us$o?+?3AukWAVzyJS#2DTIT`B}s=9yD^Ot$5JHBgb*1S-?%>VT(vu#=}-2wuKMd vWXfJVY*%R0NNRVQlJTfhW7&#FT{_!39tjv6(|FutaxLR=uf;hD4hCxgRip-) diff --git a/src/themes/aqua/navigator.set.printer.gif b/src/themes/aqua/navigator.set.printer.gif deleted file mode 100644 index 63c4ada886b5b83b12ae9887c54f832c42772ad6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 684 zcmV;d0#p4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!MQLeijg5^emCDD*=g5&Gi;IgrJv|c>6C4gFGBQ%H*VAaUrlzK(q$GpE zAQp>pI9yazRC9B4dU`sYPG4SLZf$KfnM@D_Su7T-)oQof9S%o-e}8mz^!fAWB@#(n zTN{(fY;SM>^gk|e9qt4I#X#7<)WCmF0GCZVz+{z_mX%jjR-(M zgFJDvthu$Ve+%2 z?$i+^=;u`kjBpj@n7|n}K_ub(8>FN16QEaBGFHfy!%^g&h4l*!?T8Df#Fs{e z3z-bii-6_IvQ0lAHj%TRf8CNDB1Pq{nnq>2S!M2dG1;=mhZruy-d?Fv*;OmT0|Y*p zxg-U`9mJeAl6b6h>fDf&v1*Q7H_2L$Ox94zx>2T^?~G`TW!6d$(p>|YbFNyDQh|NI zRhm6_RuxldDU6DDieIA2kHH3h)xP9}YG|?hSC{=8T>O96=4QPMe${nay;;KC8tlcT z96DGEZp9}*KY2qQ2O>-%GFU+v+UQS*RnoX?wA4^5lFGbpN%y%rD1C zMIj{JFx2)zt_a*o4^ezWeyU43vCKs8nWF1C#~PP+)cu@)52yD-2WNXHi|tbvW@v&g>2&i y=R-Ako`B}c=hEi(XTJ8PVW04T77X~4O&%`=KWlO*na^2uekgG diff --git a/src/themes/aqua/navigator.tl.bulkupdate.a.gif b/src/themes/aqua/navigator.tl.bulkupdate.a.gif deleted file mode 100644 index 517043c4402f08d96da8a83dee9dcc8ef89ecec5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1677 zcmb``iC>Zj1HkbIH9*qBBacD_Jj24&<}tTk%%-B~sJ!NE15v{xuSiMBL3n`=9)L=M zig=(Ah+^S#C7F5T%(v`VZ+^;Z&1%`&)=I71Xn(`|`+Wa}Uj#8cD46;!;0P=&0mdK@ zh{?xHO-%pI?B6yRgKmHt!JtqW3@376@(Fo;Wv=!yJ)yZ+2k;^tGG|Cz6q z==rqF0%|5RExRZ^yC^M(nU-@rBZooHWv1qpXBDz@3Ry>vaTq0)M@y@ZmhuW%wS_DJ zgT*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O+<=G?Vsy-Lm6^E3L`HI#M||L(=mo!ocJ!%LcX KF9%^}K*&Es`UZXg diff --git a/src/themes/aqua/navigator.tl.bulkupdate.gif b/src/themes/aqua/navigator.tl.bulkupdate.gif deleted file mode 100644 index 0240082a6cb9b127207d0104fad394e55e4ecc7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1662 zcmeIx{Xf$Q0KoC@*b^F=7#e0Kk6XhDm$V|!uAPdym(CV>SP|XsT%^7vTdYu?@{q;O zgqwLBB~LF8L)nmooMD8BbLHuJ>8?NFe!ush@OiyHZXT}o4)j1k2Y8nc{0jnsC@3f> zDk?&uP#6pbhrS#1tLqlWVzI~dSnivd5S63H{ z#p>(p<8U}U9#0?;jE#*=Oiawo%*@TrEi5c7EiH*eB8fygc<>;ZOt!YRwz09XwY9ag zv$MCicW`iUbaZrba&mKX^YHNS^78Wb_V)4d@%8mRbLNbnpP#?Ke?UM0olXx53JMMm z4habf4Gj$o3kweqXD}EM5fPD*kyoxQ(@`{Rz%F0TCKu}dxB@_y)tE+2jYHDk1>+0(2>+2gD8bl&dV`F1eQ`6I@ zPoF(|*4*6u{Q2{imX_Am*0#2`_V)IUj*iaG&aSSm?(XiMo*uDS+}qpR*VotI-#;)g zAdyI3T4GTHR>^vul6?Ch*u zE}xs5o1dRwSXfwGTwGdOT3%jWU0q#UTU%dW-`Lpr^1uI5z;IX7`RYYF^I|YACY%|D zI~{fr=jP!<1q`>L5M|&CVEJ{Cud@KiUEmrL>n`NB-$H7b2Z)7+$4GmPJPX{bi@Q>_ zZ5VG&qceKaaLy@Mj~ZU@1JhH91)Vj&_2-a-`U*U1OJC-bj27Sa*77Aqlv~Pro^_@t zv)mt;pHIn5ALdg_Jnt?cIH$-rN*R;ij!19YJmWq6&QNwq(B^avk|277ow=x|Z5KY-6>&|0XU7{(?6!FUhz4GN=f? z21*Z|j6@YT+YResyG!($X$mmc5ODJnM# ztCS2y#oB)YWFYEzFm=}vB+sh(yDSV>Ah@N}JPn7TTDPNtC}4*HCgFJct+9W9{JssU zYt#vfb)W&$2KaNG(PAw?K5c+Q1JUjV7+^5)W(sp*niX1Tn~2p{kh-!Cm=D1LQ}gz= z{RY{;7PBmh&z@lU*>lAxZSfY}FpgK|o^lePoxq$IQjc@24$a6PP!)h4JV=9dsDJ1A z&=`BS4MNGr<_eLSC*d-9=H=^S?CiTjD~b`3yGF=A%LANIml=1U0I6BVR}H?uE#@X^ zDTCOgdym_=KjB&!df@}jy&TQtbrtS(J=wY2*OVQt)e<`4-O`1&^iXuN+zJYVNRC$ za6&wr1|^)L9AGPVUsVAx2?RRNDBV=nWyE1dCF-SVC&KHbp2e#zpOcXkh<@hds=csa z(6#cu6auy&F&W_g&z|UBb=^HU3f$GPgA6F0CPNA6RW1NKjkD}kQ*xw0RS|MSkG)8W z;T@c{Jq?5&a=}^|J8mxjC7~dQAEgvU8e-7h!&v*~W6ZF$P23)^$Kp@QxCf|w86@3^dcO}f0C$eqP9zF=pmQuJZx KeJKJ89R3IYxsx9N diff --git a/src/themes/aqua/navigator.tl.content.indexer.a.gif b/src/themes/aqua/navigator.tl.content.indexer.a.gif deleted file mode 100644 index c4cd31f304ff0c1e07f6ee2b102929aee8c1f317..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1753 zcmciCi#yYQAII^p)6Dr;at&>yB!?lIL()dGLVoyBw-L#m!!P7`r^VQq!(?VLGn$P# z%+_WWKP3{4Sn0Qf>v9(zejU->kx2Kq>;50^=k>T=f5GSd!QzgfJmW6_=D@2308B+i zMHNi#f2pf$XsByIG&CR(h^8hKObe<7($)fL>u71~>ged{>gnt18R+SQ4D}6+^bL&- z42=zqKqf}UAX5|5?WWtzwwal42kn5FnZwLsmM{yrg%t>4xzomKr?nM)mleVmZVlRv z*kxyH=dj1#*=`>QY43>K>*!|h=&}#w+Xd< z;N|Dxg+X~A_Vht}9z=Wng7NeX@b>lhIuz)A2jF75zbxxw`FXYot*IW8W!C%G}%drKi3 z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A^Rr+-FWLSUR?%J8=O&*O(4A|3`zy~PdU;e(Q`%XWsR>iZ)iS$ZVKeoA z5Z0FUmSzxe`MA1rk8E;v*qE^H_dync`?Gr9JsDJW2ye%`{mt#di)Lp53kET9tPw6rO1VyEdOab8+Y4|m$7;E{z8DWn<_ zG+0*OJp@fvPbGZN0KhbUnhkhg0w6EtF&ZgODCkmuMu@5mu-W&hM6eqlV=ClLsSz?n!u zZ!1_0d<5gDrP>YiU;SbU;vh@|d@dK$ujq#|vK|UU5qbcwtb`T@XPyE~H+9QTe(hnG zF{uLw{MQZhjdqCC*@xkz*wJAJ@p>@eRK>IMTh;mzKs{p#&%TYQ?Ya`aR%ID`C)}53 zc38m*#JX|CDVUXrI)PoDf%fW~m31`)Kc0H#J{Apmdwx3}iqbA~>k2CDrpavh=+@w1gakSC~;LMXUM{KsryG(DjV_Yuq zPMrqQ<6$=%kXVG2x*J()fIWjl%Pzms~LkEYRBJ=Hh4CgOM^y>bG<9djeJ@ z5bJteFBv7t8C=#(QUL{IZ1>=;A7AYLmWLONk_K<@j>Rs#-pv_*w7a%D5r5rXF!@9& za&Ib8w{mYf#e98lCf&uH2ue$E@!!FmB!zEEeZR9xO3SD-V_{>emle z*uG@JYVBa;;abB&<>7kM?)ssK3N8|C_jyGf|NSYL mb-XhgBRbxl3~%|cH=7%EvcFi$IyqRa7o8k#)X1I&F8u=`F5mJ1 diff --git a/src/themes/aqua/navigator.tl.shop.item.generator.a.gif b/src/themes/aqua/navigator.tl.shop.item.generator.a.gif deleted file mode 100644 index 49562bd2f6119a9852746f14050a9ef02b8cba73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2572 zcmd6m2{#+)0*1dtREQ<^SVAl%3DHE$sHL^EgrL=Gsjb!yrVEO(ORQ-`?P`fNG=?A% zOKK?1ao9@4vXudCz&?Kk&G@yV@KNs|8x%&CdWp0DuA@ zbqE3j044*Kh5#A4Z-&C4yhuqtg4`*rl_i} zs;rJw*Hl*5R6}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Nb4O{)Ty&sq;zic&oqtsv0bEchx9%A%PJuuV%H2dh`@V*7(Y0A1-oZ@PKl)ls+`ZZ$|vptC#- z1OvaX-TN?zTxPZ?eUbJzVa-?YqXTM{_hL=oyw|bruFSHOLPpCJHwgTe(Iz_7Qj=oU z8*z469rmAOkzFxNpzpACyY)Oj_I^2w~~apC3)F9^*dF zITR|279!|YIhb&K0h!=3CHW4dHLg0C*@6tAp_x&ugDwYecj{1`(*NI1IPLl{3TcXz z3XKvDl+eo@neuBdlgw-oxZ;S-xMjL#+QAmf`nJ^j zXrJV!4Qm7C?>?fvB*`X#Ez^@SJT diff --git a/src/themes/aqua/navigator.tl.xmlconv.a.gif b/src/themes/aqua/navigator.tl.xmlconv.a.gif deleted file mode 100644 index e13e81fa00ea610aad5a39d76b0a07d5585c0992..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1303 zcmc)HjXTo`0KoB|Z5O|7WpCs>s*N?XCNHO&7-nL`^Xybtc~nzeyIHlOl=GCc%^11a z5h>cdwTuo;ltSAYDN^2|E~%C}zZLUxch%|c{)+ql37>C7WH`e=;VAGmU;+RJd&mAG zlFLo{TXzR_9euS;`Xbe}{L+R!NhtsT#BArS_w~<^mDywQ@^e}yJ33uj8og~_eB!a> ze6in!pC&xQaDju5;10LhKIUyv3W!7bOc@7%-pV+8R<8F|IE>Ec4SwI1PHw^cTD z#_1CPjK`P42|aQ+Lw6vYTLcCs%GBzM^e+XH#6C? zpD$88=rOUoo7(RO1hLC&bp(f%Co*LF`A4sJJxmg$RMxdoY3l<+wiFbrPi4x#-4Wkm z8a^#4xYBsLvwOt&V61OwVqj!)?D>@W-TR{%1z5ZTCuRqkLZeXWrRqj^4^Mev#h3pn z(q9N0Bya|x|EmrB_XMzA$^^2+5^1(9Cs&@Af3_gUrcn7yQSrHw((`2(E|!YCcink#kM`dav}jZMwhbS>9g+iu)!Z$Wf)cHPk%jCW1lJ@nY9d^y`1lKfoG7S9MRjUS`s@Ep6`|S zs_VwJgZ-;;Cug8L1{s3LNcAqyOv$pp#JrTfDgYtqcMTWKC{*I#N3L&6;b5}Zgz;6C zA_g-(Z4TSV!mL@nTg7(XkYwp?Kf=ca-AqOaq}6 zTSp>mmHr6YTh->bM9m5iQn1xOSrz;hOfrTKW1wrg9)s^g61hB<`c(>Mbi0Vb7ZH6=QWN_8d;2iPO?vAvZk7!*N3FA9|9qqU(D8Y3 z`a@>~ktD(aD}^(6?54CvJ$e%~W57hvXN`okox<6>STFUg$t4Y%?Iz0T)*f<+(6=YL zy58DLZ-uP)y}Rji5Bx?yAHy@I>gW0c|A6KmhS++}4}^V!jE^|(4fBtqH(BNfxe=ZV vLovY#3&Xn(HY|+9r&$(8c{0z9quioHi(~xD4U6N#R?Fg3QTOc=L?GZF4j!5C diff --git a/src/themes/aqua/navigator.tl.xmlconv.gif b/src/themes/aqua/navigator.tl.xmlconv.gif deleted file mode 100644 index 06ae195cf170dc4c06fade9766b4eb74d8557f45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1286 zcmd7Pi&N4E0KoBIKTv-BeBtBHM^>opbPkEIveJ2=8F<>xyX|gnXO}uuD6gw)S>)88 zVDm9^I7@Km31v#YANjz1i%P_jnXj?o3vi~SKM_q^xyOI8@1OAbG9%BOI-PJ0a0f;K zfXn5|WU~4B`IVIwqtQ4uHKoyL3JMAU0JwhrdPGEoTrPKYbsZlckBf`z>gtk8r4$OK zx3`zcWV*SzrKP1EJ$kgLsOaLwi(0Lg$K$bBtm5M0p`oGL+FB}=nvjs7)9KRF)7{QQ-Q&UrEX=zkc6r0V?$jH#^^(vJrGc!{p61B9n&}g)zq$GpE5FH&Y z7K@jcmk|W<@bFNp)q#P5ZEbC3Wo609$**6(E-x=%U0pSqOdA^;D2kfR=AE6L&d$!n z#KdFAjwzMOzyIHP?O_kVKo&s$7aaKS34q&20KOpS&iA=_`2{}|-Yv>IQ2bNLz5Asi zaoNx14=O~UMEdYi)#K_K*^}D3`f5y5b4z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W`Yg@7G6 zl-jh?G|VbnDU>(%P@8AyWt7H^7kp~{w5o^NG{@A#zt-i;E1DdtzE(7=_HI|a8B&9z z*PEuEk9gGCT96g3BOh=|p@o##CUn9{1js{a`>5THeGnwn?ISARTjsmJ64|AU3c9~b z8+GV8+;ilW$flk_6cZBJtGyn{08Mx{YqYx00ybu=ZzCprk({n!)DGB-$&OOreB0lV z$E4^}L#~~aw$Yo?yPBw@ed#ombB_B4%3btc6O8(~53T=)bR}lYeO`h_xeY?ZiM!^P zU+dFc3N>fqS0PQ%2^mk*cY(flG0ZpT$9z8OT0!g5_x$Y?%F4w_^_eD3Z=B6BvfG^F zm=j_bQl#;>#$O+tG zwIVLbsaO$P$3@tRij~uF$UtoxQDFE)o@hztAT9_6dmH6R1O^8gLONxPn54UkIH(w5 z+kTZinTX_~lS%CdOcg0^`>2N5!uCVQ6!-lYT;pQWJL^k|)SpD$z0XLAcCm`IE64(D XC#l2XiGmSIE-)Psb~w}R(SX}OASZ*F diff --git a/src/themes/aqua/notebook.admin.a.gif b/src/themes/aqua/notebook.admin.a.gif deleted file mode 100644 index 541b377379eeb4df802e58a4ebda29e6e43b487a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1846 zcmc(eS6h<_0!F_;=vhjnNEu0JhF;VW=_HB}l%}IJGokkq_@qZ5#DoNpP^6UDqND-9IFd)S#FuS1Z{)%~?_wrnvi}PN$voXHnWd_ItTLAFw+qadC-I;}r zfmgHrqqF1FAKx!-tZsg;Z+jU|%+tAiUFXs@6C1ann9PRuk($H2`JsvV=I-&>w4%%C+Yau8uEFW8odZjITv|4p-Nb8s@$Y9Hqhv;v@zuL^ ztwTF|UmQK6E?K!??}UIUk7@O}o`!RLNzfw`ThN8khhXj&q*EVJlYR&k>;QsbUqbP}}$=MM(Q zX1Vz%g(c-u^J*P_!iU9BiRmT!7fkewu7t-@EigA-{Sti%)cA)b`OFsdbtj}Mik!{# z35hejWa{GP;~g9;36}(OKjHL9osqeV3%F=( zp{lMK7@3q&P!&W-Dy(eJE^Q1+VDt=4SN}4YoL-PqS|0|cgvXG6G_eZ*?#*hW7u5Si zQbt}cFdLp@Th9PR?Kk$7eToj+In$Z@RdF2^27qVq%UdWw)@N^%YljKFq1^ z9C*{gn+ga8rDf#U&$|6XL33*xO>I4Mt80m*%=Z4*S~~i-U2!!{JuI#I(%l)h~_x-~^4!-=kwEEk^r>*VX zgO=wL{BBME?2un&Fj0P9pr0?oJ05}d3JnSe5%xjR0P=4rL=^Z2=zMPo`2Se|;jaKh z7>2+DkTjt)3ZAu2NHj%KQM{-#(hI`RcR|!F1(C`pAZ9^GtlpFVz+>BUbKcdWn?u`waj9SnDp=mJ{&oj5%!o%s>x|%IbPvjpG3}F!}T|+PI0%U)Dxw z0SKmZB`HhMIO^9qUL|$wH4~He*CD2L`zWuUimg3i^pS?mN3uk}mj8}8!uD6Gs z>xRPbRMB&_7COF0bg!_}K6Qiw{m(V;Of}<7-Iq-zengc1f|<5i4|jI zdK(V2QO;Pg>auA*%}Nx(P^;QCR8&j435M0e_J$gvn5djr!?N|O5Vfqi8~_E|UAB|Z z44vU=HAFHm-mY($w$^UEcuI$32jTWJ&1M4j@3~G(ZPQ99!|^*xY&^fD?Nk(6w;eP} z(~8-UIdTU_h+=vj?}((+kI^GbM~h%A6Du0O&dPwmpeti~r~?-(eE~DQt~JIjhpu&o z53YZs!0|!Xy2`QlfWGw<GZF~*!|O^c}2#Ap&Y6bZGeGt?IGi4 z2PtBEgA&Ondwq_5Cr7iEeWxdHBP@+1@iwTvW&wHBviSKx%7rI~ut0;URPiJPzaq+7 z_)a8Aip>;Mx3vyjL@2yql9be(#q?50^3y4TP~F-Ana1X{fB9C3`Wz3)zK>LZ*a}`E MEeqR2p@8ZC06J+(A^-pY diff --git a/src/themes/aqua/notebook.admin.gif b/src/themes/aqua/notebook.admin.gif deleted file mode 100644 index 841cc7bf8928c33065ce18bb5472a457c29ad207..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1245 zcmV<31S0!KNk%w1VLSjC0LB0S|NsBp-QC#O*xA|H&(F`))YR72*2&4qqN1XUi;Ikm zjD>}TdU|?|jg6d~oW{n+@9*!asi~fxp5ETx-{0SagoLfFt)-=DTcz{JGF($dnDl$1(JO55Ap z=H}+i%*lq@@bK>L?lm>FKYpui)U|?d|RN_xJYp_W1btu&}W6^YiiX@$&NW{{H^`{r&v> z{Pp$q16i*FS+4_GuLD`H16i*FS+4_GuLD`H16i*FS+4_GuLD`HA^sIZa%Ew3Wn>^? zc_2bzY-w(EAWLa;03rDV0SW+r04x9i002Ay82|tW{(u020RjU71c-@>i;RtqkB9{Z zf|LLU2nhhZA?MWS=;`e1?eOjI?&tH?6B-^0 z4 z2av-{V+8RL1c;CrJ{T?*$QM>wN?nCgfD89y$z^9qS7`p;I)yQkgi?2N$kRr z%`o!ZKn$%Gm&9PQi-P+J7G^x45Wk808TKhOnc?1vlm1TJ;@<@O={LhI6yQe?G834W zRRtFuP=El%&_aO|Gx&#LfDu3Z=l!J^4Bs$~ofm~jRgX;f?Nwb*8>?Y7)r ztA-kDr~yHP6|jLu8*5ae?z-%@>#n=jt^vUY2AJ@I8*ixb?!Nr?tF9Vpj9Y;jA*=z1 zzX&HR$ib8Z96$w1!~qAx3M5y&@5BHcoW=$sEFp&+b66~Ly9}4S0S!t3obJdhzZ(J# HfdBwIJJwIr diff --git a/src/themes/aqua/notebook.copyright.a.gif b/src/themes/aqua/notebook.copyright.a.gif deleted file mode 100644 index 4f909a398b5ecb3e0840021c954d4a1c48ee2d9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2129 zcmV-X2(I@>Nk%w1VNU=V0OtSz|NsBtz{uC)=IyJs#%_I+EH_6iHAUIp z=6Z&kI!0MbS8S)U#I?W9fsLX_RB2pke~Xu_yv5VK#?+Xkw@q1YFgr_qiJq^y%Er#w z#LU@0OJ0MIq@=IGw7$(xTXHo(Qc6~9bbytKm8zw%!hngFZgqh-I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V!C*Igo z7@nAB`znKXmDq*vKy5swu}-s7I)n-wUcfx;uRue2{A_@z8+(-uC$e1_!Z0+X5l!bD z&;mRh#8)6NP)bQ628xsl^S4GS+|ky{io{&#jcFy$RZEuTM~we+26J%b+W=Gl&uFrh z;|ly&ZqST=M1}vHc1OXjrAZ;?z|qwz%)tkq5xM@?IS~c^)1K<$tTKSi)_q?BpqLw# zFWvEt&tFpTkXFn#dbGNekH>0X4&rJ19BS(&=3|2mT{AH?4erWAI{8(?KemWj{GLM7m3!SG#z96O7@8EHV(%!+p!o5MYx zffZLvfJ!(HTd+>gkTTGD5he3=&O{lbJu*=;hM3%G40*Fe-5}!`uN}s zH+-2Tm+40{iQ49vtFRH{lT7rFaP$law(Tg{50qz1J)m*lvYxG4AbOmT|4K~ovA0M< zneI@zZ(%6B8`=##8U^~tPM3D-1#+Iz!60QTtOFq~;;_-l7EvcJ1fHT3PuOcZK`4dw zNp%vw-~HcNT{D| zkest_Mw561+EU9sKf*(~mLRss-Eh&O5{w5!MmWyFo%<@PpM!8xwDTR(O0mJmGL7}& zO^2#CY&~n+VY!M=usMK|8V!*V*fl9G_Cd#{+{ZL?S3hKe7GY@cSibZ4A~FGk0S^2F DAaz6Y diff --git a/src/themes/aqua/notebook.details.a.gif b/src/themes/aqua/notebook.details.a.gif deleted file mode 100644 index e3a3843441cb4b3ecfba610852327c6105f61d7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmb`Gc{|$)0)T(Q5J#27HA_2*x}}bwQfJ~OMT<_|8)52JN>SoS1R;#Ojax-4?pqZ# z5kZ8KDx-?J+S;N+upRr1>h64peLuka&-=Xgj&`W)0p`GuzzzWH>>cj?arAlraP#B- z;=7M5?h=!;G(G?R_tlU42ghFyPR`HI|N84}>(iH(zKN)m5`?im!pPRd&MP!NueE>j z)9%3m|77|7r=+Y(?45|lZgxsejhTbb!tyr%_-o&9v&8&*2aizS&@}4f*5UCtFDDk7 zd&fz?(%o_KF5dSz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P8B$l=BuY@9oT8zi)`up4cFGs7C;%rJ*IcbuE=7`}{S z1Ub)?!xJ4))Un3NE3EOaxhLB(!yRkDd-5A_tl%)pE5lK<&M~*a^2u%Bk;fZ&ym9ip z4*#n&94)_bozEzna}E^f=*hyV6sRg zkYvL743qQ@i6*8mVu>Q@@UDm?kZ|7lDv8uF4j2n45K_{NzKZE(5&;Tg@Hv>}4pcEMh1tjig3P_wU1D^O_C}yAz zv}Ax2wuk}@)&YW3pduBjSjAx!GeW+YaD=RAMG09k16QQ5gfKkJD_l6jRBkrDq_)! zQq-a>v^d2ndT|zF45JmvIE!7l;{)%2g*M>P0uR_i5e6WD9{0${KKhXWx4^|82T906 z8gh^E0D&S>5e+?jBNw`O;x2eW$x2%Cl9Px# diff --git a/src/themes/aqua/notebook.duplicates.gif b/src/themes/aqua/notebook.duplicates.gif deleted file mode 100644 index 5e5f8fbf6289a3f0cb4dc44ffeff0a9e5a14ba09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1458 zcmV;j1x@-#Nk%w1VN?Ja0LB0S^78WU@9*a3=H1=h*x1+9>u$;qOk zqKk`*jEs!e*Vn13sf~?|o}QlG-rnEe-=(FcmX?;NsHn%s$LHtgh=_=jlas~8#pC1S z=;-Kte0-Rgn0tGBzP`TI)z#M4)^~SzhK7c-v$MImxxBo*&CSiu&dxBmN zjxR4SUteDs7#P67z{JGF($dmON=lTJl&-F>F)=aJ)YPr5tr-~^+uPerOiWEpO*1ny znwpwsW@Z{18i0U+fq{XUnVGb-w5zMD;o;%T%*?g5wdLjI@bK{N?(R@fP}9@XYiny8 z8yht>HBV1ZYHDhQg@uHKgz4$&y1Kfrudm?X;O*`0_xJatq@=L0u=Dft`1tt$|Nm80 zRq^rh_V)Jv{{H>_{q^Ih>41ejE#j$}S4CgPGFlukK%=jY7&l(j1#%=ui@ZeW;bW%82L&K35C}0X#LSvEMcAaNlV=E@ zH%E;4iIZo~qSKJp1ZwnWg9afC)R@2^4~Y^cPM|Q5qALm&E5fc|(ZVa&u4hxE-I~IM zixmDU-lkyNRc&3mchlN6Ti1Y|t`=%&*)ze+0~0S`psnjdMb{WIR+L>#c`sVGDQ3{9 zYq>L5$$dHNO?wtaU?qh;)Bs__D`UA`UEJu}0!P;wIa0)EfkK9h8FMk?e(c*t*%&(9 z>X+lK-BY*{zEhuDfc`Q)3T<95Ht!P0EAE_#P{Ih*;rcT6qyZR`3|XV+9Bi z@85%1@xzBu_&oTx!U!Uaz#oA?1R|q-piC}L zR;k1a8bm-Plv^%o(UX8~i6lx!ETQERTk2^<1WN|#Xf8?=5!Rw;rYV93H84IAL=tWX69 zR;-YMudt7gqp7w`3f+F6rp}9sx*3hphN>({%{Zg7hQD0 zMF3uiwSpI4XdD0-VTj>{7h`nMTo_}lKnBKRjKKxU8nC~rtm--YOKM=;fN=$_~MASu>#|eM=tr~htoj^ z9CQRAjTvsN@dg~0gf9B%aabS+>8Pi!I_ikS5x@l^d~m`X0MN1e?YQTzd+2nqp}84p zZ~#XgyBBZ#?!;H(`v7JLVMiUwA20p%qeCAD@oZes!4L-=a0m4h;Dew1_!sygMDL)7 MufF;m_z?&II~I4*-2eap diff --git a/src/themes/aqua/notebook.folder.a.gif b/src/themes/aqua/notebook.folder.a.gif deleted file mode 100644 index dc7035eb6b5f585285594835def1ea931144d90a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1867 zcmbu;jX%?g1HkdGOq;2&jg-QSkY{a?$JyA1<|)tQJSDLfSt=nm=9zhl2=n~RVxr}) zZRYt|D!M}`y5kCU*Y)sP_xt?~_j-N)g!hN&KrlNOj02Q_Edbcs-rat`|NGAF+S{Gy zuigsBU-Cy^PRy^o`0ee^hmU`L_#_sKzkU0@zWHZc?=Us7NY9k0hp{&&_+E+2X@4}b z`NxM3d!Lq8HshHUPTrKJZc$=pl_kl4VQHiH>2ykNEy?3bz?Hk%rR@Vl&wd_WXyp#k z^Xe`H#X0+3E35A#`%;Z8oVp&54^Jr{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m<4f@Y|7Gh$G3?wXhB9(4tfvY(O?2|fMXWMuN*E!*NnDT#`!T+i(G~FnntWMMbeQz zg`->>jl$DS&#ptIHI@Q(K^ivbIZ|&Px`2ctQ`)HNZ^OS0YG$KT98SHD?9M#?fL2HV z!)WUaB!m) z1c>_D@zZyr=jfpJc3+%sXa9bdE=Lq{X6o$3yhyKOavr4LDLOEr%UReT*L#F^>(TF> zTz8!9{B0gI)3>+-HF&&0=`qms!HucNa@B2RTfgt(yft>ZCm_+Gm;;97o%xAhQT-zpr?E6Nhyg5Rut8cR0n~4ot|U@Bz)d+UOOZVI z%!rOGj{&G2>;r&VF!VyR5MIkk(@m|B@%=}5e4LeLJUJ}I+k;wjga`HHUgKp33IG|O o*UAJtby!h^2xa1y=|WkDRg#9Z4dk;{A%IzJu#{zlx*A~dFCejl@&Et; diff --git a/src/themes/aqua/notebook.folder.gif b/src/themes/aqua/notebook.folder.gif deleted file mode 100644 index 485e75477dbc99cfcd08346106de8cb9edaaa5a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1280 zcmV+b1^@a-Nk%w1VL|{I0LB0S^78WU@9*a3=H1=h*x1U3i*Vn13sh*ym-rnAXgoLfFt)-=< zmX?;NsHn%s$LHtgtgNhvh=`Mulf}iw!orD( ziOR~#x3{-kTwHQ;a-g7~wzjsPpP$Ri%NQ6Kj*gCBUtcdTFQ=!cz`(%7#Kh9l(n?B7 zF)=Zel$2v*V;LD4+uPerOiWEpO=o9kGcz-0W@ee0nas@0nwpv#8XBvstKs3{<>lq@ z@bK>L?od!rPft%98ynNp(=|0UuCA`>>FKYpui)U|?d|RN_xJYp_W1btu&}W6^Yj1z z|MBth{{H^`{r&az^>cG`*4pCM+TzyQ;?~;Y*4pCM+TzyQ;?~;YA^8LW3IKlqEC2ui z073v6000O6fO3KZ1O)>Ih>41ejE#FVw5?(y#M@96aF_SP64A`cWMCm0B$rHkM!gSdhzJUC#$LR=0L zGCXJt0Rq<%$XwRv3V>;lYF$ zGG@@IVZesb8aHq#U3#>r(V{tWIJHqj2M(h)rV_=P73-`03=(GW=E`SFy_78@Dahu^P^vfT7~YQMWm`)-VbrNRA*tsMf6kBx;VlHiSeS zVw8xF%0p^se!Q3}))5q7fOt@(qmg8=5xjsIJK2#JNM0OCHXDHo97&KU!I3P<5hN^d zEJ1(-#|suqSRBs{yFxOtWHSt5Vz{>K+p}LRZw~voY?v>UBqNUi2a@9Io4-Hry|xXq z8=Kg0qAP*_Cs0HoU=$-H@Wd0d7>MA37~l|ve^KC&K!gKIfdd8+`iDUZI6M(Wg2*6% z0RlFRmB9uK96$guvoHuE1_$cGV2lpV5+Q~i9vI_|yrcjH4pWR^OF_wu0K)?v82&&7 z1|JAef|DOqVFi><3UCD$Rbr7v2~rAxgBIy%fr9`t;IPG$=?K8Zm}oj#Ll;*FAg6yH z%whut8F+EP7v~6oj-OIK*(5q;Zt;N)ILPpU6;%je1(t8(P(le^U{S-9HK-}6oLmTs z#TA0ena+q5q@Y0sV3ZI*7-EPKMgU`w;p(cbhCv1nWRx)mt7PnIMj2sKzMAg5JiJ>gt6|h>g9K`~Y2gzY)L(2&6#6900iS@yaZ>ys;Z?NSuKhCA>k0%Q)wp@y(OOJU|9a)IkT& qIv4Ho&~n_|#s?-ep@0H*7%lb6JXig}9ZbNC@zh+mT*4iJ0029N-*YJd diff --git a/src/themes/aqua/notebook.help.a.gif b/src/themes/aqua/notebook.help.a.gif deleted file mode 100644 index 5dd547773282f34254d50f8e5d776387c59f900e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1677 zcmc)JjXTo`0KoCzI>q8NS|!QLPDPB(%Xy2onQbU}tE}WE)V$=#(qd|xVaqV)HObnB zmu;rW-x+A9Iq>H$&dvh;;#XZmWPxyTCzBpI6NCdDKSOkE@cdPGy{`k|% z>inCP=P%#%jZDghCRO9JFMfQp@?rh`hmFn6%|HJ5Q}gzH!-K)Z48E-k-qzX29Y>5! ze~mH`Jxa~YQULqhsJ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r^IHxDQ4H%P zn-$_^OnqJ2$6<*u81S4e2dHuxKLi3v1`%^CK+-cMN@6Bx2!6OFd7M@a1Gt zs~@z{JUzkY;IS#3hIua3GG=SV{zOJ)%7$Q*5P#2qiy);YvHBaU+Op|f- z6qabVowid5dMjW%OI^sfAEmx72(fc}ooAE6a1^hAaQcvywLV917zyN5E6Pt>uB{&J yT5j%q+_enCF68b`4R!E061jf$rBl5^pSCLRjySSb*I*|DRL4@VmK9oBfX6>qgG|Q& diff --git a/src/themes/aqua/notebook.help.gif b/src/themes/aqua/notebook.help.gif deleted file mode 100644 index 15a2b2528b4de813dbd3f8d0d0490f3116836c55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1101 zcmV-T1hV@_Nk%w1VK4w00LB0S^78WU@9*a3=H1=h*x1-F{Z{QUgM$;qOkqKk`*jEszhg@t;0dX0^ZoSdA-#>W5u|JT>osi~=+o}S*`-h_mN zt*x!4rKOgZmZ+$x$H&L#=jW`ftcZw+larIh#l_>}!orG* zipt8$a&mH@prE(6w_IFYpP!%0%gc_Aj$dD27#J9LcXy|!r@+9#FE1~|#Kh9l(n?B7 zF)=Zel$2v*W82%?OiWBoO--7bnzXdEnVFe0Gc#spW~-~K;o;#L8XD#0YHDh(uCD3n>AJeQudlD*;Nb1;?f3Whq@<+w_V)Pr_^`0B^YimnRaNov z@&5k){r&xOb92_(;?~;Y*4pCM+TzyQ;?~;Y*4pCM+TzyQ;?~;YA^8LW3IKlqEC2ui z05AX<000O6fEI!S1O)>Ih>41ejE#*4f{}s^4i6BQ5SEylmz6_OYe z85$Y`8VRnjvahkTx3spku(t@m6%-pBf*l?oAR)@j%+1cv(8>u2BEuFVBqb&xC)~>2 z-QMBg;^pGx%Nigg5EUpX4ZW|m^RD%?y!rM61N5;76;y0k!NNfc5CmNOa*=RhLj(*J zLX`LdhC_)HU0k@}!oZ3S5GcfuF@r`812$6DxPe2ZfgCz)oJ?s0r45)gXVNrKAti_v zJ4AHYFkuFd9w}|wz;T174IeR+?!2i(X-%g#Yy9LeG{uS*KUC7h(URtfs5XF*4N`+@ z4I%zHYz)B>Bqz-h6;_CVK;&SNUw{$7un5?Qj$cQR7)hc-2?E29b-+jhLr05W7k>E! zx*^Dtuz`QUKr(nRlfwvf7(vV=a^%$rkR%DM8EC;KHk{N-!21c5D8Qpg(UBmEj^M+K z>(F4l){`f-erZ5p ztYPP!c;>06o^0r_=NfIa;YJ$)Ot--sYQW)!B#buds3ai7@#vjy1P}rOEYKha0Bt<# z>8GGt(8d~tZh*!KZp;zts-LPF38@2Yuml}*xXS9SjMi#_s%wORLK6%yumG;a3gYUq TA=I(NsEZcstRyGY5eNV~AUrMH diff --git a/src/themes/aqua/notebook.login.a.gif b/src/themes/aqua/notebook.login.a.gif deleted file mode 100644 index c2849fa92e4b071dd20320233cfd0a710c7d16cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1772 zcmchW`#%$k0>I~y=6Nw0qAa?|b0UjFGs`P>7?oEJQl9P1jD}$wjd|3R$3iSq%li>p zqS%IEUP}pijEaLKoa&}@&;2Lv=kxvj`^)$1;^quH9eNs|30MIDR@S%HH@E-V*b=|r zcs28$J2cfJm>L$%zkd6E+Bzum{;F1 z@L}!Kr_a07^B+V(_FQT2bwTW^U2_HtKD*lUMlZvwqoy zHJ0|jdk5n~F`0>!5>qG)000DpVIvcA5va=v^2MqkhOze>DDyq$IDQEGPS8KfuXdRFjNyx*0S@VKm`8>NNJ$589vpw@QE zs%n>G2>8@Igo{^L^mT}yA=*E@;9heCJ|`d|H7>0%IEEaXQa~?nx>wU#QTxma<`9V` zs(=pZ9XE=KBj%MnEMaxrDr<~Mra$A09=7mK*}`q?9Bpjj*YG4v0vVG?DXwbIDXzPW zr4EeEFzdTnjXh=T&h%VnbkeOx&Y-QmlPB8Wz{nJ&rXCuB#ivlK8eZIez`0TIki(sL z(mQVN=xh%^d$YKzx}lR*-$`e%&=)U7#Nw~S#2-=zCzEqKdd3_aol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muecep|}3nTJ^(GhpQ{7y3LG%2#4r zrH*G>EW1sgu+sa!T3v$q{?{WmigeP#7uR?40GtOrFrlnF@{zOBxVPE$b<nR^voD>N96R!&)o^1rtV!)P>7--fmk3VP3XdUN~-&jJio6u zjir5Gd$I8R$JVo>zkY5XqT5s+sOG}Mw&=6Rv|ys81TOjjgys#x~HTq QNKvsY;LS%!H~?VxUpp>xr~m)} diff --git a/src/themes/aqua/notebook.login.gif b/src/themes/aqua/notebook.login.gif deleted file mode 100644 index 60f786a4e60324f0cb3ec637e26838048870dd5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1175 zcmV;I1Zew5Nk%w1VL1R90LB0S^78WU@9*a3=H1=h*x1-F{Z{QUgM$;qOkqKk`*jEszhg@t;0dX0^ZoSdA-#>W5u|JT>osi~=+o}S*`-h_mN zt*x!4rKOgZmZ+$x$H&L#=jW`ftcZw+larIh#l_>}m13@b2#JP*6}C z8yingPit#yuCA`>>FK(_V)Pr_^`0B^YimnRaG4w z9r5w;{{H^`{rz)ubJp78*4pCM+TzyQ;?~;Y*4pCM+TzyQ;?~;YA^8LW3IKlqEC2ui z0672|000O6fEI!S1O)>Ih>41ejE#hf(9zP<)YaD4&f<>=?>?CI<3<0t6Q8XzPP7APqVz_Pghu>jioMKIui0R?UKqlKV?iVZ7R zIA{TafQw=-EMnA%Amhc3A6z=0F9e7YS_SOljltu zJ%RqL`SS*jp+OB)xCvrK4iOzTOo*Xl$IYNNYWx)XGileYJ$dv9%9ZPkrW~TCSkb}< z&Y%7^b`GV{h=3r3;*esH5fC8~xmXb*Mu-$C zcH{;UBS~&lMsULjY0XNCASrgC7*nSkf-G@6dU9nWqAi;ylB5{!(WOZjX(5^NXc|r> zGNI7~SAyqGoIJ-Bow^eZH=fjba^rcd=h?Aq*HE1p0u2agG~Ljl!2troVnq*FYkqy{ z;S+HG9x!}<`~MVE!U_<4U;q>vgdo5P3x*Jd6b&vo1r-XOKt&Y-STO~ISKL6(f&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ob zF$#*=!O1X>mmtWR5i`bIMx2BL)LLcw3FR+$Jril+27zv6iDE=d8E)bXxePankUg9@ zgQz@o}bkWXq{hOzd`3-2I zo$Vhaqf;z{M%9?x%eg~K<;*|SmuAspwfC5wnz4sT$}0Ibrfe700~f&kBdzwE%Ol!F zdt>$5!+%%BLW%Yb7`|w`s-bO~j){lnZkoaQLd`@mgsQ(XWOYbiu2u)GIJvaeqj+N6YknY5;gZi<@?-`t;Liau17zpusj;UYho*`bUf!U|rjg z(q%a|NW+Rt0-7P405ca?q@ah5Dss>$<4P)e*tmv;9u`+};>S#MxiGq6JqtKyWZ5Y2 z7}YI;Z~vkPMpCsDqg05BC7YAE=U{yF@N96WO73hEYsC{3^{8JC-o|paT=45ali>oE zx%@({7|D1U`Up+lJJyk+hLpd*V{YIp!HFh8=>^8XnzelQd%^hXwJ%fhYw6#& z8K#B1)$(SAE_?E;$EbWy`Ggv-qST>pVIF315MF2|JAv($w69*<1rCCLD?p6s;CD9% zB&HLe+o!R;pGJ+j{pJqLdy2}M^VexW>8REpUti&$PRu^Gp8oOeZRyVmxpIHB3vA5^ ze?T(os`vAsow+MNe|%eSbp%fFIbs!wvG9Zp0*F!OXo602q#$CUjO`{-*)_+4Cn6?w zy@93+UCb152jzSLfTPm7AeZ+drR%TKl9RFk diff --git a/src/themes/aqua/notebook.logout.gif b/src/themes/aqua/notebook.logout.gif deleted file mode 100644 index 375cc5d410754161c05b7ef31be46f4603eddc03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1271 zcmV_Nk%w1VM72J0LB0S^78WU@9*a3=H1=h*x1&eN}TdU|?|jg6d~oW{n+*Vosnsi~fxp5ETx-{0SagoLG~rIwbK zsHmvN$H(XA=d7%(h=_=jlas~8#pC1S=;-Kte0-Rgn0tGBzP`TI)z!Vdy@rN{v$M0g zxw*W&yv@zc&d$z7MMXqJM76cGySux>!oteR%D1<-TwGjRTU(%@poxiza&mIEwze)V zE}x&D%gf70M@JYK7>Ca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6~ur51OzC-fCNii(5nO}FtJ1vPB`(z5>PR4`G66TPB9#Rb~> zYK0RQFoA-vfiWS$70NCluCLBlgk&nN@UN8a*Rpf)N zzkxZygs=Yk3Pr&e_&V^h+WrD7>=IR2p)LwhSW!jA=tdlGKJhML!oo{T{4TG*5-NlS zLuj$Z1zdFDg%@3Lfx-ef-{8W{Uw~n=7h#BTa~DH*!Pm_=cOiz*OSARG7h~YeMHncA zK>}Y~1bs6LD141V7bJ+mmKZ!E&BfYW_*&>4MF=1P88+8kvln*PowMFyjA1w4djp;` z;CI(Nc;18uZa5c-3(ol8P2*he2?~^9#u;d2uKDJiZ{7n6N^~yz=%kl!I_Gb^vBn!* z5PC-%XQ;8pCA8OW2@h=8uKVu1_wKvqYj7b!2O5;nh8u7AuKe=MH_!VUXtaJu85gVp zhx6EHue~7GTM~T$E_d`02OQmRZ~pnalMlf4Xh?v;4|2#c2m18azdrZeOQ1&&(9drF M|Mt6p9s&UXJE*kga{vGU diff --git a/src/themes/aqua/notebook.mybasket.a.gif b/src/themes/aqua/notebook.mybasket.a.gif deleted file mode 100644 index 29e7a72d2ba3657616b9bffae765da368008c76b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2170 zcmV-=2!;1YNk%w1VO0Pb0OtSz|NsBtz{uC)=IyJs#%_I+EH_6iHAUIp z=6Z&kI!0MbS8S)U#I?W9fsLX_RB2pke~Xu_yv5VK#?+Xkw@q1YFgr_qiJq^y%Er#w z#LU@0OJ0MIq@=IGw7$(xTXHo(Qc6~9bbytKm8zw%!hngFH#$HvJx@_ybYX6Uc7m6P zl&Js!09#{mEipI`5EDE?OFc-;aff+@nv|fkm7%m!Sz}UJWFaFc zF*Q375)^cOjALtfVrqATj-N3#Jac@DH$qfiYk_Qgk&v9PovFH>s=H`#d^9*dBPA(D zOH(5zDG?JDiAKj-#Ngy-H74YI%>BqqeTN$#i;#O;TAC6&8n&oH{*2 zVP|j?6c&h(otmSvbbE$QQd(_%lB%@DxW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B;uNSz#dr{iKNl#F6RMy z*uW}S(F#|*;xLMVAzx+)!^6NL7BZxv4r@q58RpQ3{yX&H4>wSOSA3!i>R5*}7$6Hz z%z^{7sD&+RA;l_2af(-@#VuTbiz!aAideLw6t7qdT9DC;R74{gvuH&!R?!#i&_Fw6 z@eOyRAOpEz1OWuV$3FV;k9^d{E&xf$LK^ari0tD#Ho%BhP=gQR;6*Q<=!;)i@{*X$ zq$W4X$xeFmlbaL(JUHNo8^mJ(zzBvgh9LlAxbl^-jHN7RNy}Q=@|Lr7hCGJxfO$yc z9cbvoENW2VI wGn%mscha+=4t1zJB^uFnHq@dPz34+XT2YNc6r;xHJDj`;X8-^I diff --git a/src/themes/aqua/notebook.mybasket.gif b/src/themes/aqua/notebook.mybasket.gif deleted file mode 100644 index 0fe2a734ef2a366dd2e132b819094ecdfb9a95a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1494 zcmV;{1u6PRNk%w1VO0Pb0LB0S|NsBp-QC#O*xA|H&(F`v$;qOkqKk`*jEsz_si}>P zjh>#K-rnBd-`}OBrIwbKsHmvN$H(XA=ZJ`ilarIh#l_>}>%*@QItE=JR;WINcnVFe^fq}HNwAa_y<>lq?@9*&N@b2#JP*6}$ zPfs;9H5(fn)6>&xYHEapgllVS>FMdOudm?X;O*`0_xJa(u(0#<^Z5Aq@$vEU^78if z_Wu6<{r&y?{QULx^@W9ndU|@CoSdwztecygb8~b5|NsC0|NsC0A^sIZa%Ew3Wn>^? zc_2bzY-w(EAWLa;03rDV0SW+r04x9i0031082|tW{(u020RjU71c-@>i;RtqkC2g! zNgaZg00jmI2%HF;ou8bcous0rq@$&&o~NLvcX)UTc|u*52?`4g3;_%cyS=}>zQDx6 z!@|AB#KX(U$i>dlza7;=d1gZl01gij5fb6z&wp9Bks$*&*l6o&!Rnfdidb88q%gXg>KoxfdC8# z2=agkAz}mx0wuzdFk#|EiLWJ2m_PwGY}*q4Zzqr?n?gm{vv1+vMVrs(s*`-JluCFF*+apP`{h9PE#4L#6?UNt800AMvbh!~#_I#k2ohxx&$gAV?E*g=R6R=A&j zI`~kH2l|nyBYZMqh?q=2lmLV<4J7_)LJ&ciAjA+RG(ZFq3_w`~14dwgWCKkyiNO&@ zRFLE^OfJcQ1||>@#4cQ#fW#4O5^=1Q8}2v1XG-5Frc^Mli|b5K>a<%SF{x00ROL5TFDD z5-f3ntrD2P#1c(7;lvY5KmmoVQ8*#Ru(u}5gbBCWI)w>KJYfPAx9VyuuFo#9Yza<8 zajO*2CR-~MQ(U`5k`nAvf)Hj@k%SfXEMbqlx?T{130K%N#jp~TV1g4&G&}FI1cl(l z6&GMJtpr(^fW;D804sqMPX1i5thV)XI|T{1Y7s2LOUN7YJ$nkF!4O+;aX}YeeDQ@B zU6`=I%QvjxG8kdB{Dl}}xa@__UfeJjSz?g!av3I!QAQbKtYF4mMSrn?2{4~AhS3~= zG1nblh%g4#Fn1yLt$dnMga8tt(K5>{f5GJs!=60=9?i2M0R}(RQHLGfr?0;B>`TB$55}ji{`~Y`z(*heJ5{yf?f?J) diff --git a/src/themes/aqua/notebook.mydatebook.a.gif b/src/themes/aqua/notebook.mydatebook.a.gif deleted file mode 100644 index 7514df458ba2545d11a1885dd583c01f6cc5d57c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2592 zcmds${a4a=8^=F-|3G+M3Hw zO)Dw}E5H)~AP7pPrE>-HDuc!D>~~Mk>WmhNvTAr@I+~hbY;Nx#p5X9At0~czc9%+1 z<#Y|R^Eh+!3q%r$&gSqXOPbzfX~z?ZuAwnHlP#9Yr)TGE?XKSbv1VIGI-RLhYv<<| zv^rzEbBLBsx7nTTy+dBFS1i}c)%rXRZwX9INZ<*?YOPLhvgPrla;3&>b1oUr&CQ!_ zy>H%l$0nwk>^zZF!{rH-8XaG(Or~>&hTR6Ut=ZlyQ|bGMCM5DIdLCaOmeH8p=xAz3 z?=X`qo}HUlX$=W9c0zKx$wbX>=Z6z~qQTGL1@WG?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m`+-8gpj2;L|15ai$YFgYIluUW_*#I zuxE6NT4#N6ew2%rrH`AgYkH8o#L^NI6^fRtV{nGY&)TD|z?-MKe~X}pkDR2fx}&VR zkeH(?EH86^l(4tKeu|%bh@HO2)t{@p!^_yt)Zfn4;c$JE(AMFTpR(QJ>a)Gf*4pCM z+TzyQ;?~;YA^8LW3IP8AEC2ui09gPT000R701pTpK%jsDg9j5DT&PeXLWU3<7MKX} zp~Q<66FNLtiefCB^mJGijm!-hi;Cajn-;=qg-Lw1ZTJaYmRQAnY}6jM+ECk<8538xiS z&`HG=R>(;O7FodQr=4;Nss#;ORKbN6ancaz7F=`zsTXi^;YAf!a3SXvSYXk`6j)p; zX`G~Lqk;$9aMMizUw{!t1^!};LB<%e(olvOXUK|18Z@XeMj2?($}6q2(n`Y_W+ZFI ztjP*X!>qQBLBkr%n(-?Qw2pzs8e^D&hBwBRA#1k9^6||b;9Ss6IBY}#0R|hiu>uJs ztU!YsZqV=s9C4690~{o@aW4sS$U*PC^wKZ~9Qe{P@4xg44Dh}A)=NSib&z0391X`& zM;k0;+(sL5h$BY}^jb^;8NrNW1Ub@_#sAcjf&P_cETbUBBue4H z2Kw(4G%!UeHu%3#pr;fW(BS_t*bWMUkb$1a1r=oA4iKCI6{%3gDiqTg8vf;mG*k>L zT46&R`Y?z7AaKPiU|~ZV#^M!41OY5w;fh!khA{6C;yaS4fmL{d4Dg5tGa?|1PRt?% zw5WwGY9YolhH;E%q{S_0fQvDXv5aUmqZrRv3tG_8jby|l9n)w=I>NDxzL3WU<{^u2 z(BlOj$OR(|K!8R%@{y2iq%L+5$x2%Cl9?AfEIM10VSwH4;oN|3iP1~Rj5G$8UTIBqX*kC$0?4$ x2xTlI833IqNc%a`k`mOUAPs3qNs3aEp0uPeW$8*MDu4mtV;{00M;`(L06T4s>&yTE diff --git a/src/themes/aqua/notebook.myfolders.gif b/src/themes/aqua/notebook.myfolders.gif deleted file mode 100644 index 2def041a4c26caa347d2d567c787681d6168a565..0000000000000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5GJm)68z`KU8*Fg`!3S0Ci~nlhVv4~Nm)_;$b>Zgv0HjsqMKW=%#rI`U2~`bNDngW zI2w+HPggoIRKd?AhK1=Vk=oV8NM+AzBlpIiw%Ilii8NdH1L3YtVv8_gL8b*!7C^Fy zaBhiK(zaQOp&x1Tdq^`1gTCeI=`OWtxRBF8q<3~{ZeMbLG05rN+^uM$n4d{(j*wkU zG@VgnN>S^*T8x{2I(YO9%GZk{HrmAGi-Fxkp%Eq$0xVJ>TIBt}Md8>+@*&r2dqXi^ zStOq=Ey0#Su`@^vD?ae6*ELogJ`?X;GWSu1z(H{LxOzUcOo z9k%cx6S197P?33}85W?>;dMACS&uPJo0W zT{{gsVA4d4P>1ReRk}l(^W{|V!j$8ES5V4OnZ(1teI4hO9WqQzRxsMXj4K_MCT6zc z1HMoELBI8tM~QmlFz3AkIx0d?Rgo!w1w2RFi?V&>aackjjC65jxF|$eQa6lR+tGsC z#K$EcYqc|0cm_5yu!+Z7SwD9K7sNQ?+zX}V31O`^p?a**4G|P{%Ge+9aGQP2D+xJa z8ta}otaBg2#!ru0N1Dmw6jsv9_7I(MbbN>$u|n?J<{^m6j?K(irsa!qgi&CsXeDbq aLaCdQ^2tC$kjT|*o?R)j157#q0e=I#DhMF} diff --git a/src/themes/aqua/notebook.myprofile.a.gif b/src/themes/aqua/notebook.myprofile.a.gif deleted file mode 100644 index e05e18a769db15b735a1a56dccfc368454036ce4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2145 zcmV-n2%h&xNk%w1VNw7Y0OtSz|NsBtz{uC)=IyJs#%_I+EH_6iHAUIp z=6Z&kI!0MbS8S)U#I?W9fsLX_RB2pke~Xu_yv5VK#?+Xkw@q1YFgr_qiJq^y%Er#w z#LU@0OJ0MIq@=IGw7$(xTXHo(Qc6~9bbytKm8zw%!Z$iV00016Vr()!Pf=cUVQz$W zf|rPtsas=lOj2GwLQHCOgn5LQEipJfNnBfKer9utdxxBin5~VOt}in>A0Z}PWphq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L#jYM(4s~RPMGalqCI`p^+X5GY;$9rZqi!tx zgeD*yEL+sK7)B%1IdQ&KN2%UmHm(;<(b(>Jw^{onioC9;6?NM^I;${{P|^8iwQWkI zH~C%1Vb5BPGCOixDGFfE@7?ng9ow4MHQfN(CW^$b^&?!B-Wj|B1( zhAV*h;)_9^L=S0$BzEld2_!%z@SkVRJ7AD4nCj5LQvIdKikaffX#6QQ%)h8{ISrv{ zbO)}Y#N2d5`zQcm&HRqeTT_)_QVjTwVT(#{sWCe5mW%s5DZ|A1){V& zlLW$J2#Vly_x9xNg&$H~Jd4ss*F@v0&MXePvz3213dFfu1=VRj(|#+uwn$OL15?iy zICgAsJH)KltQi=%4k5ewOk=M+@cAXQ&mMce4v)?&R&RzXHNVLH97>UDM1<;Jd%fQyo-j z3qL-M-8;CZD1GJb#I_C;I9Z>2Pq<#9%19I?gWEnPDS$h~>9`1ijhOI0Ii$Hq77j`ej%O0c5%_wwOUDlzTUhLX*1Ya^v2%d%?R zy08EVI+g(UL1|=>Iag2L?s~m!!4Ku}cglTJ$r<03qg6ulbW^S*%GWqlA*A5diaG0e z>es&Y`+KI(ejA7){j~%#bBK-j?m-|OB?DU8)&-=S8BvLQD$TVLxO?v#Xk5c^wIHuK zs40UwZXK@SU26_l_wVc#L`EI29v)Lj&RHR6)EYjwrnoU{*wmYb!*`V=B7KAeTIKN+*$Y@^~CDjcv%{}w6HaFlXVb(5uFV4 z>*81Bpsfh6-iw@ItNfur<(KfJbo;7>OuNW|^dev4Y<&Clu_y_#q&ItMH1!$tks|%Cvg2o-zUnbu>t1KryR-V& SH%tkfjLyK#gjPrZNc}HD;d(0o diff --git a/src/themes/aqua/notebook.mysettings.gif b/src/themes/aqua/notebook.mysettings.gif deleted file mode 100644 index 6045cec0fae5f040cc4f60c82e0b89f046b66164..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1973 zcmeH``B%~j0>Hm`z*jUm)bTb*XPd<%cn+)9=0M?SYJ=@eWg9A*t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VfRoyJl|+Qo1PybT(j0A(&;H*~?H-KhR1NC}c8 zP^Cog>Tm2qzWqciu9+lY zl};2S+b`j70NO5N{-10!Z+eCaJ5XlsFlc#c90MNbE0zwdUc=o|*bnAHiQ{^nZ$H+u zv>}7IsLw1SS(GEMf&9Z_Hpr$ck?$}tpB^lL>N9p69)$YP=d;3PeAAiSE-!{b7{xJW znh=ceowK||P+>~ZL#)*hAQ@lbv=F2@I&jAF3Mjd1=ta2sRf z{64IQd~_`@IdH3);EkifBj17F-b Avj6}9 diff --git a/src/themes/aqua/notebook.mytools.a.gif b/src/themes/aqua/notebook.mytools.a.gif deleted file mode 100644 index e4407276a25a7f2d2a02565ab700fdf02c859f32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2033 zcmbW0dp{Ej1AsS|GtQ*BY;MIc3~Q!CM0K|1GNe$s&dydNx3n=7!)9#m=Gt!v@VTI&*E=W{E#G2?o6*=+y-5OR@z$ky?=2QeffEj&Iag;$*~Xe+qU zZu5&1`tZ@vu=tZc)U)Ko$i(~vb_K7r*~rA4$*UxVGg7lFW0QE76M2DQDO5V|T2^IQ zU3YnXk6+M5zaXlyDbm*78KSApNX@skKgKD%c_Avv0e_AZ&5lVa=2v&r-0rWvGY~;z z+Bu#uHM4Z{I%{ffsi6hUt7uHgEDj)DI_esDt8?@+gH>A7=HQHD=L*uZD-ageA(ZGN zPT1H4Ht|ACMxm&#^}ePy%=1iunT2&pb!%*5M%1;U>!N$@l1GeWuD4&178J%Ss&+bl zl5&Zrr46&NJapPGxKh-0nOSnDM=BY4+BZ7WJ3O7t$}OxAT3VxzV_lEq+#1^YwV^sG z8TsKc3@A(|nVpBUM*r~g1tLHH&>M{sasNarC%?3^@dVE8SG=1Q%H~`ksi|Y2Sv(kV zIlw|mACuciM+ z2|wW(npJ#DHvQ-Fn+=ciQ5C|wt@p-d(@U@4ZoGN-Y5l|JcN<&tOY57Tzkc5Sw)JIa zW`1Sy)w{WuYsUy7&lldD4!)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(zt1dPHHVqBFWgX>%pjzL?M zk=iW@uUl_V7(L;{3DvHxR`9`s4uTmgX%sDLqDJ#*HEewN(BVdnqBlG&FFJksh8xmv zQ15`l#B>ul$eU0v{e$)nRifR^J4Z&2&)Yko|6n7U4IJI+&>wj>1q}WnfHJwzNJJ4(G9V+1MfhMs1xyNaqB0)>b7F`R zHL#-zxdZ`(2}JaeqeRhEzybmg5MTrY5*%@Xof4RU#1Tm-p~MnLFu{bKO(@~Spm!!( z=LJtZk?0XhG-2lvP$Ut82~o%sg$W@bVS+r9K4HQUq;@DlE+zOdhZI9h0nZWfz^dm3 zmqHQG6N5@nf(c3>aVM;I)+vFYq{dTd6cTtE1*N$@0mTKL9zjJ2@$^|Nsqzfzg9blT zVZ{YkV39=@SX^Pk0_4t+!nj&&A#N62bTKX#@0Kg>7Vg&TMHeP;u>ieaY>|}~Uu3a> z30Q!E78e}Qd&R?7+)3mdL9hrQK^WqO8*UaFXKXLWSa9Km#vpGTZn-6UjB>{*o9yto zMsU;{N#u#Ljq4Ul>_snw+CK%!K&_ow)^v-Osfd(5_3^|7xWSoJ9B~({k2@Yvk zt@YMibGw}h~NO&U4{f0?C{1La2PH*-g{RrfgL%#J@w?A6MlgmfdBwI(7B`` diff --git a/src/themes/aqua/notebook.ratings.a.gif b/src/themes/aqua/notebook.ratings.a.gif deleted file mode 100644 index 876adfd9fcd5579f604aa90dbd146647cf961ad5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1927 zcmV;22YC2LNk%w1VM72J0OtSz=j-t6?(*sE@Zsg`)!OC4%Gbci*UQr0*4*Xn@ALlt z{`>p<;^ytEwZ?9JlPot!EHy&*%Er#w#LU^S zy32Qim^VUHKTBSNkEEop!L+{3t+&X8kfk_8S5I4VH9%5IR%>*Cm5G(ArLe-4p|pmQ zr$bO=GCfaGUUXq@gm!|Lh?J=TFGK0{4?h?-qxb52!YSY>-; zaff+@nv|fkF*Q6fH9K>Bi-V4zLPtpdlkDbbX9c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Zw1>z*k&FnDB0_c}Fd{?9kRmb= zAQxifh>Rf!bpIxv%!rU8M~={@knC&N3_Oq&uAPi|5$s8dkWVH0P00~ceFa;G+PEmywBwQf_3{T2{g#cK{0A-k9%J8HBGGswQ6Kg_%&MlZ6Z{ zKqN(P=k|BMk(S1CqzL37$gJ`h8SXm5x^K^#OkUAGCUAK8D*GJ#u;U_kb(?mSipk} zVc;5T7&2HO>jPwjpvJ4Nx++Gwf-xA8Rw<|1P^PJ3u_p!hLI->5wOvQ8*eo1@WT*CEb+t+dBY*a8%V@K z1H}!?A;%nY1R!DtbhuH+9F(N2^2#i;e8*9E6w&e|4$l#Q2MC}FfgeZ^ Pjq=%WJ57QgfdBwI?G#~d diff --git a/src/themes/aqua/notebook.search.a.gif b/src/themes/aqua/notebook.search.a.gif deleted file mode 100644 index b6e1c61db3c9ab547fb621c7a19e0365e5d93725..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1862 zcmbu8i#yW`1Au>X$uOOrG1BO4BbSiE@ce}Yo=j{*c zn~U$(pUu4+8k-eKX2+)&p3lEq-}v%rV`pz~@7uTCrT3p&ZjZ#K7hx=%G3JgZoP47a zIjwg_-+$cL*xGry@IEE$y1O^Iu}hqubJNPj|LM!+tuOz%{a}KYSK~s83W&OzTh`kD zaAsiS>8+lJ^!(bh!HK8+;v`eAcy+y}d}B>cx_8_i8<}`1mcA79jVCd976j61Kg!+V zX$8Eh5Cb!Q$tk&2FBpowM9au2^A9DL zRQF_EYqTeZA9wW0E^fwIpYaGv2#IAT(#!nAC_h0}525soOf3Nbh`f|bI30G0R%-1U z;2(J<;$luJtCGWO%PVh({;Yb66r7%2fyEt1irN9HoLSXEIw;=a*p3R5D-c} ztbdfo=DD5mu5A}xZ|u98%a6WX&@OzGkdmbeR}YSeV--|Z)OIDLW}UFMuW5TwUN6in zY!D7T=^dQn@@mhM6KY!SrqVf{-hl;WwRLTMDH-e(S}t5&qqem#zqH00?`Uo3bVoE< zR8enZ=akOi9Kjfqe1fi(*Vz)BE?zA@>Fk%xEEn_+(zChD94@b_xq{z(gGQdze-G-vav&w(2Y~q}2H^is0N_191FVJTXMh+Ass{s_ zh$uo96rs)oQ#W%)Z*0~-NuHuc&X|W>ny872bI)~eibHz zYTI7jAuo=lyC-2eLdwSbHh**$N7F1C5Cz*0sc0RC9SxESJC{efh_!eDLxFV&l(q}N z93bxGo5k;wS z%|tT{y3SXy4p1X1S-T%r`3%gEL@_UWlcnRK3{X9_m_J5gc`k zp&p9xl3+HYxoHWn2;bwe{c`F%{iuo!jS*}^6fc~bsfQz@XB6Y&wXHc^uoHF|UldzYD{SAz2WPVr4i?A}er#GLPDe zMdwT|d`5FjNDzA&l232Bx#GQbf)x93JydE!B0n~Vj}lQ3#UZV3^SOXRsQpjQRy66J z@*{&8_I}ZPy#{35WCn6<96V8ajHN%}b!>7zQ@BJwHUSAL?*5aYC=%nrW>1hv5Ukxr zcGygTcoF}xwYI%)t-ZUwZ(TvWKXt9MrTrV|2x*ya?y^f!QAO+kxga^+j@@mk#m4TJ zDT{)~%7UIQS;PGBFYFITBA37a^_FG4_jRSr*aq}UL{!q4SDRANQ%klNS?tWl{rLWM zwd2R$R~;bV;ukOrBB*9Mx-0`rO?Y{LkKczA(3Ap@a@v-IU>hR+Kr2%I0fj~p6QJP| zkeu9>3{_Voqi&#}bgpR#USpDp4G)3*{(^8|E9o))xCe^53H^=~G$ZESxIT*^w04M(kecgP{ diff --git a/src/themes/aqua/notebook.search.gif b/src/themes/aqua/notebook.search.gif deleted file mode 100644 index 72435223d9cfc7494039dd1c4c4292b9a99bf37b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1257 zcmV8Nk%w1VLt#F0LB0S^78WU@9*a3=H1=h*x1-F{Z{QUgM$;qOkqKk`*jEszhg@t;0dX0^ZoSdA-#>W5u|JT>osi~=+o}S*`-h_mN zt*x!4rKOgZmZ+$x$H&L#=jW`ftcZw+larIh#l_>}!oqWNbGW#;%F4>1prCSca$HFBljY zr>Cc1UtdQ@N5H_q#KgqX($cQ3u47|k85tQ$N=lTJlrb?e+uPfjnVA|I8i0U+%*@Q1 znwm^ZOifKqtE;Qw;o-Ejv}b2$<>lq@@bK>L?z+0V8yg!?P*6`#Pc=0)Yin!i>FLwc z)32|u;Nalx?d|vX_xASo`1ts+u(0#<^YQWV{{H^`{r%S3;?~;YA^8LW3IKlqEC2ui z06zd3000O6fEI!S1O)>Ih>41ejE#+0<9?C$O6^6AwYAS4hKC@BrXv~&fWH4s;@g9HZ*K!|IhL4vco zRZy{E1q%l)KoD?&%*93oFJ8ci(eWb!7aUKf^q5j*$&@l?tla40!UY!wR&;1PN*?zp ztW?Po%YuoPsIWo=1ST1qAX|;V$&(kXkwNhx$oJI-9W-zN0mMWE z5ehzVpn(rtOgN#5R{)p=gbhY?pokhwcuR~CW{5xuD?spp0bFPhf&eEFIb@ON2>#$h z7bke}1(HP8-~$*%`VfWyVfa9#08S=Zq!?om*@X{73ZP#Iv*b|024oyiMmYkQBY+uS z;80`;W9A^h89ta%qyRW%2}TH6eu1SAf1csRpmUxuh8S^XIb@mVWLNww8g8`VsjZy`AZ!3d%C~_P z1cVTWr@?x9KoLw7AxE=ntO4z`X#|kL8re$QX|`%~YHbGJ1`uwxp5h8BnmJ4`2OV|T zA@98O)@$#*_~v`>9e3byM*taakVhSQ;6cg32q&!Y!VC*CFCGDefB*|ON$df@9Svu! z@y3+gVF$n)%y9x9d~j^?$%2$T$;Sh1Fhw7HsEqQ=8OLlv$##T*0u>A}umH_KFRb#= TAqX*r#|8(jbi*eI5eNV~${1r2 diff --git a/src/themes/aqua/notebook.shop.a.gif b/src/themes/aqua/notebook.shop.a.gif deleted file mode 100644 index f7a788d0c0a5ef0a796292dcd5dfe81cb82c5819..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1753 zcmciBhdbK|1HkcL?A3~t_IgD_sc`2PL7;M2j<$4^63 zD+3cN)BKI)wNJvG&&@B#aB2DQ8)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Oo%iVGpjk-sYp6J+2!DI1IDv~K#ttFjDTt&X@4{zuHUDgdeHgq zZ0hG1+c?Y5J)4IL5_}p8eZdHZ9G6|d__&)c!#9aXa|Z8;$M1a%tdAEwAI_dxk+B=S pl(!~yfbp>*vqwu+xi;TE8dsg39KLwyejQ|0a|X=xgMb0c{{cIzb6@}f diff --git a/src/themes/aqua/notebook.shop.gif b/src/themes/aqua/notebook.shop.gif deleted file mode 100644 index 33666f096c14aa5bf3ecc2beeef9d1fd92557ddd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1170 zcmV;D1a13ANk%w1VKe|40LB0S|NsBp-QC#O*xA|H&(F`))YR72*2&4qqN1XUi;Ikm zjD>}TdU|?|jg6d~oW{n+@9*!asi~fxp5ETx-{0SagoLfFt)-=!os(=w{vrIprD|Nii*n0 z%87}IwzjsPpP$Ri%crNOM@L65FE5Ucju;piz`($FcX!0Z#M08zN=iy&V`G$*l-t|e z=H}*2O-)QpOq!aS%*@O)Gc#spW~-~K;o;%5w6uVLfEpSafq{XUnVIF~(hudm?X;O*`0_xJatq@?!t_W1btu&}W6^Yc|z zRq^rh^78Wj{{H>_{rvp=_4W1t|NsC0|NsC0|NsC0|NsC0|NsC0A^sIZa%Ew3Wn>^? zc_2bzY-w(EAWLa;03rDV0SW+r04x9i001-q82|tW{(u020RjU71c-@>i;Rtqi3J9N zlK=+@2@07Cn3|lKo|>VbqM{273=Iws5R(xN5)%^v6BMztwX(Ffy0^Kwv%I z783v$7#SKH&(P7*)6~_|6b2l}1|1$BAR8g!&*I|a=H=(==jrLt6B-^04TVm_Tqsg8&r6P&|w{(Ey4RDk4I(xKZLpjv7&{Sb>5-i3dX%2MrkhMB&DmF#`sVA3}R}z#9_?-n(-1#{BT0 z1P28{8VVW4cnA$5Cm1s(LZpbzBEyV4CPKrA0nMCg9AUg-Skk2xcpzCTIrHTtk%w_k zVju~PVMl1!9u4}$2^zXv$5^^hNsJ}9C@7!sK?D<CLegVOp5F|)m1!f4a!5LIeIVBhn@DKzKX!zNuoPZ)~ zC>TM|peUkoT4`bo4WyyQ8f;{$>86}^>Zzt}(D11nZoJ_J1mjfz#~N|GLCLGI#wx1@ za>%Ob8xU+@fC(?mL5CZ%1}p5aue!kosuiRW!W(rE>+G}5PI7Dj6(C_p9nn6kZLrt^ k&@3Aph@iwBci^$@xv)m7?gl#`VXUj@#w%+GI|Kp%JJ{nh;Q#;t diff --git a/src/themes/aqua/notebook.submissions.a.gif b/src/themes/aqua/notebook.submissions.a.gif deleted file mode 100644 index bd00af868bb2a9e06d54d5bba3ceb1e162fda3ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2298 zcmVz{uC)=IyJs#%_I+EH_6iHAUIp z=6Z&kI!0MbS8S)U#I?W9fsLX_RB2pke~Xu_yv5VK#?+Xkw@q1YFgr_qiJq^y%Er#w z#LU@0OJ0MIq@=IGw7$(xTXHo(Qc6~9bbytKm8zw%!fthefQgqkIzTc#Pf=cUVQz$W zf|rPtsas=l4-gX`Atfy_H~;_uT4HcLNnBfKer9utdxxBin5~VOt`89tO;lifhnihw zb8U8qLr`Q>V0LMCjCFyQhm)vYW^`_Mhb}TXPE}xih?*}mIzL2BSY>-;aff+@nv|fk zm7%mDBPb9O6k=+3F*Q6fH9KQ#cv4wpQdwg{M^J-~pEp8OUTcADdy$Zwubrv7o~pZx zmZc*lDKt1fdV`T@aC}BfQ)zL0IYn5evBQCim`P4n5)&0RIzVl7fNpkzH#*MF{=IZa~>+sjz=IrnD@A35T^7Yc!;o9Hl*4*Vh zNL$p|<4#&{cY~NtT5*Jsr8q=a>+bSsb&EnyV`_JeS!R4bLrrshi*$XAk)5z-bc$MM zeQ|!25fc@Uo33kmkh{dvlANrHmaAiMhR4s^qprZ4r@DWOpkZflh>)FTY;+VB7iVmA zDl9K^f0TZTpL~d&zQ@&{tGvU@*v{17&eh>?eUs4E;gg@T-Qw!$?C`U_%>V!Y|NsC0 z|NsC0|NsC0A^sIZa%Ew3Wn>^?c_2bzY-w(EAWLa;03rDV0SW;B04x9i003hE82|tX z{r~|83?N_t0fPh%4lsz2;lYOv87_PXF(O2T2`y?==|f94WAXfddE-BuKe3 zrAn4BVajYdQzgxoD|5oU=@O^Qm^x(wMZiD^FJL4UEMU;Ufzzi@qe`7hwW`&tSgU4e zkSv2Tfe#==kT8Kl1+!<*nnk-dZCeU&+q#YGHf`OvYUkR;OV{inIYE}m!3Ds=1q>N9 zY~aAS@rK2XBSYo@dGh1Pm@8x6OxZDG%ab#E?##G?CT3fjB?`8n0|O5qK**j=ySDAy zxO3~?%{wU zi8|)sLJQMSGlC(w01<=`LlB`ui#g0t#F875_=6Ek_VA<*P8M+l5=-jfLlQ_FQA7?r zDDh+tMi{YSnMW)^Vwp-Tv0<8X9-#!692Swp4@y*%#FBg}p~Q$XdeFiROe~;`2uw8L zLA2%z#CxQDi~I3|CNr#SH#hKrt#5SX^pF zr?g%=MHQ3IY7MJXNRfr4qDoQguv(ZpMHbg+icJX_WTVYC18l)X7Z7;y1sGp!`$ZUH z%rL_kWN`b%7-MW(#thqz%dHt=v^xg3<90j48Rw>pZnxg<>utUOe?i6!^l}phz-O@g zueo}3BZoHK?)=)krbe4q7aElLnL~F0-czFC)iO$wNOA4wSYnk+OdIBnBo+uNJVEZ zvjJ7Cf)%T1#bOrYidF2fGq1p-X6X1C((Lh$ub?9$|5%wjs$!0eq)Z_FSjY`jAQhSb zgFD`V3y=qXQfe(1-ARFW;1rZQojAIl7s%SlHQ;mAow63+SXuYah=gQWowza8oh3i}K U%GbH(BLMc$2Q0*~hkyV8JMJGgBme*a diff --git a/src/themes/aqua/notebook.submissions.gif b/src/themes/aqua/notebook.submissions.gif deleted file mode 100644 index 407923109d9bfedec166591ad32db5dd5592b1e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1579 zcmV+`2GsdSNk%w1VPgOp0LB0S|NsBp-QC#O*xA|H&(F`v$;qOkqKk`*jEsz_si}>P zjh>#K-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#wL~wBnk!0dZ#E@FvN(3lGCUOfXL~OC^ zEs50Xj2v2W(PJXf?&^$|PC7$qGoXNS%ND~r14;`n4Ed~<#5Tk1EyLPkEUvZ)drPgL zfE#WzTmWF~Er{5PtFAqM;w`S}8d;1ny|BUv5}*9HjA0N%><9o6TZ6$7jvRr3VZH$H zf+HGQbHoc6e4(*n0BC$i$<|D47|C~J{Bq0~ykOW7M^x;x$RwM*@yZul^92SV18_>q zDc^C*#7C_BLenD~_Qe+&1K^7_FQmLQ#TH|HGS4NSe2rms-bn}&pa27F#S(LE*v=M5 z7{@oK_&Gy|Q=N$3Qbvpw1-qzSHbj}kSjUzz@m5=xk!`d71$h5I+V|6cp) z#ZWSa>fZcb`tHfc?oH~x=f1n{06eeySkME1{q(4(PJ8yy<6gV?$}?}6H`X{~Cm~9d zk_?NW?SFLX7ADKqk!C8aC!|hch^XIhI&QBbvi>=lF^EZx)?$xQL%~_p63L>H#dOL4X9xQxtK;l1twC3wsQmUR46~+;n8>4^c^uwUm;zAjdP^Ko81&= zP=U(OX$VXg?g(lw1SZsQHub4QeMdDs@ri15)2LRZ1}KusP_91Jt5JQ2JGA|-2yyG0!*kpqg zco7eI*kiT0&8=>C%iG=x#2)v!Y$0EP4t)5-x5!Pda+fRG;|?Ua-5^90fYA?sIG4HD z&8~J+Yu$ew_a5iq!w!hS4}R2RyXZ}?dY#MObIidBzyPji)l1*{ZWkSM2nYZ>Cv}X! diff --git a/src/themes/aqua/notebook.users.a.gif b/src/themes/aqua/notebook.users.a.gif deleted file mode 100644 index df58f5cb14fb25ead8b8591dff60d55e58f2dd29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1774 zcmcJOi#rpF0>HN{3EkER9S&neEW@$9U-O>W!Xa^dUUlTLOXj_?S9>tWyycN+3B$bd zhzvWPYqXT|e&&lp)a@46x##{7_xpa|_xlHaKWA4bQ?p=Gz$L&I0I;>Qzq5Pr;p6`5 z=Ev7_n?n<`{IS_d@zR@x&5w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c!a%e4&A zE;BtgJgepDtwGg7l=DWkn0RxLMsCo-ojOKB3F|W3QhgiNfQB?^p4jLAxS~-Sa{z*s z<9|HXuHXXEIuUrNoem02p~~npH8Nys*wyg1T1)cBHhl+w^c75TF1M|^>_E^y-b+I3 zHeA<}KHbO@ORIVILCK2FB`fH2$UaXAIEH_aq1QTQBs0JhD!V;z8AG|jzm6QBuVQ9) zGOi+psWSS9Z%Q-I7GZ}*C7NBpAU%5lr@*V%vQ-9g`5TIYxct`v2%*WD&V*xTjzMSn z3o3_lZTk>5T-VDHC2Iv9q!}P&?S;DL8zHkY;r&>);VASFZ#b&tb$ur8Mzru1M$HTP z7Lm_!lTFvGkv#>GADl2UFo?7L<%}@8YXQHW)g@ZQ9}@XXDa+Aa(xUGD>ladN^8}Js z-5~%V$65dTM!qkuXY*y>%7m^3?H<#(iQhD2Tw8?u@!?5bbMH0?D?!!q_4Xnm^RO}J zfNwXNk9PaM?H=t7z&J0EYT+<@V`p%i5IFCR1p-9&=ZRlLHkke|v%WU{Ul;tdUz}d( z6EhUeY^O(M7Bz#&r$Z^yw|99 gO0JmypH>W6iV!5BIA#r$g(|P=ptKw=fB_c&1rqFUrvLx| diff --git a/src/themes/aqua/notebook.users.gif b/src/themes/aqua/notebook.users.gif deleted file mode 100644 index 489ddeb1340cfc0d7b2f42068ac7b9e2063bf9ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1619 zcmV-Z2CVr6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&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$}u!E2}obclgH+23`Bsn|au!9ab*to-!rs*JK2T)!~PLWfdkb{yZ z&}iBQI6B$ElQ^6JW|vM8~&5W%Z4MV!z;uEjJ^ECaa`dqT3w1l#JX#lFhGuFKBKYqQ4^ zQOvT*Vr#50RT=NqrB;mvf7eJwe%1JQM#05_*f%4BPCzLYJBiM}c9Vh6a@(3r~ z!F0+vOOSLDNi6Y%%2ZpOgdQh+uyqoyN+8S#a?BBh5mFqK1VVS;eZdr_iJ-CsRGbiV z68R;8v&vO`fDjZ-_}sGyhmX+26cUKN^a*&QECJR{=z(|Q61WWZ%Z@8_0u^2ljr0?E zE5Z5&r2h;y$}5{IhXzMjam58#WTAx?S@ixp2PbUtd+=E-z=dgDfRM!r3jpuMX1T5MrF z@J85z{H!OwECde=2vpg*<{$(CNFWTp>z(i<7(wJ|L4p?yUIr&OX5Qj*_A{z0CNKE1y z)_{gJV8L8-FasIRfQC$1@rqc?q87Kv#V&gBi&pd@8n7UN4rm|*X;8x&z{tiny77&0 z6vP_J@WeTY;R0x2Lmcoi0Or7hHn0JZeoUky`*=tI=&=kEz<>|j;D$FW e@{*WjBOo^sDFHn2V2)MHq$o$}#S7pe5CA({=u33~ diff --git a/src/themes/aqua/notebook.view.day.a.gif b/src/themes/aqua/notebook.view.day.a.gif deleted file mode 100644 index 25693e71e536d0b29afff010c1ed8f5d8db8980b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2219 zcmd^;|5MU=0>)dkotn9|VOlQ~q9rw)Z$LFWlGtZ8l z{K6u|Za@aV0DwlL3)n(EjJSQF`Gv(;5(%+6xnkAS%t9bEh1lIX8KrJBX&7BJZst8;p0 z0Wu>}m0qcVB{G%E6JT=1F3&h(a}9XM*#fBnvZ%ENtJ7mJTZIy(#pWIvpMot`nMyYi zp3y;8r+dUZGNI8yzCd_pesN)OSt!-0^%k?$1zGGacR(yvTAf~*O3Ps6c}7BPE?=fL zFj-u&OvmC&v<5S5vF9=QIz3##WGyW%E7dx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>5~FOF6ce4|f6oEo2Tvx zHm>`=-);XgKKA15SS;r@iqZ}xe*J8ea$qisUftdLu^df}=_uQ-E{QfDs-nf+FRR=p zMl8IZ%-nrD%ebVrbL~~suZ>M&IXWq`2A!>&gi*mc&Wq;LUvNuyp}vpgJjJ(~f@h4_ zptjgQ^v~QspSK?j{eXc0FLC|sn)tKm#Attg9J`&G@p*NrHn_0m!ZB!ld9X7nL^KDE zeX>^ZyB*|ZS7G@hnof)(9halhrUqdg2gIK}B{!wlJ~J7g&tm@bsPCh9MVE{#366KX z>W?rkQ9~@j5uMaunwctUUUL%HdjebhqzIk;3Mh=k`V=lh+=hmFGPis#*lvTq@_o=t z-JY{^zf^3q+;!1={gF)H?O39bXn6Hm?!!N#_obSw+czwVTJ#lCX43iRMQU+^=x$HJ Sch<#y>TFBs&K4{dZ2d1mkQS!^ diff --git a/src/themes/aqua/notebook.view.day.gif b/src/themes/aqua/notebook.view.day.gif deleted file mode 100644 index a0cff0fa8fecbf68e4511f9d522d8c1b8e4f3ec9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1839 zcmeH`{X5eM0KmWF`<WM%%8ylymr&m^1-o1OLR;xdL{J6HZ77!3HH8m9z6H``JCK8EU zU0uauaY;$ZlYRl78e(nmzVwg z{QUj>TU%ROT3Vu_qN1at3kwUMJbB{m?0o0W9U_s)=krHLM{8?q$HvB9y?Qk_H`mtI zR#jCsGBWb|^=n^W-@LrM$jC?nflyIV@$A{Np`oGV+XJ;oSCgSn<($Z3;Qu*l7BdJu{+uKX0)7#tIaX6f#qhm-&NN{j)M@L6|e0*A3 zT2@xpz`#I8Mn+0XN@r&$kH@R7uAZHp&CSgn930Hg&#$Yid;k8uL?X$|%$%8-Nk~W# z2n3HGKW=DfC@wB8Dk{2i<;wGyZ~o`MGGPA~h(H5+fc#I)z`subC>?+RVJAMnUx>2& zCS+Jv{vg!^r#iru%ModK=NOSx&Se@HyQmO+yMASs!>K423m?cfAGQ^TZc^b z){O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axtI?UCZ@mp<7-#zQ@_)iRRg3ZrtwoQejfPul zGgYIY<7a2^OqpLF26)GR%_O~UHJ$x1kTfSSLTJ{5;F>@%9tfb30(m< z{a1S+ul?j~+%67l%}j_$CeJN52&oXH>!;02XxC>clTHCvKWF&FLG8(6#_-wq(jc($ z6i_?7z1+RFwj{Mnweqz-OvrLd6nBk`GtKY#Xp{FMe4@bK>L?w+2WprD|-y1GzMP|nWIjg5`1 zt*zJB*X8Bq8yg#HYHGQ;xld0|=H}+BtE<%1)ZyXbq zL_{twF1NS0iHV7+9=_i;IPY zg?f5=+1c6F+TzyQ;?~;Y*4pCM+TzyQ;?~;Y*4pCM+TzyQ;?~;YA^8LW3IKlqEC2ui z06PE~000O6fB*pk0|bVLh>41ejE#&11_uZT367SRm*%)q4r&;t((8ypTD7tq?;9v>ed zARi$h+vVIL=;`R@s1RG}gvzk((B znV1;SM2Q6zR87uxRq3i5W90T1=s0Mg*4p9_TDUW5bFF zHEi6#v4F+`o;gD3;92yjQ5rjV^zael2Mwc4jRFC3^=Oa~K7{btarG&U0vI<8;XtH_ zkqZ7rc@_{7LT=o%MML!9x#Ngjyl0R2JxgQj*{?jWB0+*NGjG4IB^AcE9g*Rg|TV^rwjhdPkx;tFGc0Y(@hkOAX|O$^~g8BeevgBfR3Sj2}b9R7&{ z8DyY=WD#R9d8Cm~R#{<_Eq*wq4%fAiLtz zl<_48Q1mx~8ndafXPiQ*8xc71MH@{Jg%(;z)mkg9v)-!ft-0cQ)U32FfKdi*JTXKP zZV-`yu*^2=?6c5DE3LCgY*0o7Eg13!3nyHrX{f4=8t%8^T1Kw8s-3H8xZVx12DTL( zq68FiJYnw>_1>GWz5CwlFTel#+wZ+{%rOTGYYg!~A`px~2Lwe#Eb+t?3|DON#TXZ1 K!v=^10suRd?N96g diff --git a/src/themes/aqua/notebook.view.month.a.gif b/src/themes/aqua/notebook.view.month.a.gif deleted file mode 100644 index 2653b3d6ddbd38c56d36309235c7d3dc79610a45..0000000000000000000000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azZi27i5%?f&^rkQAQYnN^k}ZW}rbQ8Bm}BMH*hn=|u`&BsymrWK>#b3Sx-! z#iHYoLqj=Uj6=g1m6~yeoc@-k&_yK?KroF8YG|K?AgNFblx6ztTWQ9nrq=E3hyCfUF(A(&0w9(+2AXu;!fOEII&~69*mH zavLtVhfpGl3DewxhY5M;u}1=Y^w9?me)vJdAASIGupfK`5=g;)NE~q>1}j`J!W;Y1 zN5q1BZ1Bi~giOdF2J?Zi!i*%G4hYi8P$t8{ZV7u=TyrTs? z$#~!bC<=rk$|!m)p$845=urv{rs(l}^rz5($`Yv1P>LR@sM7o@G&E1cD&|KIzADZ; z-@NszQ2+k(=*MG5^Nzh)F6#z3?l{*$b~L;p#)yA@QF}#AqaXAi(Y`>iVln-2w>3*DYDRu zS#04G!x%zXMDU7QBx4rq;R<`)10TLn!!Ljlj4Yf$6nNxC9`Ps&J@WC7yzpZm_ejV; z8gh_`JY*jQ=|@H?l8?MlLO%5IjeB%}7s41u1_ZDKK6vtzpbVubM@h<3n(~yW{G=$t zk&Af%!vRbnMlnucjAK0DmblENE_cbxUi$KvzzilX5Alj=+=CU+@B%WDk%1osp+NnK zrZl0Mp#w$Jn%1PIHYKD@Y7PjR+{{ony$OR*?1LZdfJO`?p^Rlnq6{?1={d4YE*+7CPisVQF_vou9T%PjcH0<+R~M})TA|isZCXS)11aM3&wy( zG(xJ-0(3wI9`Hp{m#WmJGS#UbV5(G|+Ek@ZRjN;2YE-Fu)vEf!sYHcFKmY(cZGZ-; diff --git a/src/themes/aqua/notebook.view.month.gif b/src/themes/aqua/notebook.view.month.gif deleted file mode 100644 index dddc1eebf3dcccdcbf70b75b82cb1e6641ec8c4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1530 zcmVFMzB@b2#J@9*zWP*62BHK3rNo}QkCg@x4A)P#hD)z#Ilt*zJB*X8Bqxw*L; z8ylaWpVQORYinz2YHGW?yH8I~tE;Qw;o;-sO?N*Ng$ zqN1YC&d$=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GC+jw(r3AW|M9V#THMFcBQ-+O1>{ zo6unmm0|tWezB=#HPPGdFX>9AkW$NP+htv0Lyx;R_m#$rccE5PKe#7=mX zI}6G3T9G_H%}|9H@0=hoSvm-OELAQ8y*Zg zoN#)GGd6(gUhA}y6bnp#`8U~`Q}jh>JETPsdk2%4!ZEU48@9t|ANmRKRG!?I&Ykz`e%JR$oPD} zdHq9lOP12McF=v;Y7A diff --git a/src/themes/aqua/notebook.view.week.gif b/src/themes/aqua/notebook.view.week.gif deleted file mode 100644 index 27bec5c6ee113c9cc0c2eefd14d98e42d894eadb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1954 zcmeH`dpFw&0ziLxrx-~HenAQAOew2UiwvfNB=uMw(NSZ|5YnTzcBh%@tPa*D67h(d zSf)+YR-`&8nwZqoyNNth=|ibRJJn>gMD-EWV~W__PqF{(IrkIXb8mF)Ve%)LsQ>|3 z004zTvA({(v9Ynaxw*T$t5&PGx3|~U)^>JwEEbDYDm9r*0|Nug%gZY(D>9kv&6_u? ztE(d;Bgc*%GZ+l6uC7Oq9&K)J1^}RgpsC$^HBHA3b`c z(P-}8y*oWUec-@>p`jrV1oQLrTUuJGtE)3IGRDTnqNAflBGKUBU|L!ll}f#J>z0#~ zQ+av$nKNh3pFcl5JlxaMQ(0Nb=kuREdsbUpd*Q-`wzjsVr6qwtP*qhmGc%Kym&fDr z`uh6VY_?Xb?da%eXlS^6`Eo%)!Ss_~|Ih!>fX8oeh!v0r`28nf;J;4*XbS*=V*}W1 zB^PbKKkbgJNmYh*^6&XV!REklfv0}Cv&?{U-S>EzSSX+b?h$r9t=H~a3=|qlPLwes z;x3T$f(LwvYL{>uXEItWZ=EQGQSi!DAc|KK?Gz`%23=*h!=lbA>}U`K`b$-MC&S}4 z!iF%Oj2-*AlP&*Rddk~3n2Usf{_1DG!4Yf-q%KP-=TJ}>_XysmEJcmhx>Fg%E|6Dl z=YbELPWx^-+a3)4hu-y9I1=9w+psB&(wN2tv|7H6WIYG#9*S?0WFrKQ*8AsdjZl@f zww4s(R+IGy8yx9#z5nl{;8hbob!9?`>Tg+CFxjFj{-%CY@MK?B%C2~r_E)Swohz(a z__ln@`Y(*8l9PNZ=b*C;3hK9SSuiA7FN7hjUp-XXf-g`Wn9%nIO7WrhY#0W7&4Ag0 zdNT#{iJ$N}+ZvdFRUU$qh$Yr1TDfj}Ex_;WKp;|#E6@jszqdB=HExM$5*$ZEi!y}4 zAcR_V*pHEkitZ6fe!$Mk0A%Qkd>+pIaE=aZ6&%Ei6J9PVZ7qM1lcxSmDD zeEOnHi8=H{rnc*Q^E1jV*1HLcqWLANB^3uJsJJ8KM72FV!dW8$13WZ8f~>wad^|(O z!-Lcbo}@}*wP;W4Fnj-Kx$?F1tLBd2E-2DBX4%wuJ&RN7z?>q{AW2D_{Zg8+4}whg z5-5L4-mZY)6Oy*n$mZjzopO3oy{S=PS%k|I0+hKeGpE8{$y=guwBEt2M0K%U6{pM^ zNQ*3$Zm$R;9sjg>U2{9t+>dbD$(leQk9)mFs8Wk+0&c_dIFU}4f-aV7$JX^Qn8Ly# zk?HZTeI1xYTq5MXLVJ@>qKmOj8r48TmlSx5g z2WxWYC)PoSHBU|%$joUv;P4sU7^FMFFhF%lynjXN(l1V&og~mRwS-(|1j6~u7d1#^ zcG3A@ivxin)XsupWAHDzEnkH=fOX43GwG>aBVf@~6Vm2jhj9%nU|PE8FP?rIg(S$j z&bf&5hrXL{&HEg&KoAyxSd#A2-&w^Pj9S}(05fc%f9YP>f?}(>PdBJaA24g%EnC>a zb6*9ycSn#!nsfsSgG>yxF&RHl7qF9NL(>db)V?2M^6e#gs?c{~+V;k2hLhJCPsxq$KU4MczKi6YOIRo{nuIjqkctkTm7#sLY`q^sme)G{Nj~ z5}wb)CR "#DDDDDD", - "table_header" => "#EEEEEE", - "table_body" => "#FFFFFF", - "table_background" => "#BCBCBC", - "table_cell_select" => "#B6BAC2", - "tooltip_background" => "#FFFACD", - "tooltip_border" => "#604C0A", - "foreground" => "#000000", - "background" => "#FFFFFF", - "highlight" => "#D6DAE2", - "selected" => "#CCCCFF", - "link" => "#0044AA", - "v_link" => "#0044AA", - "a_link" => "#0044AA"); +function display_shaded_photo($photo_url, $link_url, $original_file, + $width = 0, $height = 0) { + global $theme; -$style = array("small" => "font-size:10px", - "normal" => "font-size:12px", - "large" => "font-size:14px"); + if (is_file($original_file)) { + if ($width == 0 && $height == 0) { + $image_size = getimagesize($original_file); + } + } else { + $image_size = getimagesize("themes/null.photo.large.gif"); + } + + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
    \"\"/\"\"/\"\"/
    \"\"/"; + if ($link_url == "") + print "\"\"/"; + else + print "\"\"/"; + print "\"\"/
    \"\"/\"\"/\"\"/
    \n"; +} + +function display_selectbutton() { + global $theme; + global $strings; + global $po_options; + + $text = $strings['generic']['select_all']; + $name = "select"; + $type = "button"; + $title = $text; + + if ($po_options['photo_view'] == "slide") { + $extra = " onclick=\"javascript:toggleChecksSlide(); changeText('selectButton', '".$strings['generic']['select_all']."', '".$strings['generic']['select_none']."')\" "; + } else { + $extra = " onclick=\"javascript:toggleChecksList(); changeText('selectButton', '".$strings['generic']['select_all']."', '".$strings['generic']['select_none']."')\" "; + } + + print ""; +} + +function display_navigator_box_top($index, $data, $width) { + global $theme; + + print "
    "; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
    \"\""; + + print "\n\n"; + print "\n"; + + $current_index = 1; + foreach ($data as $item) { + if ($current_index == $index) { + $here = "class=\"navibar_a\" "; + } else { + $here = "class=\"navibar\" "; + } + print "\n"; + $current_index++; + } + print "\n"; + print "
    \"\"/$item[alt]\"\"/
    \n"; + + print "
    \"\"/
    \n"; +} + +function display_navigator_box_bottom($width) { + global $theme; + + print "
    \"\"/\"\"/\"\"/
    \n"; + print "
    "; +} + +function display_slide_top($cell_counter, $checks) { + global $cell_size; + global $cell_border; + + $size = $cell_size + $cell_border * 2; + + print ""; + print ""; + print "\n"; + } + + print "
    "; +} + +function display_frame_bottom($cell_counter, $value, $checks) { + if ($checks) { + print "
    "; + print "
    \n"; +} + +function site_navigator($sub_menu) { + global $theme; + global $po_user; + global $strings; + global $site_url; + global $site_title; + + $type = $po_user['type']; + + print "\n"; + + print "
    "; + + print "
    "; + print ""; + print "
    \n"; + + print "\n"; +} + +/* Tooltip width max; equal to half the minimum page width */ +$tooltip_width = 400; + +/* The size of the slide cell */ +$cell_size = 190; +$cell_border = 10; +$image_max_size = 700; +$thumb_max_size = 170; + +$thm_elem['javascript'] = ""; + +/* The theme elements */ +$thm_elem['shortcut_icon'] = "\n"; +$thm_elem['stylesheets'] = "\n"; + +$thm_elem['site_logo'] = "\"Photo"; + +/* Buttons */ + +/* name + type = [ reset, button, submit ] + title + key +*/ +function make_button($name, $type, $title, $key = FALSE, $text = FALSE, $extra = "") { + global $theme; + if ($text === FALSE) { + $text = $title; + } + + $button = ""; + + return $button; +} + +function theme_generate_buttons() { + global $strings; + global $thm_elem; + global $theme; + + /* Submit buttons */ + $thm_elem['button.search'] = make_button("search", "submit", $strings['generic']['search'], "S"); + $thm_elem['button.register'] = make_button("register", "submit", $strings['generic']['register'], "S"); + $thm_elem['button.save.changes'] = make_button("save_changes", "submit", $strings['generic']['save_changes'], "S"); + $thm_elem['button.confirm.delete'] = make_button("confirm_delete", "submit", $strings['generic']['confirm_delete'], "S"); + $thm_elem['button.confirm.subscription'] = make_button("confirm_subscription", "submit", $strings['generic']['confirm_subscription'], "S"); + $thm_elem['button.subscribe'] = make_button("subscribe", "submit", $strings['users']['subscribe_prompt'], "S"); + $thm_elem['button.make_client'] = make_button("make_client", "submit", $strings['users']['make_client'], "S"); + $thm_elem['button.login'] = make_button("login", "submit", $strings['generic']['login'], "S"); + $thm_elem['button.logout'] = make_button("logout", "submit", $strings['generic']['logout'], "S"); + $thm_elem['button.submit'] = make_button("submit", "submit", $strings['generic']['submit'], "S"); + $thm_elem['button.add'] = make_button("add", "submit", $strings['generic']['add'], "S"); + $thm_elem['button.add.photos'] = make_button("add_photos", "submit", $strings['generic']['add_photos'], "S"); + $thm_elem['button.add.duplicate'] = make_button("add_duplicate", "submit", $strings['generic']['add_duplicate'], "S"); + $thm_elem['button.add.manufacturer'] = make_button("add_manufacturer", "submit", $strings['generic']['add_manufacturer'], "S"); + + /* Other buttons */ + $thm_elem['button.go.to.f'] = make_button("go_to_f", "submit", $strings['generic']['go_to_f']); + $thm_elem['button.go.to.a'] = make_button("go_to_a", "submit", $strings['generic']['go_to_a']); + $thm_elem['button.link.to.a'] = make_button("link_to_a", "submit", $strings['generic']['link_to_a']); + $thm_elem['button.move.to.a'] = make_button("move_to_a", "submit", $strings['generic']['move_to_a']); + $thm_elem['button.move.to.f'] = make_button("move_to_f", "submit", $strings['generic']['move_to_f']); + $thm_elem['button.print'] = make_button("print_req", "submit", $strings['generic']['print']); + $thm_elem['button.export'] = make_button("export_req", "submit", $strings['generic']['export']); + $thm_elem['button.add.to.spool'] = make_button("spool_req", "submit", $strings['generic']['add_to_spool']); + $thm_elem['button.bulk.update'] = make_button("bulk_update_req", "submit", $strings['generic']['bulk_update']); + $thm_elem['button.per.page'] = make_button("per_page_req", "submit", $strings['generic']['per_page']); + $thm_elem['button.order.by'] = make_button("order_by_req", "submit", $strings['generic']['order_by']); + $thm_elem['button.rotate'] = make_button("rotate_req", "submit", $strings['generic']['rotate']); + $thm_elem['button.set.as.watermark'] = make_button("watermark_req", "submit", $strings['generic']['set_as_watermark']); + $thm_elem['button.delete_s'] = make_button("delete_req", "submit", $strings['generic']['delete']); + $thm_elem['button.empty.trash'] = make_button("empty_trash_req", "submit", $strings['generic']['empty_trash']); + + // These are special: + // 'button.clear' resets the form to its initial state. + // 'button.cancel' goes back to the referring page. + // 'button.back' goes back to the referring page. (used for info/no-op pages) + + $thm_elem['button.clear'] = make_button("clear", "reset", $strings['generic']['clear'], "C"); + $thm_elem['button.cancel'] = make_button("cancel", "button", $strings['generic']['cancel'], "C", FALSE, "onclick=\"javascript: history.go(-1);\""); + $thm_elem['button.back'] = make_button("back", "button", $strings['generic']['back'], "C", FALSE, "onclick=\"javascript: history.go(-1);\""); + $thm_elem['button.back.2'] = make_button("back", "button", $strings['generic']['back'], "C", FALSE, "onclick=\"javascript: history.go(-2);\""); + + // These buttons need arguments + $thm_elem['button.list.view'] = make_button("list_view", "button", $strings['generic']['list_view'], "V", FALSE, "onclick=\"javascript: location.href = '%s';\""); + $thm_elem['button.slide.view'] = make_button("slide_view", "button", $strings['generic']['slide_view'], "V", FALSE, "onclick=\"javascript: location.href = '%s';\""); + $thm_elem['button.edit'] = make_button("edit", "button", $strings['generic']['edit'], FALSE, FALSE, "onclick=\"javascript: location.href = '%s';\""); + $thm_elem['button.delete'] = make_button("delete", "button", $strings['generic']['delete'], FALSE, FALSE, "onclick=\"javascript: location.href = '%s';\""); + + // These are all special, because they're for navigation. + $thm_elem['button.option.a'] = "\"*\"/"; + $thm_elem['button.option'] = "\"O\"/"; + $thm_elem['button.first'] = "\"<|\"/"; + $thm_elem['button.previous'] = "\"<\""; + $thm_elem['button.next'] = "\">\""; + $thm_elem['button.last'] = "\">|\"/"; +} + +$generate_i18n_data[] = "theme_generate_buttons"; ?> diff --git a/src/trash.empty.php b/src/trash.empty.php index dc9040d..d81ac5e 100644 --- a/src/trash.empty.php +++ b/src/trash.empty.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,136 +17,103 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/site.php"; include_once "include/search.2.php"; -include_once "$theme/theme.php"; -$database = site_prolog(); +$database = site_prolog(PO_USER_TYPE_USER); -if ($po_user['type'] < $user_type['client']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +if ($po_user['type'] == PO_USER_TYPE_ADMIN) { + $owner_id = pg_escape_string($_REQUEST['user']); + $folder_id = "(select identifier from folder where users = $owner_id and caption = 'Trash')"; + } else { + $owner_id = $po_user['id']; + $folder_id = $po_user['trash_folder']; + } -/* this will enable administrators to empty anybody's trash */ -$user_id = FALSE; -if ($po_user['type'] == $user_type['administrator']) { - $user_id = pg_escape_string($_REQUEST['user']); -} -if (!$user_id) { - $user_id = $po_user['id']; -} - -$trash_folder_id = pg_fetch_row(pg_query($database, "select identifier from folder where users=$user_id and caption='Trash'")); -$photos_in_trash = pg_query($database, " - select small_image_path, medium_image_path, large_image_path, photo.identifier - from photo, photo_version - where photo.identifier = photo_version.photo - and photo.folder = '$trash_folder_id[0]'"); - -$num_of_photos_in_trash = pg_num_rows($photos_in_trash); pg_query($database, "begin"); -// update the imagemagick_composite_options table if the photo is a selected watermark mask -$result = pg_query($database, "update imagemagick_composite_options set photo_version = null where photo_version in (select identifier from photo_version where photo in (select identifier from photo where folder='$trash_folder_id[0]'))"); +$photos_in_trash = pg_query($database, " + select path + from photo, photo_version, files + where files.version = photo_version.identifier + and photo.identifier = photo_version.photo + and photo.folder = $folder_id"); + +$num_of_photos_in_trash = pg_num_rows($photos_in_trash); + +$result = TRUE; + +// We need to check to see if we're erasing our watermark photo! +if ($po_options['watermark_photo']) { + $result = pg_query($database, "select identifier from photo_version where photo in (select identifier from photo where folder=$folder_id and identifier = $po_options[watermark_photo])"); + if (pg_num_rows($result) > 0) { + $result = store_user_pref($database, $po_user['id'], 'watermark_photo', ''); + $result = store_user_pref($database, $po_user['id'], 'watermark_path', ''); + } + } + +if ($result) { + // remove references in keywords + $result = pg_query($database, "delete from photo_keywords where photo in (select identifier from photo where folder=$folder_id)"); + } + +if ($result) { + // remove references in albums + $result = pg_query($database, "delete from album_content where photo in (select identifier from photo where folder=$folder_id)"); + } + +if ($result) { + // remove all photo_dupe entries + $result = pg_query($database, "delete from photo_dupe where photo in (select identifier from photo where folder=$folder_id)"); + } + +if ($result) { + // remove all file entries + $result = pg_query($database, "delete from files where version in (select identifier from photo_version v where v.photo in(select identifier from photo p where p.folder=$folder_id))"); + } + +if ($result) { + // remove all photo_version entries + $result = pg_query($database, "delete from photo_version where photo in (select identifier from photo where folder=$folder_id)"); + } + +if ($result) { + // remove all photo_tech entries + $result = pg_query($database, "delete from photo_tech where photo in (select identifier from photo where folder=$folder_id)"); +} + +if ($result) { + // remove all ratings + $result = pg_query($database, "delete from rating where photo in (select identifier from photo where folder=$folder_id)"); + } + +if ($result) { + // now remove the actual photo entries + $result = pg_query($database, "delete from photo where folder=$folder_id"); + } + if (!$result) { + site_push_error($strings['errors']['db_insert_failed']); pg_query($database, "rollback"); site_epilog($database); - header("location: user.php?user=$user_id"); + header("Location: user.php?user=$owner_id"); exit(); } -// remove references in keywords -$result = pg_query($database, "delete from photo_keywords where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} - -// remove all submission entries -$result = pg_query($database, "delete from photo_spooler where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove references in albums -$result = pg_query($database, "delete from album_content where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove all submission entries -$result = pg_query($database, "delete from submission where photo_dupe in (select photo_dupe.identifier from photo, photo_dupe where photo_dupe.photo=photo.identifier and photo.folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove all photo_dupe entries -$result = pg_query($database, "delete from photo_dupe where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove all photo_version entries -$result = pg_query($database, "delete from photo_version where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove all photo_tech entries -$result = pg_query($database, "delete from photo_tech where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// remove all ratings -$result = pg_query($database, "delete from rating where photo in (select identifier from photo where folder='$trash_folder_id[0]')"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} -// now remove the actual photo entries -$result = pg_query($database, "delete from photo where folder='$trash_folder_id[0]'"); -if (!$result) { - pg_query($database, "rollback"); - site_epilog($database); - header("location: user.php?user=$user_id"); - exit(); -} - -// first of all remove the thumbnail and image from the filesystem +// Lastly, remove all of the thumbnail and image from the filesystem +$err = error_reporting(0); for ($i=0; $i < $num_of_photos_in_trash; $i++) { $drop_this_image = pg_fetch_row($photos_in_trash, $i); - error_reporting(0); unlink($image_repository_path . "/" .$drop_this_image[0]); - unlink($image_repository_path . "/" .$drop_this_image[1]); - unlink($image_repository_path . "/" .$drop_this_image[2]); - error_reporting(1); - /* if a content based search server is set up, audit the removed images */ - audit_photo($database, $drop_this_image[3], $po_user['session']); + // audit_photo($database, $drop_this_image[3]); } +error_reporting($err); + pg_query($database, "commit"); site_epilog($database); -header("location: user.php?user=$user_id"); +header("Location: user.php?user=$owner_id"); ?> diff --git a/src/user.php b/src/user.php index 33e4184..fa55397 100644 --- a/src/user.php +++ b/src/user.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,113 +17,121 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/common.php"; include_once "include/profile.php"; include_once "include/site.php"; -include_once "$theme/theme.php"; +; -$user_id = pg_escape_string(isset($_REQUEST['user']) ? $_REQUEST['user'] : 0); +$owner_id = pg_escape_string(isset($_REQUEST['user']) ? $_REQUEST['user'] : 0); $database = site_prolog(); -if ($user_id) { - $owner_user = pg_fetch_row(pg_query($database, "select identifier, type from users where identifier=$user_id")); +$my_folder = ($po_user['id'] == $owner_id); +$owner_type = $po_user['type']; + +if ($owner_id) { + $tmp = pg_fetch_row(pg_query($database, "select identifier, type from users where identifier=$owner_id")); + $owner_type = $tmp[1]; } -if (($po_user['id'] == $owner_user[0]) && - ($po_user['type'] > $user_type['disabled'])) { - site_epilog($database); - header("location: my.folder.php"); - exit(); -} +if ($my_folder) { + site_header($strings['users']['my_folders']); + site_navigator(5); + } else { + site_header($strings['users']['display']); + site_navigator(1); + } -site_header($page_width, "Display User"); -site_navigator(1); - -if ($owner_user[0]) { - $type = pg_fetch_row(pg_query($database, "select type from users where identifier='$owner_user[0]'")); -} - -if (($owner_user[0] == "") || ($type[0] < $user_type['client'])) { +if (($owner_id == 0) || ($owner_type < PO_USER_TYPE_CLIENT)) { /* list all users, if no user is specified or the account is disabled */ - site_navigator_status("Users : select a user", ""); - print " 
    \n"; - $user_list = pg_query($database, "select identifier, last_name, first_name, member_since from users where users.type > $user_type[client] order by last_name, first_name"); + site_navigator_status(emit_a("user.php", $strings['generic']['users']) . + " : ".$strings['users']['select'], ""); + $user_list = pg_query($database, "select identifier, last_name, first_name, member_since, type, hide from users where users.type > ".PO_USER_TYPE_CLIENT." order by last_name, first_name"); display_users($database, $user_list, $po_user['id']); - print " 
    \n"; -} -elseif ($type[0] == $user_type['client']) { +} elseif ($owner_type == PO_USER_TYPE_CLIENT) { /* display clients */ - $user_name = pg_fetch_row(pg_query($database, "select last_name, first_name from users where users.type = $user_type[client] and identifier=$owner_user[0]")); - site_navigator_status("Users : $user_name[0], $user_name[1]", ""); + $user_name = pg_fetch_row(pg_query($database, "select last_name, first_name from users where users.type = ".PO_USER_TYPE_CLIENT." and identifier=$owner_id")); + site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_name[0], $user_name[1]", ""); - if ($po_user['type'] > $user_type['disabled']) { - $client = pg_fetch_row(pg_query($database, "select identifier from client where users=$po_user[id] and client=$owner_user[0]")); - if (($client != 0) || ($po_user['type'] == $user_type['administrator'])) { - print "
    "; - print "$user_name[1] $user_name[0] is one of your registered customers."; - print "
    "; - print " 
    \n"; - display_contact_info($database, $po_user['id'], $owner_user[0], $display_header); - print " 
    \n"; + if ($po_user['type'] > PO_USER_TYPE_DISABLED) { + $client = pg_fetch_row(pg_query($database, "select identifier from client where users=$po_user[id] and client=$owner_id")); + if (($client != 0) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + if ($po_user['type'] != PO_USER_TYPE_ADMIN) { + print "

    $user_name[1] $user_name[0] ".$strings['users']['registered_customer'] ."

    "; + } + display_contact_info($database, $owner_id); } } } else { /* display users and the administrator */ - $user_name = pg_fetch_row(pg_query($database, "select last_name, first_name from users where users.type > $user_type[client] and identifier=$owner_user[0]")); - site_navigator_status("Users : $user_name[0], $user_name[1]", ""); - print " 
    \n"; - display_folders($database, "", $po_user['id'], $po_user['type'], $owner_user[0], "with_header"); - print " 
    \n"; - display_albums($database, "", $po_user['id'], $po_user['type'], $owner_user[0], $owner_user[1], "with_header"); - print " 
    \n"; - - $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($owner_user[0], $access[public])")); - if ($equipment_by_user[0] > 0) { - print " 
    \n"; - display_lens($database, $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_camera($database, $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_profile($database, "flash", $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_profile($database, "scanner", $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_profile($database, "filter", $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_film($database, $po_user['id'], $owner_user[0]); - print " 
    \n"; - display_profile($database, "support", $po_user['id'], $owner_user[0]); - print " 
    \n"; + $user_name = pg_fetch_row(pg_query($database, "select last_name, first_name from users where users.type > ".PO_USER_TYPE_CLIENT." and identifier=$owner_id")); + $left = ""; + if ($my_folder) { + $num_of_photos = pg_fetch_row(pg_query($database, "select count_photos_by_user($po_user[id])")); + $num_of_folders = pg_fetch_row(pg_query($database, "select count_folders_by_user($po_user[id]) -1 ")); + $num_of_albums = pg_fetch_row(pg_query($database, "select count_albums_by_user($po_user[id]) -1 ")); + $left = sprintf($strings['users']['you_have_photos'], + $num_of_photos[0], + $num_of_folders[0], + $num_of_albums[0]); } - if ($po_user['id'] != FALSE) { - $client = pg_fetch_row(pg_query($database, "select identifier from client where users=$po_user[id] and client=$owner_user[0]")); - if (($client != 0) || ($po_user['type'] == $user_type['administrator'])) { - print "
    "; - print "$user_name[1] $user_name[0] is one of your registered customers."; - print "
    "; - display_contact_info($database, $po_user['id'], $owner_user[0], $display_header); - print " 
    \n"; + site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : $user_name[0], $user_name[1]", $left); + display_folders($database, "", $owner_id, "with_header"); + display_albums($database, "", $owner_id, $owner_type, "with_header"); + + if ($po_user['type'] >= PO_USER_TYPE_CLIENT) { + print "
    "; + print "
    "; + print ""; + print ""; + display_spool_actions($database, $po_user['id']); + print "
    "; + print "
    "; + } + + if (!$my_folder) { + $equipment_by_user = pg_fetch_row(pg_query($database, "select count_equipment_by_user($owner_id, $access[public])")); + if ($equipment_by_user[0] > 0) { + display_lens($database, $po_user['id'], $owner_id); + display_camera($database, $po_user['id'], $owner_id); + display_profile($database, "flash", $po_user['id'], $owner_id); + display_profile($database, "scanner", $po_user['id'], $owner_id); + display_profile($database, "filter", $po_user['id'], $owner_id); + display_film($database, $po_user['id'], $owner_id); + display_profile($database, "support", $po_user['id'], $owner_id); } - $already_client = pg_query($database, "select identifier from client where users=$owner_user[0] and client=$po_user[id] and status!=4"); - if (pg_num_rows($already_client) == 0) { - $photos_by_user = pg_fetch_row(pg_query($database, "select count_photos_by_user($owner_user[0], $access[public])")); - if ($photos_by_user[0] > 0) { - print "
    "; - print "If you like these photos you can register and see the protected photos of $user_name[1] $user_name[0]."; - print "
    "; - print " 
    \n"; + if ($po_user['id']) { + $client = pg_fetch_row(pg_query($database, "select identifier from client where users=$po_user[id] and client=$owner_id")); + if ($client != FALSE) { + print "

    $user_name[1] $user_name[0] ".$strings['users']['registered_customer'] ."

    "; + } + if (($client != 0) || ($po_user['type'] == PO_USER_TYPE_ADMIN)) { + display_contact_info($database, $owner_id); + } + + if ($po_user['type'] != PO_USER_TYPE_ADMIN) { + $already_client = pg_query($database, "select identifier from client where users=$owner_id and client=$po_user[id] and status!=4"); + if (pg_num_rows($already_client) == 0) { + print "

    ".$strings['users']['register_prompt']." $user_name[1] $user_name[0].

    "; + + print "
    "; + print "\n"; + print "
    "; + print $thm_elem['button.subscribe']; + if ($po_user['type'] > PO_USER_TYPE_CLIENT) { + print $thm_elem['button.make_client']; + } + print "
    "; + print "
    "; + } } - print "\"Subscribe\""; - print " 
    \n"; } } -} -print " 
    \n"; + } + site_footer($database); site_epilog($database); ?> diff --git a/src/xml.converter.2.php b/src/xml.converter.2.php index ba52403..ee2d631 100644 --- a/src/xml.converter.2.php +++ b/src/xml.converter.2.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/tools.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/site.php"; include_once "include/export.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $source_file_tmp = $_REQUEST['source_file_tmp']; $source_file_extension = $_REQUEST['source_file_extension']; @@ -59,6 +53,7 @@ $image_data = array ("folder" => $_REQUEST['folder'], "storage_index" => $_REQUEST['storage_index'], "access_rights" => $_REQUEST['access_rights'], "hide_original" => $_REQUEST['hide_original'], + "store_url" => $_REQUEST['store_url'], "camera" => $_REQUEST['camera'], "lens" => $_REQUEST['lens'], "filter" => $_REQUEST['filter'], @@ -84,9 +79,9 @@ $tmp_value = pg_fetch_row(pg_query($database, "select value from scan_resolution $tmp_value = pg_fetch_row(pg_query($database, "select value from scan_bitdepth where identifier=".$image_data['scan_bitdepth'])); $image_data['scan_bitdepth'] = $tmp_value[0]; $tmp_value = pg_fetch_row(pg_query($database, "select value from scan_multiscan where identifier=".$image_data['scan_multiscan'])); $image_data['scan_multiscan'] = $tmp_value[0]; -site_header($page_width, "Tools : XML Converter"); +site_header("Tools : XML Converter"); site_navigator(10); -site_navigator_status("Users : My Tools : XML Converter : XML File", ""); +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.tools.php", $strings['generic']['my_tools'])." : XML Converter : XML File", ""); error_reporting(0); $fd = fopen($source_file_tmp, "r"); @@ -115,8 +110,8 @@ print convert_xml2html(create_xml_header()); print convert_xml2html(create_xml_bulkupload_header()); print convert_xml2html(create_xml_folder_header($image_data['folder'])); -for ($i=0; $i < $shooting_data[frames]; $i++) { - $data = $shooting_data[data]; +for ($i=0; $i < $shooting_data['frames']; $i++) { + $data = $shooting_data['data']; $image_data['shutter'] = $data[$i]['shutter']; $image_data['aperture'] = $data[$i]['aperture']; @@ -157,12 +152,10 @@ print convert_xml2html(create_xml_bulkupload_footer()); print ""; print ""; - -print " 
    "; -print "\"Back\"/\n"; -print " 
    "; +print "

    "; +print $thm_elem['button.back']; +print "

    "; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/xml.converter.php b/src/xml.converter.php index 5053342..efa6306 100644 --- a/src/xml.converter.php +++ b/src/xml.converter.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; + include_once "include/config.php"; include_once "include/tools.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/export.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $source_file = $_FILES['source_file']['name'][0]; $source_file_type = $_FILES['source_file']['type'][0]; @@ -42,7 +36,7 @@ $temp_file = tempnam("/tmp", "po"); error_reporting(0); if (!copy($source_file_tmp, $temp_file)) { site_epilog($database); - header("location: my.tools.php?selector=2"); + header("Location: my.tools.php?selector=2"); exit(); } error_reporting(1); @@ -51,32 +45,9 @@ $header_data = convert_read_header($fd, $source_file_extension); $shooting_data = convert_read_body($fd, $source_file_extension); fclose($fd); -if ($po_user['type'] != $user_type['administrator']) - $location_mod = " where private is false or users=$po_user[id] "; - else - $location_mod = ""; - -$users_location = pg_query($database, "select identifier, country, state, city, place from view_location $location_mod order by country, state, city, place"); - -$users_folder = pg_query($database, "select identifier, caption from folder where users=$po_user[id] and caption!='Trash' and caption!='Orphanage'"); -$users_camera = pg_query($database, "select identifier, name, model, variation from view_camera where users=$po_user[id]"); -$users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$po_user[id]"); -$users_scanner = pg_query($database, "select identifier, name, model, variation from view_scanner where users=$po_user[id]"); -$users_filter = pg_query($database, "select identifier, name, model, variation from view_filter where users=$po_user[id]"); -$users_support = pg_query($database, "select identifier, name, model, variation from view_support where users=$po_user[id]"); - -$scan_resolution = pg_query($database, "select identifier, value from scan_resolution"); -$scan_bitdepth = pg_query($database, "select identifier, value from scan_bitdepth"); -$scan_multiscan = pg_query($database, "select identifier, value from scan_multiscan"); -$iso_override = pg_query($database, "select identifier, value from film_iso"); - -site_header($page_width, "Tools : XML Converter"); +site_header($strings['tools']['xml_converter']); site_navigator(10); -site_navigator_status("Users : My Tools : XML Converter", ""); - -if ($header_data[iso]) { - $users_film = pg_query($database, "select identifier, name, model, iso from view_film where users=$po_user[id] and iso=$header_data[iso]"); -} +site_navigator_status(emit_a("user.php", $strings['generic']['users'])." : ".emit_a("my.tools.php", $strings['generic']['my_tools'])." : ".$strings['tools']['xml_converter'], ""); print " 
    "; display_navigator_box_top($tools_data['converter']['idx'], $tools_data, "100%"); @@ -84,103 +55,74 @@ display_navigator_box_top($tools_data['converter']['idx'], $tools_data, "100%"); print " 
    "; print "
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +print "\n"; +print "\n"; +print "
    Fill in the image details and default values
    \n"; +print "\n"; +print "\n"; print "\n"; -print "\n \n\n"; -print "\n\n"; +print "\n\n"; -print "\n\n\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; +display_iptc_form($database, FALSE, + "", "$po_user[first_name] $po_user[last_name]", "", "", + "", "", "", "", "", + $strings['photo']['copyright']." (c) " . date("Y") . " $po_user[first_name] $po_user[last_name]", + "", "", "", "", "", 0, "t", "t", ""); -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -if ($users_film) { - print "\n"; -} -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "
    ".$strings['tools']['fill_in_image_details']."
    Image file name"; -print ""; - -print "
    ".$strings['tools']['base_file'].""; +print ""; +print ""; -print " . "; +print " . "; -print"
    Start number"; -print ""; +print"\n
    ".$strings['tools']['start_num'].""; +print ""; print "
    Number of frames"; -print ""; +print "
    ".$strings['tools']['num_photos'].""; +print ""; print "
    Folder "; -display_folder_combo("folder", $users_folder, $current_folder, ""); +print "
    ".$strings['generic']['folder'].""; +display_folder_combo("folder", get_users_folder($database), $current_folder, "null"); print "
    Title"; -print "
    Author"; -print "
    Keywords"; -print "
    Location"; -display_combo("location", $users_location, 0, ", ", 0); -print "
    Storage Location"; +print "
    Storage Location"; display_storage_location_combo("storage_location_type", ""); -print " - - : - "; +print " - + : + "; print "
    Access"; -display_access_combo("access_rights", "t", ""); -print "
    High Resolution Original"; -display_hide_original_combo("hide_original", "t"); -print "
    Camera"; -display_combo("camera", $users_camera, 0, "", 0); -print "
    Film\n"; - display_combo("film", $users_film, 0, "", 0); - print "
    Film ISO Override\n"; -display_combo("iso_override", $iso_override, 0, "", 0); -print "
    Scanner\n"; -display_combo("scanner", $users_scanner, 0, "", 0); -print "
    Scan Parameters\n"; -display_combo("scan_resolution", $scan_resolution, 0, "", 0); -print "dpi  \n"; -display_combo("scan_bitdepth", $scan_bitdepth, 0, "", 0); -print "bits  \n"; -display_combo("scan_multiscan", $scan_multiscan, 0, "", 0); -print "passes  \n"; -print "
    Support\n"; -display_combo("support", $users_support, 0, "", 0); -print "
    Copyright Statement "; -print "\n"; + +display_photo_tech_form($database, FALSE, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + "", "", "", ""); + print "
    \n"; -$data = $shooting_data[data]; - +$data = $shooting_data['data']; print " 
    \n"; -print "
    For some frames multiple lenses match the focal length. Please specify the lens below:
    \n"; +print "
    ".$strings['tools']['select_lens']."
    \n"; print " 
    \n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -print "\n"; -for ($i=1; $i < $shooting_data[frames]; $i++) { +print "
    Frame NumberFocal LengthSelect a LensSelect a Flash
    \n"; +print "\n"; +print "\n"; +print "\n"; +print "\n"; + +for ($i=1; $i < $shooting_data['frames']; $i++) { $frame_data = $data[$i]; print ""; - print ""; - print ""; - print ""; + print ""; + print "\n"; - print ""; @@ -219,11 +163,11 @@ for ($i=1; $i < $shooting_data[frames]; $i++) { print "
    ".$strings['photo']['identifier']."".$strings['generic']['focal_length']."".$strings['generic']['lens']."".$strings['generic']['flash']."
    $i$frame_data[focal_length]\n"; - if ($frame_data[focal_length] != "") { + print "$i$frame_data[focal_length]\n"; + if ($frame_data['focal_length'] != "") { /* all lenses having that focal length */ $users_lens = pg_query($database, "select identifier, name, model, variation, s_min_aperture, s_max_aperture, s_min_focal_length, s_max_focal_length from view_lens @@ -191,6 +133,7 @@ for ($i=1; $i < $shooting_data[frames]; $i++) { /* best match */ $current_lens = pg_fetch_row(pg_query($database, "select identifier from view_lens where users = $po_user[id] + and $frame_data[focal_length] = to_number(s_min_focal_length, 9999) and $frame_data[focal_length] = to_number(s_max_focal_length, 9999)")); @@ -209,8 +152,9 @@ for ($i=1; $i < $shooting_data[frames]; $i++) { } print "\n"; - if ($frame_data[flash_mode] != "") { + print "\n"; + if ($frame_data['flash_mode'] != "") { + $users_flash = pg_query($database, "select identifier, name, model, variation from view_flash where users=$po_user[id]"); display_combo("flash$i", $users_flash, 0, "", 0); } print "
    \n"; print " 
    "; -print ""; +print $thm_elem['button.submit']; +print $thm_elem['button.clear']; print "
    \n"; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database); diff --git a/src/xml.generator.php b/src/xml.generator.php index 225aec8..6cffe57 100644 --- a/src/xml.generator.php +++ b/src/xml.generator.php @@ -5,7 +5,7 @@ // 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 +// the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, @@ -17,21 +17,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -include_once "include/vars.php"; include_once "include/config.php"; include_once "include/tools.php"; -include_once "$theme/theme.php"; +; include_once "include/common.php"; include_once "include/export.php"; include_once "include/site.php"; -$database = site_prolog(); - -if ($po_user['type'] < $user_type['user']) { - site_epilog($database); - header("location: login.php"); - exit(); -} +$database = site_prolog(PO_USER_TYPE_USER); $file_name_root = $_REQUEST['file_name']; $file_number_digits = $_REQUEST['file_number_digits']; @@ -75,17 +68,26 @@ $image_data = array ("folder" => $_REQUEST['folder'], "scan_bitdepth" => $_REQUEST['scan_bitdepth'], "scan_multiscan" => $_REQUEST['scan_multiscan'], "iso_override" => $_REQUEST['iso_override'], - "support" => $_REQUEST['support']); + "support" => $_REQUEST['support'], + "latitude" => $_REQUEST['latitude'], + "longitute" => $_REQUEST['longitude'], + "altitude" => $_REQUEST['altitude'], + "direction" => $_REQUEST['direction']); +if ($image_data['keywords'] != "") { + if (strstr($image_data['keywords'], ";")) { + $image_data['keywords'] = semi_string_to_array($image_data['keywords']); + } else { + $image_data['keywords'] = space_string_to_array($image_data['keywords']); + } + } -site_header($page_width, "Tools : XML Generator"); +site_header($strings['generic']['tools'], $strings['tools']['xml_template_generator']); site_navigator(10); -site_navigator_status("Users : My Tools : XML Template Generator : XML Template File", ""); +site_navigator_status("".$strings['generic']['users']." : ".$strings['generic']['my_tools']." : ".$strings['tools']['xml_template_generator'] ." : ".$strings['tools']['xml_template_file'], ""); -print " 
    "; display_navigator_box_top($tools_data['generator']['idx'], $tools_data, "100%"); -print " 
    "; print "
    "; print ""; @@ -141,11 +143,8 @@ print convert_xml2html(create_xml_bulkupload_footer()); print ""; print "
    "; -print " 
    "; -print "\"Back\"/\n"; -print " 
    "; +print $thm_elem['button.back']; display_navigator_box_bottom("100%"); -print " 
    "; site_footer($database); site_epilog($database);
    "; + + if ($type >= PO_USER_TYPE_CLIENT) { + print ""; + } + print "