another gallery script

    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



    image 1 image 2 image 3 image 4 image 5
    image 6 image 7 image 8 image 9 image 10
    image 11 image 12 image 13 image 14 image 15
    image 16 image 17 image 18 image 19 image 20
    image 21 image 22 image 23 image 24 image 25


    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

« Working with parameters in... || Problem with fopen() and a URL »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home