Date: 10/17/05 (PHP Community) Keywords: php, database, security Im having some trouble writing a thumbnail view for a gallery script ive been working on. Now I have a nice little admin section which allows you to add pictures. It even makes the thumbnails for you. The problem occurs when I want to show these thumbnails. I would like to have a table maybe something like below gallery title
page < 1 | 2 | 3 | 4 | 5 | 6 > Now in my database I store the filename, its title its security level (either a 1 or a 0), and its group id. Now what I would like to have is a script that shows images as above when the group id is passed into it via the url (something like index.php?group=1). The problems I have are a) how do I get this to display all the images that are in that group in the format I want showing their title as shown. i.e how do I get it going 5 in a line for only 5 lines for that page b) how do I get it to display links to the other pages. So if there were 50 image in that group it would show page 1 and 2 at the bottom and if there were 51 images it would show 1, 2 and 3 at the bottom… c) how do I get it to only show that image if it is either not a secure image (so secure==0) or it is a secure image (so secure==1) but that person has a session var set to true... ok, I know I’m asking a lot here, and I may not be very clear but this is driving me up the wall as so far I only seem to be coming up with answers that are only dealing with part of the problem, not the whole thing. If anyone has any suggestions/ideas/code/snippets etc it would all be gladly received. I am not new to this, but I haven’t been doing it very long and am so not very good at it. Thanks Source: http://www.livejournal.com/community/php/356563.html
|