Author: nbelaevski
Date: 2009-03-05 19:33:46 -0500 (Thu, 05 Mar 2009)
New Revision: 12851
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/Functions.java
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userAlbumsPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userImagesPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
Log:
Latest changes for real-world demo
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-03-05
20:18:16 UTC (rev 12850)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-03-06
00:33:46 UTC (rev 12851)
@@ -28,7 +28,6 @@
public static final String ADD_ERROR_EVENT = "addErrorEvent";
public static final String UPLOAD_ROOT = "uploadRoot";
- public static final String FILE_SEPARATOR = "file.separator";
public static final String SLASH = "/";
public static final String DOT = ".";
public static final String JPG = "JPG";
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-03-05
20:18:16 UTC (rev 12850)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-03-06
00:33:46 UTC (rev 12851)
@@ -18,95 +18,95 @@
INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (27, 'Very very very very very very very long album name ',
'Long name test', true, 1, 2, '2008-12-18');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (1, 'korana',
'Viking/15/korana.jpg', 'korana', '2008-12-18', 15, 'Canon
S3', 1024, 1917.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (2, 'korana2',
'Viking/15/korana2.jpg', 'korana2', '2008-12-18', 15, 'Canon
S3', 1024, 949.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (3, 'Re4ka',
'Viking/15/Re4ka.jpg', 'Re4ka', '2008-12-18', 15, 'Canon
S3', 1024, 412.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (4, 'river10',
'Viking/15/river10.jpg', 'river10', '2008-12-18', 15, 'Canon
S3', 1024, 276.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (5, 'river11',
'Viking/15/river11.jpg', 'river11', '2008-12-18', 15, 'Canon
S3', 1024, 187.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (6, 'river12',
'Viking/15/river12.jpg', 'river12', '2008-12-18', 15, 'Canon
S3', 1024, 265.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (7, 'river13',
'Viking/15/river13.jpg', 'river13', '2008-12-18', 15, 'Canon
S3', 1024, 106.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (8, 'river2',
'Viking/15/river2.jpg', 'river2', '2008-12-18', 15, 'Canon
S3', 1024, 130.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (9, 'river3',
'Viking/15/river3.jpg', 'river3', '2008-12-18', 15, 'Canon
S3', 1024, 126.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (10, 'river4',
'Viking/15/river4.jpg', 'river4', '2008-12-18', 15, 'Canon
S3', 1024, 267.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (11, 'river5',
'Viking/15/river5.jpg', 'river5', '2008-12-18', 15, 'Canon
S3', 1024, 176.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (12, 'river6',
'Viking/15/river6.jpg', 'river6', '2008-12-18', 15, 'Canon
S3', 1024, 126.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (13, 'river7',
'Viking/15/river7.jpg', 'river7', '2008-12-18', 15, 'Canon
S3', 1024, 201.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (14, 'river8',
'Viking/15/river8.jpg', 'river8', '2008-12-18', 15, 'Canon
S3', 1024, 278.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (15, 'river9',
'Viking/15/river9.jpg', 'river9', '2008-12-18', 15, 'Canon
S3', 1024, 210.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (16, 'river_and_torrents',
'Viking/15/river_and_torrents.jpg', 'river_and_torrents',
'2008-12-18', 15, 'Canon S3', 1024, 161.000000, 768,
'2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (1, 'korana',
'Viking/15/korana.jpg', 'korana', '2008-12-18', 15, 'Canon
S3', 1024, 1917.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (2, 'korana2',
'Viking/15/korana2.jpg', 'korana2', '2008-12-18', 15, 'Canon
S3', 1024, 949.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (3, 'Re4ka',
'Viking/15/Re4ka.jpg', 'Re4ka', '2008-12-18', 15, 'Canon
S3', 1024, 412.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (4, 'river10',
'Viking/15/river10.jpg', 'river10', '2008-12-18', 15, 'Canon
S3', 1024, 276.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (5, 'river11',
'Viking/15/river11.jpg', 'river11', '2008-12-18', 15, 'Canon
S3', 1024, 187.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (6, 'river12',
'Viking/15/river12.jpg', 'river12', '2008-12-18', 15, 'Canon
S3', 1024, 265.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (7, 'river13',
'Viking/15/river13.jpg', 'river13', '2008-12-18', 15, 'Canon
S3', 1024, 106.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (8, 'river2',
'Viking/15/river2.jpg', 'river2', '2008-12-18', 15, 'Canon
S3', 1024, 130.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (9, 'river3',
'Viking/15/river3.jpg', 'river3', '2008-12-18', 15, 'Canon
S3', 1024, 126.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (10, 'river4',
'Viking/15/river4.jpg', 'river4', '2008-12-18', 15, 'Canon
S3', 1024, 267.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (11, 'river5',
'Viking/15/river5.jpg', 'river5', '2008-12-18', 15, 'Canon
S3', 1024, 176.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (12, 'river6',
'Viking/15/river6.jpg', 'river6', '2008-12-18', 15, 'Canon
S3', 1024, 126.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (13, 'river7',
'Viking/15/river7.jpg', 'river7', '2008-12-18', 15, 'Canon
S3', 1024, 201.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (14, 'river8',
'Viking/15/river8.jpg', 'river8', '2008-12-18', 15, 'Canon
S3', 1024, 278.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (15, 'river9',
'Viking/15/river9.jpg', 'river9', '2008-12-18', 15, 'Canon
S3', 1024, 210.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (16, 'river_and_torrents',
'Viking/15/river_and_torrents.jpg', 'river_and_torrents',
'2008-12-18', 15, 'Canon S3', 1024, 161.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (17, 'Sport1',
'amarkhel/20/sport.jpg', 'Where is the Batman?', '2008-12-18',
20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (18, 'Sport1',
'amarkhel/20/sport (1).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (19, 'Sport1',
'amarkhel/20/sport (2).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (20, 'Sport1',
'amarkhel/20/sport (3).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (21, 'Sport1',
'amarkhel/20/sport (4).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (22, 'Sport1',
'amarkhel/20/sport (5).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (23, 'Sport1',
'amarkhel/20/sport (6).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (24, 'Sport1',
'amarkhel/20/sport (7).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (25, 'Sport1',
'amarkhel/20/sport (8).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (26, 'Sport1',
'amarkhel/20/sport (9).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (27, 'Sport1',
'amarkhel/20/sport (10).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (28, 'Sport1',
'amarkhel/20/sport (11).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (29, 'Sport1',
'amarkhel/20/sport (12).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (30, 'Sport1',
'amarkhel/20/sport (13).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (31, 'Sport1',
'amarkhel/20/sport (14).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (32, 'Sport1',
'amarkhel/20/sport (15).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (33, 'Sport1',
'amarkhel/20/sport (16).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (34, 'Sport1',
'amarkhel/20/sport (17).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (17, 'Sport1',
'amarkhel/20/sport.jpg', 'Where is the Batman?', '2008-12-18',
20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (18, 'Sport1',
'amarkhel/20/sport (1).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (19, 'Sport1',
'amarkhel/20/sport (2).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (20, 'Sport1',
'amarkhel/20/sport (3).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (21, 'Sport1',
'amarkhel/20/sport (4).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (22, 'Sport1',
'amarkhel/20/sport (5).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (23, 'Sport1',
'amarkhel/20/sport (6).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (24, 'Sport1',
'amarkhel/20/sport (7).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (25, 'Sport1',
'amarkhel/20/sport (8).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (26, 'Sport1',
'amarkhel/20/sport (9).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (27, 'Sport1',
'amarkhel/20/sport (10).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (28, 'Sport1',
'amarkhel/20/sport (11).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (29, 'Sport1',
'amarkhel/20/sport (12).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (30, 'Sport1',
'amarkhel/20/sport (13).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (31, 'Sport1',
'amarkhel/20/sport (14).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (32, 'Sport1',
'amarkhel/20/sport (15).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (33, 'Sport1',
'amarkhel/20/sport (16).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (34, 'Sport1',
'amarkhel/20/sport (17).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 1280, 20, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (35, 'Fun',
'amarkhel/23/travel.jpg', 'Where is the Batman?', '2008-12-18',
23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (36, 'Fun',
'amarkhel/23/travel (1).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (37, 'Fun',
'amarkhel/23/travel (2).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (38, 'Fun',
'amarkhel/23/travel (3).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (39, 'Fun',
'amarkhel/23/travel (4).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (40, 'Fun',
'amarkhel/23/travel (5).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (41, 'Fun',
'amarkhel/23/travel (6).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (42, 'Fun',
'amarkhel/23/travel (7).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (43, 'Fun',
'amarkhel/23/travel (8).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (44, 'Fun',
'amarkhel/23/travel (9).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (45, 'Fun',
'amarkhel/23/travel (10).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (46, 'Fun',
'amarkhel/23/travel (11).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (47, 'Fun',
'amarkhel/23/travel (12).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (48, 'Fun',
'amarkhel/23/travel (13).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (49, 'Fun',
'amarkhel/23/travel (14).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (50, 'Fun',
'amarkhel/23/travel (15).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (51, 'Fun',
'amarkhel/23/travel (16).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (35, 'Fun',
'amarkhel/23/travel.jpg', 'Where is the Batman?', '2008-12-18',
23, 'Canon S3', 940, 20, 627, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (36, 'Fun',
'amarkhel/23/travel (1).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1200, 20, 800, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (37, 'Fun',
'amarkhel/23/travel (2).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1200, 20, 800, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (38, 'Fun',
'amarkhel/23/travel (3).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 747, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (39, 'Fun',
'amarkhel/23/travel (4).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (40, 'Fun',
'amarkhel/23/travel (5).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 1075, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (41, 'Fun',
'amarkhel/23/travel (6).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 760, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (42, 'Fun',
'amarkhel/23/travel (7).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 1023, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (43, 'Fun',
'amarkhel/23/travel (8).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1024, 20, 723, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (44, 'Fun',
'amarkhel/23/travel (9).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1028, 20, 967, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (45, 'Fun',
'amarkhel/23/travel (10).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 622, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (46, 'Fun',
'amarkhel/23/travel (11).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 625, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (47, 'Fun',
'amarkhel/23/travel (12).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 625, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (48, 'Fun',
'amarkhel/23/travel (13).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 625, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (49, 'Fun',
'amarkhel/23/travel (14).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 625, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (50, 'Fun',
'amarkhel/23/travel (15).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 1036, 20, 1036, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (51, 'Fun',
'amarkhel/23/travel (16).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 940, 20, 627, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (52, 'Fun',
'amarkhel/25/beach (1).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (53, 'Fun',
'amarkhel/25/beach (2).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (54, 'Fun',
'amarkhel/25/beach (3).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (55, 'Fun',
'amarkhel/25/beach (4).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (56, 'Fun',
'amarkhel/25/beach (5).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (57, 'Fun',
'amarkhel/25/beach (6).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (58, 'Fun',
'amarkhel/25/beach (7).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (59, 'Fun',
'amarkhel/25/beach (8).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (60, 'Fun',
'amarkhel/25/beach (9).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (61, 'Fun',
'amarkhel/25/beach (10).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (62, 'Fun',
'amarkhel/25/beach (11).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (63, 'Fun',
'amarkhel/25/beach (12).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (64, 'Fun',
'amarkhel/25/beach (13).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (65, 'Fun',
'amarkhel/25/beach (14).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (66, 'Fun',
'amarkhel/25/beach.jpg', 'Where is the Batman?', '2008-12-18',
25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (52, 'Fun',
'amarkhel/25/beach (1).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 850, 20, 600, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (53, 'Fun',
'amarkhel/25/beach (2).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 800, 20, 600, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (54, 'Fun',
'amarkhel/25/beach (3).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 768, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (55, 'Fun',
'amarkhel/25/beach (4).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1600, 20, 1200, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (56, 'Fun',
'amarkhel/25/beach (5).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1000, 20, 807, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (57, 'Fun',
'amarkhel/25/beach (6).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1024, 20, 608, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (58, 'Fun',
'amarkhel/25/beach (7).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 768, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (59, 'Fun',
'amarkhel/25/beach (8).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1024, 20, 668, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (60, 'Fun',
'amarkhel/25/beach (9).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 800, 20, 553, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (61, 'Fun',
'amarkhel/25/beach (10).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 603, 20, 900, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (62, 'Fun',
'amarkhel/25/beach (11).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1023, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (63, 'Fun',
'amarkhel/25/beach (12).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1024, 20, 732, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (64, 'Fun',
'amarkhel/25/beach (13).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 1024, 20, 660, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (65, 'Fun',
'amarkhel/25/beach (14).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 681, 20, 1025, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (66, 'Fun',
'amarkhel/25/beach.jpg', 'Where is the Batman?', '2008-12-18',
25, 'Canon S3', 940, 20, 625, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (67, 'Fun',
'Noname/26/flowers (1).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (68, 'Fun',
'Noname/26/flowers (2).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (69, 'Fun',
'Noname/26/flowers (3).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (70, 'Fun',
'Noname/26/flowers (4).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (71, 'Fun',
'Noname/26/flowers (5).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (72, 'Fun',
'Noname/26/flowers (6).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (73, 'Fun',
'Noname/26/flowers (7).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (74, 'Fun',
'Noname/26/flowers (8).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (75, 'Fun',
'Noname/26/flowers (9).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (76, 'Fun',
'Noname/26/flowers (10).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (77, 'Fun',
'Noname/26/flowers (11).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (78, 'Fun',
'Noname/26/flowers (12).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (79, 'Fun',
'Noname/26/flowers (13).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (80, 'Fun',
'Noname/26/flowers (14).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (81, 'Fun',
'Noname/26/flowers (15).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (82, 'Fun',
'Noname/26/flowers (16).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (83, 'Fun',
'Noname/26/flowers.jpg', 'Where is the Batman?', '2008-12-18',
26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (67, 'Fun',
'Noname/26/flowers (1).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (68, 'Fun',
'Noname/26/flowers (2).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 683, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (69, 'Fun',
'Noname/26/flowers (3).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (70, 'Fun',
'Noname/26/flowers (4).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 900, 20, 602, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (71, 'Fun',
'Noname/26/flowers (5).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 686, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (72, 'Fun',
'Noname/26/flowers (6).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 800, 20, 600, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (73, 'Fun',
'Noname/26/flowers (7).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1200, 20, 969, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (74, 'Fun',
'Noname/26/flowers (8).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 821, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (75, 'Fun',
'Noname/26/flowers (9).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (76, 'Fun',
'Noname/26/flowers (10).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 912, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (77, 'Fun',
'Noname/26/flowers (11).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 663, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (78, 'Fun',
'Noname/26/flowers (12).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (79, 'Fun',
'Noname/26/flowers (13).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 700, 20, 1052, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (80, 'Fun',
'Noname/26/flowers (14).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 906, 20, 1024, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (81, 'Fun',
'Noname/26/flowers (15).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1024, 20, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (82, 'Fun',
'Noname/26/flowers (16).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 1206, 20, 868, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, width, size, height, uploaded) VALUES (83, 'Fun',
'Noname/26/flowers.jpg', 'Where is the Batman?', '2008-12-18',
26, 'Canon S3', 582, 20, 800, '2008-12-01');
INSERT INTO metatags(metatag_id, tag) VALUES (1, 'Beach');
INSERT INTO metatags(metatag_id, tag) VALUES (2, 'Cool');
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-03-05
20:18:16 UTC (rev 12850)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-03-06
00:33:46 UTC (rev 12851)
@@ -40,216 +40,225 @@
@Scope(ScopeType.CONVERSATION)
public class FileManager {
-
private static final String _MEDIUM = "_medium";
private static final String _MINI = "_mini";
- private String uploadRoot;
-
- public String getUploadRoot() {
+
+ private File uploadRoot;
+ private String uploadRootPath;
+
+ public File getUploadRoot() {
return uploadRoot;
}
- public void setUploadRoot(String uploadRoot) {
- this.uploadRoot = uploadRoot;
+ public void setUploadRoot(String uploadRootPath) throws IOException {
+ if (uploadRootPath != null) {
+ this.uploadRoot = new File(uploadRootPath);
+ this.uploadRootPath = this.uploadRoot.getCanonicalPath()
+ + File.separator;
+ } else {
+ this.uploadRoot = null;
+ this.uploadRootPath = null;
+ }
}
-
- public FileManager(){
+
+ public FileManager() throws IOException {
FacesContext fc = FacesContext.getCurrentInstance();
- if(fc!=null){
- this.setUploadRoot(fc.getExternalContext().getInitParameter(Constants.UPLOAD_ROOT));
- }
+ if (fc != null) {
+ // TODO nick - ask Andrei if we can throw exception here
+ this.setUploadRoot(fc.getExternalContext().getInitParameter(
+ Constants.UPLOAD_ROOT));
+ }
}
-
- public String getFileSeparator() {
- return System.getProperty(Constants.FILE_SEPARATOR);
+
+ private File getFileByPath(String path) {
+ if (this.uploadRoot != null) {
+ File result = new File(this.uploadRoot, path);
+
+ try {
+ String resultCanonicalPath = result.getCanonicalPath();
+ if (!resultCanonicalPath.startsWith(this.uploadRootPath)) {
+ // TODO log error
+ result = null;
+ }
+
+ return result;
+ } catch (IOException e) {
+ // TODO: handle exception
+ result = null;
+ }
+
+ return result;
+ }
+
+ return null;
}
public boolean isDirectoryPresent(String directory) {
- String fullPath = getAbsolutePath(directory);
- File file = new File(fullPath);
+ File file = getFileByPath(directory);
return file.exists() && file.isDirectory();
}
-
+
public void deleteDirectory(String... directories) {
String directory = new String();
- for (String chunk: directories){
- directory += chunk + getFileSeparator();
+ for (String chunk : directories) {
+ directory += chunk + File.separator;
}
- String fullPath = getAbsolutePath(directory);
- File file = new File(fullPath);
- if(file.exists()){
- for(String f :file.list()){
- File temp = new File(fullPath+getFileSeparator()+f);
+ File file = getFileByPath(directory);
+ if (file.exists()) {
+ for (String f : file.list()) {
+ File temp = new File(file, f);
temp.delete();
}
file.delete();
}
}
-
- public String concat(String... directories){
- String directory = new String();
- for (String chunk: directories){
- directory += chunk + getFileSeparator();
- }
- return directory;
- }
-
- public String concatwithSlash(String... directories){
- String directory = new String();
- for (String chunk: directories){
- directory += chunk + Constants.SLASH;
- }
- return directory;
- }
- public boolean renameDirectory(String directoryOld, String directoryNew){
- String fullPath = getAbsolutePath(directoryOld);
- File fileOld = new File(fullPath);
- File fileNew = new File(getUploadRoot() + directoryNew);
+ public boolean renameDirectory(String directoryOld, String directoryNew) {
+ File fileOld = getFileByPath(directoryOld);
+ File fileNew = getFileByPath(directoryNew);
+
createDirectoryIfNotExist(directoryNew);
- if(fileNew.exists())
- if( fileNew.isDirectory() ){
+ if (fileNew.exists()) {
+ if (fileNew.isDirectory()) {
return false;
- }else{
+ } else {
fileNew.delete();
}
+ }
+
fileOld.renameTo(fileNew);
+
return true;
}
-
+
public void addDirectory(String... directories) {
String directory = new String();
- for (String chunk: directories){
+ for (String chunk : directories) {
directory += chunk;
}
- String fullPath = getAbsolutePath(directory);
- File file = new File(fullPath);
+ File file = getFileByPath(directory);
file.mkdirs();
}
public boolean addImage(String fileName, byte[] data) {
createDirectoryIfNotExist(fileName);
/*
- try {
-
- writeFileTodisk(data, fileName, 0, 0, "" );
- writeFileTodisk(data, fileName, 100, 100, _MINI );
- writeFileTodisk(data, fileName, 500, 500, _MEDIUM );
-
- } catch (IOException e) {
- return false;
- }
- */
+ * try {
+ *
+ * writeFileTodisk(data, fileName, 0, 0, "" ); writeFileTodisk(data,
+ * fileName, 100, 100, _MINI ); writeFileTodisk(data, fileName, 500,
+ * 500, _MEDIUM );
+ *
+ * } catch (IOException e) { return false; }
+ */
return true;
}
-
- private void writeFileTodisk(byte[] data, String fileName, int width, int height, String
format) throws IOException{
+
+ private void writeFileTodisk(byte[] data, String fileName, int width,
+ int height, String format) throws IOException {
InputStream inputStream = new ByteArrayInputStream(data);
BufferedImage bsrc = ImageIO.read(inputStream);
- if(width == 0){
+ if (width == 0) {
String dest = getUploadRoot() + fileName;
ImageIO.write(bsrc, Constants.JPG, new File(dest));
return;
}
BufferedImage bdest = new ImageUtils(bsrc).resizeImage(width, height);
/*
- BufferedImage bdest = new BufferedImage(width, height,
- BufferedImage.TYPE_INT_RGB);
- Graphics2D g = bdest.createGraphics();
- AffineTransform at = AffineTransform.getScaleInstance((double) width
- / bsrc.getWidth(), (double) height / bsrc.getHeight());
- Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key,
Object>();
- hints.put(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
- g.addRenderingHints(hints);
- g.drawRenderedImage(bsrc, at);
- */
+ * BufferedImage bdest = new BufferedImage(width, height,
+ * BufferedImage.TYPE_INT_RGB); Graphics2D g = bdest.createGraphics();
+ * AffineTransform at = AffineTransform.getScaleInstance((double) width
+ * / bsrc.getWidth(), (double) height / bsrc.getHeight());
+ * Map<RenderingHints.Key, Object> hints = new
+ * HashMap<RenderingHints.Key, Object>();
+ * hints.put(RenderingHints.KEY_INTERPOLATION,
+ * RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ * g.addRenderingHints(hints); g.drawRenderedImage(bsrc, at);
+ */
String dest = getUploadRoot() + transformPath(fileName, format);
-
+
ImageIO.write(bdest, Constants.JPG, new File(dest));
inputStream.close();
}
-
- public String transformPath(String target, String substitute){
+
+ public String transformPath(String target, String substitute) {
String begin = target.substring(0, target.lastIndexOf(Constants.DOT));
String end = target.substring(target.lastIndexOf(Constants.DOT));
return begin + substitute + end;
}
-
+
public void deleteImage(String fileName) {
- String fullPath = getAbsolutePath(fileName);
- deleteImage(new File(fullPath));
- deleteImage(new File(transformPath(fullPath, _MINI)));
- deleteImage(new File(transformPath(fullPath, _MEDIUM)));
+ deleteImage(getFileByPath(fileName));
+ deleteImage(getFileByPath(transformPath(fileName, _MINI)));
+ deleteImage(getFileByPath(transformPath(fileName, _MEDIUM)));
}
- private void deleteImage(File file){
- if(file.exists()){
+ private void deleteImage(File file) {
+ if (file.exists()) {
file.delete();
}
}
-
- public String getPathOfImage(String path){
+
+ public String getPathOfImage(String path) {
int i = path.lastIndexOf(Constants.SLASH);
return path.substring(i);
}
-
+
public void renameImage(String fileNameOld, String fileNameNew) {
createDirectoryIfNotExist(fileNameNew);
- String fullPath = getAbsolutePath(fileNameOld);
- renameImage(new File(getAbsolutePath(fileNameNew)), new File(fullPath));
- renameImage(new File(getAbsolutePath(transformPath(fileNameNew, _MINI))), new
File(transformPath(fullPath, _MINI)));
- renameImage(new File(getAbsolutePath(transformPath(fileNameNew, _MEDIUM))), new
File(transformPath(fullPath, _MEDIUM)));
+ renameImage(getFileByPath(fileNameNew), getFileByPath(fileNameOld));
+
+ renameImage(getFileByPath(transformPath(fileNameNew, _MINI)),
+ getFileByPath(transformPath(fileNameOld, _MINI)));
+
+ renameImage(getFileByPath(transformPath(fileNameNew, _MEDIUM)),
+ getFileByPath(transformPath(fileNameOld, _MEDIUM)));
}
-
- private void renameImage(File fileNew, File fileOld){
- if(fileNew.exists()){
+
+ private void renameImage(File fileNew, File fileOld) {
+ if (fileNew.exists()) {
fileNew.delete();
}
fileOld.renameTo(fileNew);
}
private void createDirectoryIfNotExist(String fileNameNew) {
- int lastIndexOf = fileNameNew.lastIndexOf(getFileSeparator());
- if(lastIndexOf > 0){
+ int lastIndexOf = fileNameNew.lastIndexOf(File.separatorChar);
+ if (lastIndexOf > 0) {
String directory = fileNameNew.substring(0, lastIndexOf);
- File file = new File(getUploadRoot()+directory);
- if(!file.exists()){
+ File file = getFileByPath(directory);
+ if (!file.exists()) {
file.mkdirs();
}
}
}
public boolean isImagePresent(String fileName) {
- String fullPath = getAbsolutePath(fileName);
- File file = new File(fullPath);
+ File file = getFileByPath(fileName);
return file.exists() && !file.isDirectory();
}
-
- public File getImage(String fileName){
- if(isImagePresent(fileName)){
- return new File(getAbsolutePath(fileName));
+
+ public File getImage(String fileName) {
+ if (isImagePresent(fileName)) {
+ return getFileByPath(fileName);
}
return null;
}
- private String getAbsolutePath(String fileName) {
- return getUploadRoot() + fileName;
- }
-
- public String transformToServerPath(String filename){
+ public String transformToServerPath(String filename) {
String[] res = filename.split(Constants.SLASH);
StringBuilder sb = new StringBuilder();
sb.append(res[0]);
- for(int i = 1; i < res.length; i++){
- sb.append(this.getFileSeparator() + res[i]);
+ for (int i = 1; i < res.length; i++) {
+ sb.append(File.separator + res[i]);
}
String string = sb.toString();
return string;
}
public void deleteDirectories(List<String> directoriesToDelete) {
- for(String directory:directoriesToDelete){
+ for (String directory : directoriesToDelete) {
deleteDirectory(directory);
- }
+ }
}
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-03-05
20:18:16 UTC (rev 12850)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-03-06
00:33:46 UTC (rev 12851)
@@ -29,6 +29,7 @@
import java.net.URLDecoder;
import javax.persistence.EntityManager;
+import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -41,6 +42,7 @@
public class PictureServlet extends javax.servlet.http.HttpServlet {
+ private String uploadRoot;
public static final long serialVersionUID = 596009789004L;
@@ -69,8 +71,7 @@
return null;
}
FileManager fileManager = new FileManager();
- String uploadRoot =
request.getSession().getServletContext().getInitParameter(Constants.UPLOAD_ROOT);
- fileManager.setUploadRoot(uploadRoot);
+ fileManager.setUploadRoot(this.uploadRoot);
File file = fileManager.getImage(fileName);
InputStream paintData = null;
byte[] data = new byte[(int) file.length() - 1];
@@ -137,4 +138,18 @@
response.sendRedirect(contextPath + Constants.ERROR_PAGE);
return;
}
+
+ @Override
+ public void init(ServletConfig config) throws ServletException {
+ super.init(config);
+
+ this.uploadRoot = config.getServletContext().getInitParameter(Constants.UPLOAD_ROOT);
+ }
+
+ @Override
+ public void destroy() {
+ super.destroy();
+
+ this.uploadRoot = null;
+ }
}
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/Functions.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/Functions.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/Functions.java 2009-03-06
00:33:46 UTC (rev 12851)
@@ -0,0 +1,37 @@
+/**
+ *
+ */
+package org.richfaces.realworld.util;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class Functions {
+
+ private Functions() {
+ }
+
+ public static String rectangle(int width, int height, int maxSize) {
+ long newWidth;
+ long newHeight;
+
+ if (width > height) {
+ newWidth = maxSize;
+ newHeight = Math.round((((double)height) / width) * maxSize);
+ } else {
+ newHeight = maxSize;
+ newWidth = Math.round((((double)width) / height) * maxSize);
+ }
+
+ if (newHeight <= 0) {
+ newHeight = 1;
+ }
+
+ if (newWidth <= 0) {
+ newWidth = 1;
+ }
+
+ return "width: " + newWidth + "px; height: " + newHeight +
"px;";
+ }
+}
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml 2009-03-05
20:18:16 UTC (rev 12850)
+++
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml 2009-03-06
00:33:46 UTC (rev 12851)
@@ -24,4 +24,9 @@
<tag-name>linkPanel</tag-name>
<source>templates/linkPanel.xhtml</source>
</tag>
+ <function>
+ <function-name>rectangle</function-name>
+ <function-class>org.richfaces.realworld.util.Functions</function-class>
+ <function-signature>java.lang.String rectangle(int, int,
int)</function-signature>
+ </function>
</facelet-taglib>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userAlbumsPreview.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userImagesPreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)