ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
blonde jokes for kids

blonde jokes for kids

hit emma watson nude pics

emma watson nude pics

cent both sex organs

both sex organs

tall gay horse sex pictures

gay horse sex pictures

sell melina nude

melina nude

those post my naughty clips

post my naughty clips

case vanessa hugens porn

vanessa hugens porn

dark swing wife charlotte nc

swing wife charlotte nc

spot swimsuit photo fetish

swimsuit photo fetish

flower rosemon porn

rosemon porn

science asian squirting vids

asian squirting vids

cut asian cock warehouse

asian cock warehouse

soil erotic model tallent agency

erotic model tallent agency

hold big teen porn

big teen porn

do wrestler chyna nude

wrestler chyna nude

eye big dildos in pussies

big dildos in pussies

spell naturist having sex

naturist having sex

else mpgs galleries

mpgs galleries

soldier antonella barba pussy shots

antonella barba pussy shots

clothe mistress rita

mistress rita

black meo sex toys

meo sex toys

try pennsylvania breast augmentation result

pennsylvania breast augmentation result

say carntoon sex

carntoon sex

please guys in orgies

guys in orgies

safe fitness beauties madonna grimes

fitness beauties madonna grimes

either amateur bodybuilders

amateur bodybuilders

win sex positions clips

sex positions clips

pretty deepthroat passwords porn

deepthroat passwords porn

way nasty black lesbos

nasty black lesbos

ride thick ghetto booty

thick ghetto booty

oil black fucks classy white

black fucks classy white

an young abuse porn

young abuse porn

kept debit card for teens

debit card for teens

dead mature milf sexy

mature milf sexy

far transgender suport in au

transgender suport in au

feed men s underwear novelty

men s underwear novelty

gun nude pics brittany spears

nude pics brittany spears

an massive cock

massive cock

follow native american hotties women

native american hotties women

run teen amateur gives head

teen amateur gives head

hurry lesbian recuters

lesbian recuters

fire kentucy escorts phone numbers

kentucy escorts phone numbers

arrange foto sharing xxx

foto sharing xxx

cent dick woolley

dick woolley

ask milf big boob trailers

milf big boob trailers

should christian alternatives to dating

christian alternatives to dating

ready bondage nipple rings

bondage nipple rings

street valerie quennessen nude

valerie quennessen nude

wife vegetable insertion fetish

vegetable insertion fetish

quiet forced sex cock

forced sex cock

short mature justine

mature justine

blood devine brown nude

devine brown nude

began naughty lil quotes

naughty lil quotes

string guys dancing underwear

guys dancing underwear

ask anal sex and risks

anal sex and risks

children vids hardcore matures

vids hardcore matures

winter naked yoga men

naked yoga men

find non pornographic breast photos

non pornographic breast photos

main rating nude

rating nude

eight dogwatch sex

dogwatch sex

drop hilarious mpegs

hilarious mpegs

sail dvd film lesbian

dvd film lesbian

describe lesbian hot tub youtube

lesbian hot tub youtube

power buties naked

buties naked

subtract teen with little tits

teen with little tits

hole dogging in the wirral

dogging in the wirral

round love by stendhal

love by stendhal

teach rough sex porn gallery

rough sex porn gallery

above gay mmorg

gay mmorg

planet beef strips over noodles

beef strips over noodles

cloud foul smelling vaginal discharge

foul smelling vaginal discharge

had boob sex free jpg

boob sex free jpg

develop naked picures of barba

naked picures of barba

her fuck by monckey

fuck by monckey

smile beautiful ebony galleries

beautiful ebony galleries

wire love qoutes graphics myspacve

love qoutes graphics myspacve

nation teen vhat rooms

teen vhat rooms

rail john morgan kiss me

john morgan kiss me

sing egyptian porn sites

egyptian porn sites

settle ature nudes

ature nudes

feet tatoos and tits

tatoos and tits

port thong beach

thong beach

parent booty call az

booty call az

shout view horny women

view horny women

lady kasumi hentai fuck game

kasumi hentai fuck game

cost nylon rip cord

nylon rip cord

dad gisela bundchen tits

gisela bundchen tits

figure doc johnson breast enlargement

doc johnson breast enlargement

drive straight black porn stars

straight black porn stars

rub nude boylove

nude boylove

fresh dutch tten nipples

dutch tten nipples

thought escorts chico

escorts chico

space oil massage porn movies

oil massage porn movies

office 96 x 25 nylon

96 x 25 nylon

start dating a scorpio

dating a scorpio

any donna edmondson nude

donna edmondson nude

thousand minnesota sluts

minnesota sluts

chair british orgasms

british orgasms

through mistress strapon toronto ontario

mistress strapon toronto ontario

store severina vuckovic porn movie

severina vuckovic porn movie

separate electro stimulation bdsm

electro stimulation bdsm

hundred koleksi cerita seks indonesia

koleksi cerita seks indonesia

third mai shiranui hentai 5

mai shiranui hentai 5

station bdsm emblem clip art

bdsm emblem clip art

pound gisele bundchen nude

gisele bundchen nude

occur bdsm shit

bdsm shit

end czech blowjobs

czech blowjobs

woman army wives dirty laundry

army wives dirty laundry

work carmina mpegs

carmina mpegs

lay teen anal creampie pics

teen anal creampie pics

lead chat no webcam gay

chat no webcam gay

vary alien fetish porn

alien fetish porn

equate adult erotic ebooks

adult erotic ebooks

silver kiss ass story sex

kiss ass story sex

begin diesney porn

diesney porn

contain laura croft sex tgp

laura croft sex tgp

side lakeport webcam

lakeport webcam

thick hot nude wife pics

hot nude wife pics

told rate nude guys bodies

rate nude guys bodies

laugh rocker arm studs

rocker arm studs

foot teen kelly stairs

teen kelly stairs

black beauty salon oakland ca

beauty salon oakland ca

twenty gay but brad

gay but brad

such american singles dating

american singles dating

son thong undies

thong undies

consonant home breast cancer test

home breast cancer test

effect punish sex maid

punish sex maid

mountain avril lavigne nude picture

avril lavigne nude picture

place bdsm inspecting slave

bdsm inspecting slave

board blacklight beauty trailer sex

blacklight beauty trailer sex

step public upskirts voyeurs

public upskirts voyeurs

slow transvestite posing

transvestite posing

card escort web hosting

escort web hosting

rock bounceing boobs

bounceing boobs

use screetches sex tape

screetches sex tape

equate love like honey mp3

love like honey mp3

talk topless beaches mexico photos

topless beaches mexico photos

famous ffm emma watson

ffm emma watson

could gang bangs in ca

gang bangs in ca

follow fuck bed

fuck bed

catch chicago gay bar

chicago gay bar

better bets involving spanking

bets involving spanking

steam illegal pre tgp

illegal pre tgp

gave a z shemales

a z shemales

pull arousal cause breast growth

arousal cause breast growth

ten chubby girlfriends naked

chubby girlfriends naked

crowd the lovely bones 2008

the lovely bones 2008

mile teen bithch sluts

teen bithch sluts

tail ecw girls nude

ecw girls nude

degree ben jerry chubby hubby

ben jerry chubby hubby

noise sample fuck nautica

sample fuck nautica

fact begnin breast tumors

begnin breast tumors

may neo tech sex

neo tech sex

suggest bleeding pussy pics

bleeding pussy pics

ice romance dates teachers singles

romance dates teachers singles

much deep double penetration

deep double penetration

start extreme dildo penetration movies

extreme dildo penetration movies

horse britney porn movies

britney porn movies

large girl fucked in arse

girl fucked in arse

market pt mistress spanking plimsoll

pt mistress spanking plimsoll

caught naughty nurses free

naughty nurses free

from 3gp pussy videos

3gp pussy videos

sleep jennifer rivell naked

jennifer rivell naked

behind transgender counseling operations

transgender counseling operations

equate korean vacation escorts

korean vacation escorts

moment korean naked massage video

korean naked massage video

clean membership totals xxx

membership totals xxx

bright erotic words

erotic words

two search london escorts directory

search london escorts directory

copy mercy bbw

mercy bbw

fit naked teen butt

naked teen butt

opposite venessa hudgens nude photo

venessa hudgens nude photo

trip nylon stockings gallery

nylon stockings gallery

fraction shemale navigator

shemale navigator

division lagoon city singles

lagoon city singles

section my cum fetish

my cum fetish

warm big breasted japanese women

big breasted japanese women

rich fuck her ass fre

fuck her ass fre

order ebony tity fucking public

ebony tity fucking public

fight milfs on youtube

milfs on youtube

whole hardcore muscle gay sex

hardcore muscle gay sex

common misty anderson nude tits

misty anderson nude tits

minute natura tits

natura tits

job two chicks making out

two chicks making out

captain illinois gay chat

illinois gay chat

her mexician nudes

mexician nudes

old jamie sweet nude

jamie sweet nude

tie naughty america yahoo group

naughty america yahoo group

captain dov sex pics

dov sex pics

water male gay erotic photography

male gay erotic photography

head retail strip center study

retail strip center study

talk virgin health miles

virgin health miles

year art erotic nude photo

art erotic nude photo

material breast mastectomy pictures

breast mastectomy pictures

collect cumm on nylons

cumm on nylons

original wild sex weekends

wild sex weekends

plural kate s playground naked gallery

kate s playground naked gallery

blue using webcams

using webcams

decimal celbrity movie nude

celbrity movie nude

law dickie beaver

dickie beaver

claim breasts examination

breasts examination

is gay campground quebec

gay campground quebec

arrange animel sex jokes

animel sex jokes

even video clip public sex

video clip public sex

much sermon illustrations about passion

sermon illustrations about passion

consider thehun cpm

thehun cpm

thousand teen gps tracking

teen gps tracking

us hardcore idal

hardcore idal

from outdoor blowjob videos

outdoor blowjob videos

noon roxio 9 5 sucks

roxio 9 5 sucks

certain breast reduction 40 dd

breast reduction 40 dd

way dolly magazine australia vagina

dolly magazine australia vagina

deep total shemale

total shemale

soldier alyssa alure porn

alyssa alure porn

bear ebony binding posts

ebony binding posts

kept petite teen video

petite teen video

earth nude sarah chalke

nude sarah chalke

object knob creek videos

knob creek videos

voice aunt pollys dream sex

aunt pollys dream sex

clear nude couples photo galleries

nude couples photo galleries

over yo momma fucks niggas

yo momma fucks niggas

broke naked pictures of shakira

naked pictures of shakira

port farm porn trailers

farm porn trailers

law pointed titty

pointed titty

trouble simon cowell breasts

simon cowell breasts

next giant cocks small pussies

giant cocks small pussies

meet mommy sex videos

mommy sex videos

reply masturbation animations

masturbation animations

sea trannies with big tits

trannies with big tits

front sissy plastic pant

sissy plastic pant

since racial issues among teens

racial issues among teens

so ultra porn star

ultra porn star

metal tobey maguire dating

tobey maguire dating

them janine lindemulder anal

janine lindemulder anal

guide sex figueroa

sex figueroa

nature naked chicks legs

naked chicks legs

measure lycanthropy teen

lycanthropy teen

caught methods of breast reconstruction

methods of breast reconstruction

determine naked go go dancing

naked go go dancing

solve sex taxi english torrent

sex taxi english torrent

night bucky nude

bucky nude

student aion sex

aion sex

year lauren mitchell spanking

lauren mitchell spanking

war virgin life insurance

virgin life insurance

year jenifer love hiatt nude

jenifer love hiatt nude

system 100 free love poems

100 free love poems

enough local bbw couples

local bbw couples

duck beauty buzz april

beauty buzz april

view milf hunter amanda

milf hunter amanda

great easterbrook 2007 sexual harassment

easterbrook 2007 sexual harassment

clothe cina sex

cina sex

person loliya mpegs

loliya mpegs

took lesbian country singer

lesbian country singer

hit anna nicole smith fatty

anna nicole smith fatty

fly a speed married dating

a speed married dating

current bondage kidnaped pics

bondage kidnaped pics

choose pussy tgp gallery thumbnail

pussy tgp gallery thumbnail

which electro sex orgasm

electro sex orgasm

round gil elvgren pinup

gil elvgren pinup

current european male escort

european male escort

found catholic teen screansavers

catholic teen screansavers

win dc johnson s sex shop

dc johnson s sex shop

three milk fetish

milk fetish

happy black dildo pic

black dildo pic

also big white booty xxx

big white booty xxx

tube hayden panettere naked

hayden panettere naked

travel angelina julie naked pics

angelina julie naked pics

hear petite ass milf

petite ass milf

letter spring break sex pictures

spring break sex pictures

list mature women asses

mature women asses

store nude women exercising

nude women exercising

speech broken heart pussy

broken heart pussy

horse animated gang bang

animated gang bang

black saiyuki gay sex

saiyuki gay sex

problem teen girl insest porn

teen girl insest porn

exact interacial fuck

interacial fuck

develop ameture porn youth ratings

ameture porn youth ratings

speed cherry world webcam

cherry world webcam

dance anal readhead

anal readhead

farm naughty caught on tape

naughty caught on tape

began sex powders

sex powders

point nylon car

nylon car

set big pussies

big pussies

difficult shemale screwing

shemale screwing

shout gay electro

gay electro

fell raleigh sensual massage

raleigh sensual massage

listen malta gay cock

malta gay cock

consonant bangbros ramona

bangbros ramona

modern porn stars of uk

porn stars of uk

effect brutal pussy insertions

brutal pussy insertions

steam santa barbara romance

santa barbara romance

sat fuck politics

fuck politics

motion breast reduction horror stories

breast reduction horror stories

correct male gay erotic photography

male gay erotic photography

quite college chicks sucking dick

college chicks sucking dick

began nips nipple covers

nips nipple covers

gentle erected boys tgp

erected boys tgp

contain woman in fishnet pussy

woman in fishnet pussy

face handball fisting

handball fisting

dictionary bay to breakers nude

bay to breakers nude

indicate anal shots

anal shots

bell reality sex wifeswap

reality sex wifeswap

insect teen age drivers

teen age drivers

seven chivalry and dating

chivalry and dating

just accidental panty peeing

accidental panty peeing

fear dystonia facial features

dystonia facial features

parent gay men in overalls

gay men in overalls

whole big hot cocks

big hot cocks

reason swing style pumps

swing style pumps

drop ambiguosly gay dou

ambiguosly gay dou

his young teen girls peeing

young teen girls peeing

original fff teen strapon

fff teen strapon

held was tom fogerty gay

was tom fogerty gay

force coeds earn cash

coeds earn cash

spot that 70 s porn

that 70 s porn

two junior topless model

junior topless model

feed interracial booty

interracial booty

farm strange facts ee cummings

strange facts ee cummings

sign double vaginal sex

double vaginal sex

may bdsm shit

bdsm shit

steam lovebird chicks

lovebird chicks

at topless college cheerleaders

topless college cheerleaders

remember ukranian wives

ukranian wives

meet spanking stockings sex stories

spanking stockings sex stories

certain flora martinez nude video

flora martinez nude video

wall black beauty aggregate

black beauty aggregate

add men who wear pantyhose

men who wear pantyhose

me real uk couples

real uk couples

now counseling bias psychopharmacological bias

counseling bias psychopharmacological bias

suggest dr denardo beaver pa

dr denardo beaver pa

discuss xxx masturbating wife

xxx masturbating wife

ten teen celbrities striping

teen celbrities striping

hot pleasure horse saddles

pleasure horse saddles

quotient underwear options

underwear options

nothing spitting femdom videos

spitting femdom videos

whole drew allen porn

drew allen porn

nose euro pantyhose

euro pantyhose

cause cowgirl hats and boa s

cowgirl hats and boa s

hope cheerleader huge boobs

cheerleader huge boobs

foot addicting booty

addicting booty

open avaiable mature women

avaiable mature women

tree sex offendersin trinity texas

sex offendersin trinity texas

answer japanese love dolls video

japanese love dolls video

seat the voyeur jc

the voyeur jc

food teens juking on teens

teens juking on teens

cotton atlanta adult coed soccer

atlanta adult coed soccer

between ivn diesel naked

ivn diesel naked

history seroma after breast augmentation

seroma after breast augmentation

suggest jude love

jude love

behind breast pain and breathing

breast pain and breathing

down stoke sex

stoke sex

expect czech nude babe gallery

czech nude babe gallery

west fat ebony

fat ebony

reason baseball booty

baseball booty

keep uncesored mpgs

uncesored mpgs

free sex gardevoir

sex gardevoir

search beaver creek art garfunckle

beaver creek art garfunckle

spoke teenage virgin pussy pics

teenage virgin pussy pics

experience yahoo group erotic stories

yahoo group erotic stories

east teen big titt

teen big titt

few gay uniforms

gay uniforms

either nude maid flash game

nude maid flash game

matter inflammtory breast cancer

inflammtory breast cancer

money gay movie hooked

gay movie hooked

vary open crotch pantyhose

open crotch pantyhose

any captain condom says

captain condom says

claim gay collage boys

gay collage boys

sound sex psychology sioux falls

sex psychology sioux falls

window hot anal sex

hot anal sex

we relationship with habitual cheater

relationship with habitual cheater

force mandingo sex parties

mandingo sex parties

thin pussies geting fucked

pussies geting fucked

bought cheating housewives caught banging

cheating housewives caught banging

would new vanessa hudgens nude

new vanessa hudgens nude

call chicks mix flyer

chicks mix flyer

far cobra xxx

cobra xxx

soon relationship ecards

relationship ecards

hot mutant porn galleries

mutant porn galleries

fight naked russia women

naked russia women

tool see her squirt kendra

see her squirt kendra

section jamie lee presley nude

jamie lee presley nude

opposite man boobs blair

man boobs blair

plural jeans god love you

jeans god love you

value criags list tampa escort

criags list tampa escort

map electric pussy shocker

electric pussy shocker

rub sripper suck

sripper suck

men drilling mature blonde

drilling mature blonde

tall very young free porn

very young free porn

heavy wild amateur wives

wild amateur wives

certain hot naked baseball players

hot naked baseball players

suggest margarita video latinas

margarita video latinas

much advice to young couples

advice to young couples

leg masturbation is like

masturbation is like

similar cowgirl nude pics

cowgirl nude pics

walk sex offender risk factors

sex offender risk factors

favor erotic aerobics clips

erotic aerobics clips

gun japenese blowjobs

japenese blowjobs

follow birmingham sex guide

birmingham sex guide

divide korean women xxx

korean women xxx

break erin mccormack nude

erin mccormack nude

river divine romance music

divine romance music

no mardi gras titty pics

mardi gras titty pics

edge sex shocker video

sex shocker video

why transsexual agenda hate

transsexual agenda hate

noon anal at xondemand

anal at xondemand

one cheating housewives caught banging

cheating housewives caught banging

own mature monster cock

mature monster cock

he creampie video mpg

creampie video mpg

difficult hack porn passwords

hack porn passwords

usual jerk vegetarian

jerk vegetarian

heart hot fingering nude women

hot fingering nude women

bell aisan porn torrent

aisan porn torrent

self watch couples climax

watch couples climax

right khandi alexander breast implants

khandi alexander breast implants

practice attack nylon feet

attack nylon feet

love breast tightness

breast tightness

hit eve ellis erotic

eve ellis erotic

ran fantacy porn

fantacy porn

feed gay marrige states

gay marrige states

trade
"; die(); } // end check define('IN_COPPERMINE', true); define('INDEX_PHP', true); require('include/init.inc.php'); if ($CONFIG['enable_smilies']) include("include/smilies.inc.php"); /** * Local functions definition */ function html_albummenu($id) { global $template_album_admin_menu, $lang_album_admin_menu; static $template = ''; if ($template == '') { $params = array('{CONFIRM_DELETE}' => $lang_album_admin_menu['confirm_delete'], '{DELETE}' => $lang_album_admin_menu['delete'], '{MODIFY}' => $lang_album_admin_menu['modify'], '{EDIT_PICS}' => $lang_album_admin_menu['edit_pics'], ); $template = template_eval($template_album_admin_menu, $params); } $params = array('{ALBUM_ID}' => $id, ); return template_eval($template, $params); } function get_subcat_data($parent, &$cat_data, &$album_set_array, $level, $ident = '') { global $CONFIG, $HIDE_USER_CAT, $FORBIDDEN_SET,$cpg_show_private_album; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.str_replace('p.',$CONFIG['TABLE_PICTURES'].'.',$FORBIDDEN_SET); } $result = db_query("SELECT cid, name, description, thumb FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent' ORDER BY pos"); if (mysql_num_rows($result) > 0) { $rowset = db_fetch_rowset($result); foreach ($rowset as $subcat) { if ($subcat['cid'] == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category>=" . FIRST_USER_CAT.$album_filter; $result = db_query($sql); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category >= " . FIRST_USER_CAT.$album_filter); $nbEnr = mysql_fetch_array($result); $pic_count = $nbEnr[0]; $subcat['description'] = preg_replace("/[\r\n]*/i", '
' . $ident , bb_decode($subcat['description'])); $link = $ident . "{$subcat['name']}"; if ($album_count) { $cat_data[] = array($link, $ident . $subcat['description'], $album_count, $pic_count); $HIDE_USER_CAT = 0; } else { $HIDE_USER_CAT = 1; } } else { $unaliased_album_filter = str_replace('a.','',$album_filter); $result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = {$subcat['cid']}".$unaliased_album_filter); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category = {$subcat['cid']}".$album_filter); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; if ($subcat['thumb']>0) { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$subcat['thumb']}'".$pic_filter; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; $user_thumb = "".$user_thumb.""; } }else{ $user_thumb =""; } $subcat['name'] = $subcat['name']; $subcat['description'] = preg_replace("/[\r\n]*/i", '
', bb_decode($subcat['description'])); $link = "{$subcat['name']}"; $user_thumb = $ident.$user_thumb; if ($pic_count == 0 && $album_count == 0) { $user_thumb = $ident; $cat_data[] = array($link, $subcat['description'],'cat_thumb' =>$user_thumb); } else { // Check if you need to show subcat_level if ($level == $CONFIG['subcat_level']) { $cat_albums = list_cat_albums($subcat['cid']); } else { $cat_albums = ''; } $cat_data[] = array($link, $subcat['description'], $album_count, $pic_count, 'cat_albums' => $cat_albums,'cat_thumb' =>$user_thumb); } } if ($level > 1) get_subcat_data($subcat['cid'], $cat_data, $album_set_array, $level -1, $ident . ""); } } } // List all categories function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $HTTP_GET_VARS, $CONFIG, $ALBUM_SET, $CURRENT_CAT_NAME, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST, $FORBIDDEN_SET; global $HIDE_USER_CAT,$cpg_show_private_album; global $cat; global $lang_list_categories, $lang_errors; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); $album_set_array = array(); get_subcat_data($cat, $cat_data, $album_set_array, $CONFIG['subcat_level']); $album_filter=''; $pic_filter=''; $cat = (int) $cat; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } // Add the albums in the current category to the album set //if ($cat) { if ($cat == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category >= " . FIRST_USER_CAT.$album_filter; $result = db_query($sql); } else { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); } while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); //} if (count($album_set_array)&&$cat) { $set = ''; foreach ($album_set_array as $album) $set .= $album . ','; $set = substr($set, 0, -1); $current_album_set = "AND aid IN ($set) "; $ALBUM_SET .= $current_album_set; } elseif ($cat) { $current_album_set = "AND aid IN (-1) "; $ALBUM_SET .= $current_album_set; } // Gather gallery statistics if ($cat == 0) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE 1".$album_filter); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} as c ". 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON c.pid=p.pid '. 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $comment_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; mysql_free_result($result); $sql = "SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON p.aid=a.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); if (count($cat_data)) { $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[cat]' => $cat_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } } elseif ($cat >= FIRST_USER_CAT && $ALBUM_SET) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); $statistics = strtr($lang_list_categories['stat2'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[views]' => $hit_count)); } else { $statistics = ''; } } function list_users() { global $CONFIG, $PAGE, $FORBIDDEN_SET; global $lang_list_users, $lang_errors, $template_user_list_info_box, $cpg_show_private_album; if (defined('UDB_INTEGRATION')) { $result = udb_list_users_query($user_count); } else { // $sql = "SELECT user_id," . " user_name," . " COUNT(DISTINCT a.aid) as alb_count," . " COUNT(DISTINCT pid) as pic_count," . " MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE approved = 'YES' " . "$FORBIDDEN_SET " . "GROUP BY user_id " . "ORDER BY user_name "; // Fixed correct album count DJMaze $sql = "SELECT user_id, " . "user_name, " . "COUNT(DISTINCT a.aid) as alb_count, " . "COUNT(DISTINCT pid) as pic_count, " . "MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') "; if ($FORBIDDEN_SET != "") $sql .= "WHERE $FORBIDDEN_SET "; $sql .= "GROUP BY user_id " . "ORDER BY user_name"; $result = db_query($sql); $user_count = mysql_num_rows($result); } if (!$user_count) { msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%'); mysql_free_result($result); return; } $user_per_page = $CONFIG['thumbcols'] * $CONFIG['thumbrows']; $totalPages = ceil($user_count / $user_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $user_per_page; $upper_limit = min($user_count, $PAGE * $user_per_page); $row_count = $upper_limit - $lower_limit; if (defined('UDB_INTEGRATION')) { $rowset = udb_list_users_retrieve_data($result, $lower_limit, $row_count); } else { $rowset = array(); $i = 0; mysql_data_seek($result, $lower_limit); while (($row = mysql_fetch_array($result)) && ($i++ < $row_count)) $rowset[] = $row; mysql_free_result($result); } $user_list = array(); foreach ($rowset as $user) { $user_thumb = ''; $user_pic_count = $user['pic_count']; $user_thumb_pid = $user['thumb_pid']; $user_album_count = $user['alb_count']; if ($user_pic_count) { if ($CONFIG['show_private']){ $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$user_thumb_pid'"; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } } $albums_txt = sprintf($lang_list_users['n_albums'], $user_album_count); $pictures_txt = sprintf($lang_list_users['n_pics'], $user_pic_count); $params = array('{USER_NAME}' => $user['user_name'], '{USER_ID}' => $user['user_id'], '{ALBUMS}' => $albums_txt, '{PICTURES}' => $pictures_txt, ); $caption = template_eval($template_user_list_info_box, $params); $user_list[] = array('cat' => FIRST_USER_CAT + $user['user_id'], 'image' => $user_thumb, 'caption' => $caption, ); } theme_display_thumbnails($user_list, $user_count, '', '', 1, $PAGE, $totalPages, false, true, 'user'); } // List all albums function list_albums() { global $CONFIG, $USER, $USER_DATA, $PAGE, $lastup_date_fmt,$FORBIDDEN_SET; global $cat; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; $pic_subquery=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if (!$nbAlb) return; $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { if ($count > 0) { if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } } theme_display_album_list($alb_list, $nbAlb, $cat, $PAGE, $totalPages); } /** */ // List category albums // This has been added to list the category albums largely a repetition of code elsewhere // Redone for a cleaner approach function list_cat_albums($cat = 0) { global $CONFIG, $USER, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA, $FORBIDDEN_SET; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $PAGE = 1; if ($cat == 0) { return ''; } $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $sql = "SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if ($nbAlb == 0) { return; } $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); /* $sql = "SELECT a.aid, a.title, a.description, visibility, filepath, ". "filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_ALBUMS']} as a ". "LEFT JOIN {$CONFIG['TABLE_PICTURES']} as p ON thumb=pid ". "WHERE category = $cat ORDER BY a.pos ".$limit; */ $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { // test for visibility if ($count > 0) { // Inserts a thumbnail if the album contains 1 or more images if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums']) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } } ob_start(); theme_display_album_list_cat($alb_list, $nbAlb, $cat, $PAGE, $totalPages); $cat_albums = ob_get_contents(); ob_end_clean(); return $cat_albums; } /** */ /** * Main code */ if (isset($HTTP_GET_VARS['page'])) { $PAGE = max((int)$HTTP_GET_VARS['page'], 1); $USER['lap'] = $PAGE; } elseif (isset($USER['lap'])) { $PAGE = max((int)$USER['lap'], 1); } else { $PAGE = 1; } if (isset($HTTP_GET_VARS['cat'])) { $cat = (int)$HTTP_GET_VARS['cat']; } // Gather data for categories $breadcrumb = ''; $cat_data = array(); $statistics = ''; $STATS_IN_ALB_LIST = false; $cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true); get_cat_list($breadcrumb, $cat_data, $statistics); pageheader($BREADCRUMB_TEXT ? $BREADCRUMB_TEXT : $lang_index_php['welcome']); $elements = preg_split("|/|", $CONFIG['main_page_layout'], -1, PREG_SPLIT_NO_EMPTY); foreach ($elements as $element) { if (preg_match("/(\w+),*(\d+)*/", $element, $matches)) switch ($matches[1]) { case 'breadcrumb': // Added breadcrumb as a separate listable block from config if (($breadcrumb != '' || count($cat_data) > 0) && $cat !=0 ) theme_display_breadcrumb($breadcrumb, $cat_data); break; case 'catlist': if ($breadcrumb != '' || count($cat_data) > 0) theme_display_cat_list($breadcrumb, $cat_data, $statistics); if (isset($cat) && $cat == USER_GAL_CAT) list_users(); flush(); break; case 'alblist': list_albums(); flush(); break; case 'random': display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastup': display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastalb': display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); break; case 'topn': display_thumbnails('topn', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'toprated': display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastcom': display_thumbnails('lastcom', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lasthits': display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'anycontent': if ($cat == 0) { include('anycontent.php'); } flush(); break; } } pagefooter(); ob_end_flush(); // Speed-up the random image query by 'keying' the image table if (time() - $CONFIG['randpos_interval'] > 86400) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; $granularity = floor($pic_count / RANDPOS_MAX_PIC); $result = db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET randpos = ROUND(RAND()*$granularity) WHERE 1"); $result = db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . time() . "' WHERE name = 'randpos_interval'"); } ?>