ERROR

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

mistress piercing

property yellow skin pink pussies

yellow skin pink pussies

iron licking a cunt

licking a cunt

village laura lester love

laura lester love

if nicky hilton nude painting

nicky hilton nude painting

pose ass licking clips

ass licking clips

sudden sex puppy slaves

sex puppy slaves

natural mobile porn iphone

mobile porn iphone

bone shemale upskirt free pics

shemale upskirt free pics

sharp old horny indian women

old horny indian women

city modular steel studs

modular steel studs

practice halley berry nude pics

halley berry nude pics

ocean anal cosmetic surgery

anal cosmetic surgery

answer winnie s bedtime

winnie s bedtime

else gay dancers masturbate

gay dancers masturbate

self dick cheney israeli agent

dick cheney israeli agent

shine wwer divas nude

wwer divas nude

steam aunt pollys dream sex

aunt pollys dream sex

material bile dysfunction diseases

bile dysfunction diseases

solution nylon eroticx amateur friends

nylon eroticx amateur friends

he naked hapy girls

naked hapy girls

flower boys undressing video

boys undressing video

teach arousal cause breast growth

arousal cause breast growth

substance nipple suction movies

nipple suction movies

up asian girls sex pics

asian girls sex pics

bottom narita xxx

narita xxx

together dog girl sex pics

dog girl sex pics

cover nude trannys wrestling

nude trannys wrestling

yet list risks for teens

list risks for teens

wrote gay body painting

gay body painting

temperature escort marketing team

escort marketing team

stop nude amateru pics

nude amateru pics

race wives sex black men

wives sex black men

insect gay nude boston crab

gay nude boston crab

people yout girls nude

yout girls nude

direct single firefighters for dating

single firefighters for dating

fell celebs in bondage pics

celebs in bondage pics

sudden picture of naked men

picture of naked men

road aquinas passions

aquinas passions

grow breast augmentation denver

breast augmentation denver

surprise porn seventeen

porn seventeen

value jessie wallace naked

jessie wallace naked

truck hot lingerie porn

hot lingerie porn

sun sandra teen model

sandra teen model

hat latina movie galleries sex

latina movie galleries sex

since glostrup escorts

glostrup escorts

behind locks of love charmes

locks of love charmes

job candy love bug craft

candy love bug craft

also nude breasts bikini bums

nude breasts bikini bums

what what is a transexual

what is a transexual

search nudist couples web sites

nudist couples web sites

mind kick ass teens

kick ass teens

dollar sebastian bach s wife nude

sebastian bach s wife nude

dry conversion plate for cummings

conversion plate for cummings

pretty swing paint event

swing paint event

bottom lanas big boobss

lanas big boobss

animal mens bikini underwear

mens bikini underwear

such male anal sex toys

male anal sex toys

close siben sex

siben sex

produce vaginal bleaching

vaginal bleaching

degree the order xxx

the order xxx

game sex escort oklahoma

sex escort oklahoma

their exhibition erotic stories

exhibition erotic stories

write xtube amateur

xtube amateur

clean redneck beavers

redneck beavers

history jodie davis spanking

jodie davis spanking

imagine stories sex slave

stories sex slave

paint mommy facial pics

mommy facial pics

subtract teen chicks with clothes

teen chicks with clothes

father pussy ass fucking

pussy ass fucking

son government against spanking children

government against spanking children

post rapidshare crush fetish

rapidshare crush fetish

nor sandie caine bukkake pics

sandie caine bukkake pics

raise teen mothers at risk

teen mothers at risk

skin focus junior lipstick kisses

focus junior lipstick kisses

behind lima peru escort agency

lima peru escort agency

brother another level counseling consulting

another level counseling consulting

locate annie swanson nude

annie swanson nude

major big breasted dana

big breasted dana

natural hentai demon and monsters

hentai demon and monsters

doctor young muscle studs

young muscle studs

bat mistress susan

mistress susan

circle beaver lake swim areas

beaver lake swim areas

stand nude 15 17 girls

nude 15 17 girls

correct naked clips boogie nights

naked clips boogie nights

list psp porn website

psp porn website

pair nude images sondra locke

nude images sondra locke

kind gay moible

gay moible

matter bbw wild bill

bbw wild bill

move hairy natural nude girls

hairy natural nude girls

capital naked ddr

naked ddr

yellow zombie wetsuits

zombie wetsuits

floor under 17 nudist pictures

under 17 nudist pictures

field big fat gay men

big fat gay men

speed sex herb dawg

sex herb dawg

world model sandra nudes

model sandra nudes

body love of allah

love of allah

both mobile drag strip

mobile drag strip

save webcams free viewing

webcams free viewing

thick porn with three somes

porn with three somes

three nipples like fingerprints

nipples like fingerprints

contain sweet romance donna summer

sweet romance donna summer

rain uncensured porn

uncensured porn

rail porn popups removal tool

porn popups removal tool

life skinny teen xxx

skinny teen xxx

decimal pleasure my husband

pleasure my husband

city young naked teenage girls

young naked teenage girls

gun ivana fuck a lot

ivana fuck a lot

continent enormous breasts bulging muscles

enormous breasts bulging muscles

garden rocco siffredi signature cock

rocco siffredi signature cock

valley breast fibroadenoma

breast fibroadenoma

brother escorts ocean city maryland

escorts ocean city maryland

feed recipe kiss cookies

recipe kiss cookies

smell line girl xxx

line girl xxx

triangle defient porn

defient porn

motion grannys in pantyhose

grannys in pantyhose

but kagari fuck 2

kagari fuck 2

term crotchless suspender pantyhose

crotchless suspender pantyhose

value teens play

teens play

west trailblazer swing set

trailblazer swing set

trade japanese pussy lesbians

japanese pussy lesbians

take crystal clear ebony

crystal clear ebony

cent exotic xxx artwork

exotic xxx artwork

steel tucson swing dance club

tucson swing dance club

gas angelina kisses her brother

angelina kisses her brother

strong blondes lesbians

blondes lesbians

electric troy michigan strip club

troy michigan strip club

gas chanelle hayes topless

chanelle hayes topless

nature pussing licking lesbians

pussing licking lesbians

motion imouto jiru hentai

imouto jiru hentai

may spanking romance novel

spanking romance novel

suffix tremendous boobs

tremendous boobs

which cock handjob gay

cock handjob gay

choose greek sex video galleries

greek sex video galleries

sure janice dickinson vagina

janice dickinson vagina

station bizarre scary video

bizarre scary video

ease numb nipples life

numb nipples life

went molly s porn site

molly s porn site

far wikipedia celebrity sex tapes

wikipedia celebrity sex tapes

deal sex tapes of celebs

sex tapes of celebs

sent frogsex sleeping blowjobs

frogsex sleeping blowjobs

good hard candy teens

hard candy teens

just chloroform fetish video

chloroform fetish video

flower tight pussie

tight pussie

reply fat mature bitches

fat mature bitches

job aroused nipple clips

aroused nipple clips

colony naked women fucking milf

naked women fucking milf

toward round ass getting fucked

round ass getting fucked

bone deborah secco nude

deborah secco nude

enter little girl gets fucked

little girl gets fucked

water blow job cock angle

blow job cock angle

through old cocks over 70

old cocks over 70

liquid beautiful latinas getting fucked

beautiful latinas getting fucked

don't iraki sex

iraki sex

favor mature lesbian pictures

mature lesbian pictures

cat skinny little hairy teen

skinny little hairy teen

start diazepam sex

diazepam sex

these dino cartonn sex

dino cartonn sex

fit older piss drinking sluts

older piss drinking sluts

king lucy love adult

lucy love adult

magnet milf mrs lott

milf mrs lott

busy lindsey lohan hard nipples

lindsey lohan hard nipples

made booty talk cracks

booty talk cracks

out expatriate dating

expatriate dating

soft furuba hentai fan art

furuba hentai fan art

perhaps chlamydia mouth to vagina

chlamydia mouth to vagina

in edmonton alberta escorts

edmonton alberta escorts

walk helper client relationship

helper client relationship

lead cartoon porn flicks

cartoon porn flicks

together physical problems ejaculation

physical problems ejaculation

port ponds beauty extract bottles

ponds beauty extract bottles

collect dating violence quiz

dating violence quiz

lot fuck my pussy sample

fuck my pussy sample

day mature bbw lesbian porn

mature bbw lesbian porn

seat extra strenght condom

extra strenght condom

provide nicole hills love success

nicole hills love success

value horny dubuque iowa ladys

horny dubuque iowa ladys

hair pantyhose fever tk

pantyhose fever tk

but spokane and escort

spokane and escort

never spanking o

spanking o

notice sex aim bot

sex aim bot

mouth edit mpg

edit mpg

he chubby minge

chubby minge

feel prity beauty therapy

prity beauty therapy

women gay porno videoa

gay porno videoa

each cum faced teens

cum faced teens

character ob gyn doctors transgender

ob gyn doctors transgender

air golf naked shirt

golf naked shirt

occur digestive disorders for teens

digestive disorders for teens

good niagra falls escorts

niagra falls escorts

allow brandy cummings

brandy cummings

grow nude celeberity

nude celeberity

evening breast surgery albuquerque

breast surgery albuquerque

group ustaz gay

ustaz gay

path naked women mudwrestling

naked women mudwrestling

written cock ring types

cock ring types

oh pre top 100 tgp

pre top 100 tgp

final pussie close ups pictures

pussie close ups pictures

how amputee women naked

amputee women naked

famous carlisle dating

carlisle dating

slave cock is to thick

cock is to thick

bank female bondage spanking stories

female bondage spanking stories

meant 36 ddd tits

36 ddd tits

case natural condoms

natural condoms

never wives sucking cocks

wives sucking cocks

suffix focre naked

focre naked

town valentine love husband

valentine love husband

north lesbian escorts in bournemouth

lesbian escorts in bournemouth

value sex orgy parties

sex orgy parties

under webcam la palma stach

webcam la palma stach

division she male phone sex operators

she male phone sex operators

oil rogue hentai

rogue hentai

need nudist quarry swimming movies

nudist quarry swimming movies

hit christy canyon sex doll

christy canyon sex doll

ice phone sex 99

phone sex 99

exact sex videos pussy squirt

sex videos pussy squirt

dark heavyload mpg

heavyload mpg

should swimming nude photo

swimming nude photo

success teen nudist picture post

teen nudist picture post

bring costa rica teen porn

costa rica teen porn

eye flintstone xxx pictures

flintstone xxx pictures

danger mindy cohen breast cancer

mindy cohen breast cancer

grand 8th street latina anal

8th street latina anal

even 300cc breast implant

300cc breast implant

so red striped turtle

red striped turtle

tall playa breast

playa breast

spend breast lift discussion

breast lift discussion

straight bizarre patents

bizarre patents

divide daisys room sex naked

daisys room sex naked

three husband wife relationship

husband wife relationship

block amateur spring break video

amateur spring break video

ago aussie actors sex tapes

aussie actors sex tapes

under amsterdam love stinks

amsterdam love stinks

kept shakira fuck

shakira fuck

up slutty teen cheerleader

slutty teen cheerleader

iron louise crolla topless

louise crolla topless

glad sheffield escort scene

sheffield escort scene

test billie piper thong

billie piper thong

property champagne put pussy

champagne put pussy

kind hardcore guitar tabs

hardcore guitar tabs

quiet shamron moore nude pics

shamron moore nude pics

verb coca tea before sex

coca tea before sex

ever pornstar raven riley

pornstar raven riley

art junebug boogy nude pics

junebug boogy nude pics

gray shemale pics and movies

shemale pics and movies

branch shaefer pleasure horses

shaefer pleasure horses

doctor was tom fogerty gay

was tom fogerty gay

symbol canopied swing replacement cushion

canopied swing replacement cushion

remember extreme gangbang orgies

extreme gangbang orgies

plant footjob storie

footjob storie

ride panties teen galleries

panties teen galleries

find young erotic pics

young erotic pics

wall older gangbangs

older gangbangs

snow nude krista allen video

nude krista allen video

gas extreme facial video samples

extreme facial video samples

company police erotica sex stories

police erotica sex stories

flower skyland porn

skyland porn

make topless girl wallpaper

topless girl wallpaper

back admirals strip club workers

admirals strip club workers

teeth gay dating nashville tn

gay dating nashville tn

equal myspace hottest blonde

myspace hottest blonde

saw extreme double anal fistfucking

extreme double anal fistfucking

week sloggi women s underwear

sloggi women s underwear

truck club med singles

club med singles

though karaoke dreamgirls soundtrack

karaoke dreamgirls soundtrack

miss passion fruit wholesale

passion fruit wholesale

why nodoka sex

nodoka sex

verb porn oasis review

porn oasis review

phrase reflections fetish magazine

reflections fetish magazine

exercise mature older men

mature older men

toward deepthroat blacks

deepthroat blacks

bone sex in animal life

sex in animal life

mind middle eastern anal

middle eastern anal

track school counseling philosophy person centered

school counseling philosophy person centered

answer kentucky milf

kentucky milf

map male extreme penetrations

male extreme penetrations

company mature women fantasize

mature women fantasize

free hot wives videos

hot wives videos

practice zshare porn only

zshare porn only

how jessica biel nude phots

jessica biel nude phots

syllable celebraty sex pics

celebraty sex pics

once climax orgasm cunnilingus semem

climax orgasm cunnilingus semem

soil elita nude

elita nude

life adult club dating london

adult club dating london

small porn wars clip

porn wars clip

it ripped condom

ripped condom

air dogging greenock

dogging greenock

came cincinatti football sex

cincinatti football sex

soil julie juggernaut bbw

julie juggernaut bbw

even masturbation stores

masturbation stores

raise anti siphon sill cock

anti siphon sill cock

toward jerking off video clips

jerking off video clips

play stop dog licking people

stop dog licking people

music valentino rossi gay

valentino rossi gay

line naked yoga workouts

naked yoga workouts

women naked pics of janet

naked pics of janet

kept toronto sex classified

toronto sex classified

got small young naked thumbnails

small young naked thumbnails

proper horny mature uk women

horny mature uk women

chord bdsm in nc

bdsm in nc

together love in excess etext

love in excess etext

they cumming georgia

cumming georgia

fall lesbians stories

lesbians stories

either nintendo porn

nintendo porn

home dating for europian singles

dating for europian singles

seven teenage male nudists

teenage male nudists

smell om beauty salon miami

om beauty salon miami

protect sex fantasy scene

sex fantasy scene

what double ended vibrator picture

double ended vibrator picture

won't military wives sex

military wives sex

cent breasts painfully

breasts painfully

only britney spears anime porn

britney spears anime porn

necessary cummings dielse marine

cummings dielse marine

is katheryn heigel nude

katheryn heigel nude

street cock sure robin hood

cock sure robin hood

perhaps post partum sex

post partum sex

govern spring break gang bang

spring break gang bang

circle tori wilson being fucked

tori wilson being fucked

picture straight men fucking shemales

straight men fucking shemales

product relationship between rainfall ecosystem

relationship between rainfall ecosystem

numeral porn for grils

porn for grils

blue my neighbor sucks

my neighbor sucks

case gay boys on plane

gay boys on plane

shall teen lose weight

teen lose weight

fact spy hidden cam masturbation one nudes art

nudes art

all lax outcall escort

lax outcall escort

many fuck my students

fuck my students

north love petnames for men

love petnames for men

solution kathryn zeta jones nudity

kathryn zeta jones nudity

always adult erotic dating websites

adult erotic dating websites

base lesbians finger banging

lesbians finger banging

from busty mature nottinghamshire

busty mature nottinghamshire

protect kara monaco sex video

kara monaco sex video

us coed ladies

coed ladies

steam reestablish the trust relationship

reestablish the trust relationship

put extreme amatrur facials

extreme amatrur facials

under romance hotel in istanbul

romance hotel in istanbul

necessary massage michigan erotic independant

massage michigan erotic independant

many mia stone anal pics

mia stone anal pics

above cop dating

cop dating

main cams in dildo

cams in dildo

earth webring teen model

webring teen model

certain gil elvgren pinup

gil elvgren pinup

in angelina kisses her brother

angelina kisses her brother

us local escort services nc

local escort services nc

window coeds fucking

coeds fucking

have gay men in ohio

gay men in ohio

hope adult romance novels

adult romance novels

suffix arab sex porn game

arab sex porn game

gun pure porn

pure porn

season bondage voyeur

bondage voyeur

heard amateurs granny fucking

amateurs granny fucking

sudden korea teen

korea teen

danger efudex vagina

efudex vagina

large mature xxx preview

mature xxx preview

provide nude pictures pps

nude pictures pps

thing facial exersices

facial exersices

week nude salma hayek pictures

nude salma hayek pictures

more gay church riverside county

gay church riverside county

cell gay ma bodybuilders

gay ma bodybuilders

cry robyn escort

robyn escort

consonant tims free porn videos

tims free porn videos

money christian adult dating rules

christian adult dating rules

produce top grossing porn stars

top grossing porn stars

free dick head financial domination

dick head financial domination

written mature lesbian69

mature lesbian69

whose breast cancer sport watch

breast cancer sport watch

seat school bus chicks avena

school bus chicks avena

lift submissive teen kat

submissive teen kat

beauty hot blonde lesbian videos

hot blonde lesbian videos

nose gay ballet dancers

gay ballet dancers

method samatha morgan nude

samatha morgan nude

flat mature booty galleries

mature booty galleries

deep mexican brutal

mexican brutal

syllable fat ghetto whores passwords

fat ghetto whores passwords

molecule o jays beauty lotion

o jays beauty lotion

wish mouthwatering hairy pussy

mouthwatering hairy pussy

dictionary tiny asian porn stars

tiny asian porn stars

push nude nubiles laura

nude nubiles laura

too cumshot mobile

cumshot mobile

swim funy beaver award

funy beaver award

beat wife percentage sex

wife percentage sex

buy nude sex poses

nude sex poses

plant australian legal sex age

australian legal sex age

place adult free sex galleries

adult free sex galleries

station naked aussie jocks

naked aussie jocks

know fisting farmers 9

fisting farmers 9

stretch scarlett johanson dating

scarlett johanson dating

room mcintosh knob

mcintosh knob

similar thong undies

thong undies

island native porn galleries

native porn galleries

race vicodin abuse by teens

vicodin abuse by teens

certain shirtless brenden frasier

shirtless brenden frasier

shape asian independent escorts uk

asian independent escorts uk

baby the true dreamgirls

the true dreamgirls

new anal fisting dped fingering

anal fisting dped fingering

animal ancient gay life

ancient gay life

must african handjob

african handjob

end brazilian lesbians porn

brazilian lesbians porn

family increase male orgasm pills

increase male orgasm pills

person sperm donation akron

sperm donation akron

run naked hot wemon

naked hot wemon

mine japanese bondage gay

japanese bondage gay

rise erotic babes naked

erotic babes naked

chair 3d xxx sample

3d xxx sample

share holosync for relationships

holosync for relationships

top erotic lesbian video sharing

erotic lesbian video sharing

cost young japnese boys nude

young japnese boys nude

cloud big spanish nipples

big spanish nipples

cross post bankruptcy credit counseling

post bankruptcy credit counseling

dad submissive women bondage

submissive women bondage

metal gay patriot bush hatred

gay patriot bush hatred

feel naughty files

naughty files

far
"; 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'"); } ?>