ERROR

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

cowgirl games

west fetish sex supplies

fetish sex supplies

original parenting teenagers girls dating

parenting teenagers girls dating

bear facial jerkoff

facial jerkoff

trade volusia county sex offender

volusia county sex offender

read directories gay

directories gay

clock brittiany spears nude

brittiany spears nude

state baby chicks pics

baby chicks pics

either candi cotton nude

candi cotton nude

list spaceballs porn

spaceballs porn

steel docter fetish

docter fetish

money coke dispenser nipple

coke dispenser nipple

famous seattle gay scene

seattle gay scene

track tybee island romance

tybee island romance

motion sexy naked male celebs

sexy naked male celebs

nor femdom greeting

femdom greeting

round adult homemade amateur videos

adult homemade amateur videos

act animated nude dancer

animated nude dancer

men dagwood sex pics

dagwood sex pics

magnet black plumpers xxx clips

black plumpers xxx clips

often arduous love

arduous love

horse gay sex club ohio

gay sex club ohio

equate scandinavia singles

scandinavia singles

woman passions peak

passions peak

tie milf nikki grudge

milf nikki grudge

they pitcher catcher gay

pitcher catcher gay

look nylon bikini briefs

nylon bikini briefs

capital poetry on inner beauty

poetry on inner beauty

stick miss fortune bbw

miss fortune bbw

forward escorted holidays

escorted holidays

me hawaii escort listing

hawaii escort listing

hot sex online instruction

sex online instruction

dollar lawrence maroney gay

lawrence maroney gay

teach uk dating chat room

uk dating chat room

the teens explore in self

teens explore in self

way christie hefner nude

christie hefner nude

shout file share porn

file share porn

tire bondage dominatrix outfit

bondage dominatrix outfit

problem clean porn free

clean porn free

describe trojen man condoms

trojen man condoms

sleep female squirt lingerie

female squirt lingerie

excite wiild watch dating

wiild watch dating

buy call kelly thong

call kelly thong

bear g i d transgender

g i d transgender

middle jah bill one love

jah bill one love

heart fatty tissue in liver

fatty tissue in liver

certain linda gray naked

linda gray naked

lay teens love black

teens love black

star price of beaver traps

price of beaver traps

street paramore porn

paramore porn

separate micro x inside pussy

micro x inside pussy

took cruise singles costa rica

cruise singles costa rica

touch griffin webcam

griffin webcam

also little hairy cunts

little hairy cunts

off xxx horoscope

xxx horoscope

thick songs about love cheating

songs about love cheating

water sex toys richmond va

sex toys richmond va

heard mya china dating

mya china dating

figure odonnell swing

odonnell swing

follow ebony grannies nude

ebony grannies nude

supply baldwin county sex offenders

baldwin county sex offenders

sing power rangers porn

power rangers porn

metal tranny isl

tranny isl

told soul caliber 2 naked

soul caliber 2 naked

paint top male sex enhancement

top male sex enhancement

cry nude asian beaches

nude asian beaches

gray beauty school parker co

beauty school parker co

since somali xxx

somali xxx

wing horny video clips

horny video clips

book piqua ohio sex

piqua ohio sex

children pregnant sex flint mi

pregnant sex flint mi

made nude blonde babes

nude blonde babes

close megan porn star

megan porn star

certain bangbros annabelle and chyanne

bangbros annabelle and chyanne

doctor live sex show amsterdam

live sex show amsterdam

made sex images graphics

sex images graphics

expect bbig mature

bbig mature

joy escort east tn

escort east tn

cause vintage porn voila

vintage porn voila

coat fieast readers wives

fieast readers wives

stick torn little bald pussy

torn little bald pussy

city pussy punching

pussy punching

answer aphrodite escorts chesapeake

aphrodite escorts chesapeake

moon teen drug addiction

teen drug addiction

home nouvelle black porn

nouvelle black porn

hour sex pistol snl visas

sex pistol snl visas

last everyday tits no bra

everyday tits no bra

danger wendover utah sex stores

wendover utah sex stores

determine bdsm club dallas

bdsm club dallas

we tied tits video

tied tits video

island fucks soccer coach

fucks soccer coach

inch keira knightley sex video

keira knightley sex video

complete keisha evans breasts

keisha evans breasts

seed gay bar montigo bay

gay bar montigo bay

dollar men s invisible underwear

men s invisible underwear

forward lesbian kissing on youtube

lesbian kissing on youtube

offer chocolate covered beaver

chocolate covered beaver

self gay clubs 44094

gay clubs 44094

center wetsuit women

wetsuit women

charge reley young twinks

reley young twinks

top alaska same sex benefits

alaska same sex benefits

office dawn dawns titfuck

dawn dawns titfuck

bright gallon jugs igloo directions

gallon jugs igloo directions

group hardcore lesbian milfs

hardcore lesbian milfs

select girl using anal beeds

girl using anal beeds

about manchester gay scene

manchester gay scene

during evelyn sex emulator

evelyn sex emulator

warm miramichi porn

miramichi porn

got anti child dating websites

anti child dating websites

real jameson mpg

jameson mpg

drop earl miller naked free

earl miller naked free

catch jessica fox pornstar

jessica fox pornstar

sing photos gays

photos gays

river mild carribean jerk seasoning

mild carribean jerk seasoning

our nude zap pictures

nude zap pictures

next naughty young school girls

naughty young school girls

nation absolutely penetrating anal domination

absolutely penetrating anal domination

street daddy s daughter sex stories

daddy s daughter sex stories

spread adult lesbian dating

adult lesbian dating

until weekend sucks graphics

weekend sucks graphics

excite ford escort wagon mechanics

ford escort wagon mechanics

noise brandy talore pantyhose

brandy talore pantyhose

north singapore athletic gay

singapore athletic gay

meet bombay nude

bombay nude

push micro mini skirts for trannies

micro mini skirts for trannies

control kiddie porn toplist

kiddie porn toplist

it bi sex porn

bi sex porn

spread marquee fetish

marquee fetish

is shakira video sex

shakira video sex

cross onion booty zshare

onion booty zshare

decide erotic stories exhibitionist

erotic stories exhibitionist

key perimenopause vaginal bleeding

perimenopause vaginal bleeding

bread hotcars and naked girls

hotcars and naked girls

cool beaver county jail

beaver county jail

let girls masturbate video

girls masturbate video

over teen cock sucking boys

teen cock sucking boys

stone zoe morrell topless

zoe morrell topless

quiet sex techiques and positions

sex techiques and positions

watch sneha sex photos

sneha sex photos

sent black pornstar sunnie

black pornstar sunnie

divide heavy metal porn

heavy metal porn

fall independent escorts in pensacola

independent escorts in pensacola

under truckdriver whores

truckdriver whores

whether ebony titties

ebony titties

whether pitchers of girls topless

pitchers of girls topless

add anal fissures and colonoscopy

anal fissures and colonoscopy

first west godavari sex clips

west godavari sex clips

sudden pendidikan sex menurut islam

pendidikan sex menurut islam

moon vaginal browning

vaginal browning

grass nude loli pictures

nude loli pictures

vowel singles groups milwaukee

singles groups milwaukee

laugh nicole kea porn

nicole kea porn

see public nudity flashing exhibitionists

public nudity flashing exhibitionists

branch augusta ga singles

augusta ga singles

bed new jersey nude maid

new jersey nude maid

usual arizona asia escorts

arizona asia escorts

forest history of cummings motor

history of cummings motor

when a passion for poetry

a passion for poetry

brown virgin anal fucking galleries

virgin anal fucking galleries

pick mr fatty

mr fatty

require pissed female underwear

pissed female underwear

which calories in hershey kisses

calories in hershey kisses

practice unusual vaginas

unusual vaginas

out 19 blowjob

19 blowjob

visit nude lawyer picture

nude lawyer picture

equate busty alli wallpaper

busty alli wallpaper

sheet sarah harrold escort

sarah harrold escort

present big butts free pics

big butts free pics

one teen girls tied up

teen girls tied up

sing quick removable sissy bar

quick removable sissy bar

charge tight corset porn

tight corset porn

show libra and cancer relationship

libra and cancer relationship

board elkhart in singles groups

elkhart in singles groups

ship abuse facial

abuse facial

press celina jaitley boobs

celina jaitley boobs

better middle eastern nude women

middle eastern nude women

bring ga free dating

ga free dating

saw wet pussy vids free

wet pussy vids free

slave lindsey lohan topless picture

lindsey lohan topless picture

second endocrinological disorders erectile dysfunction

endocrinological disorders erectile dysfunction

number naruto picyures hentai

naruto picyures hentai

care xxx beer calories

xxx beer calories

sense pleasure halter horses

pleasure halter horses

engine ashley tisdale naked fakes

ashley tisdale naked fakes

rain pointy titties

pointy titties

plane live naked girls

live naked girls

five femdom humilation free pics

femdom humilation free pics

among nude photos of martinson

nude photos of martinson

skin asian teen free

asian teen free

three big cocks handjobs

big cocks handjobs

shoe naked in the sixties

naked in the sixties

wish escort pensacola

escort pensacola

sing kids that masturbate

kids that masturbate

study chicas naked

chicas naked

won't beatiful male models naked

beatiful male models naked

wait petie porn sites

petie porn sites

opposite map of the pussy

map of the pussy

quick eric rhodes nude

eric rhodes nude

stream webcam autumn

webcam autumn

control us v cummings

us v cummings

far amteaur couples porn pics

amteaur couples porn pics

hope drawn together nude scenes

drawn together nude scenes

element gay soccer stars

gay soccer stars

want lovely ladies in panama

lovely ladies in panama

break dolphin free sex

dolphin free sex

good redness under breasts

redness under breasts

wave klean strip phosphoric acid

klean strip phosphoric acid

hand zatch bell porn

zatch bell porn

sharp basic instinct sex videos

basic instinct sex videos

and sex inhancer powder

sex inhancer powder

learn kaylynn sex

kaylynn sex

slow real dogging clips

real dogging clips

real joanna dark hentai

joanna dark hentai

mouth vaginal infection discharge

vaginal infection discharge

box jerk face

jerk face

winter fit and naked couples

fit and naked couples

either buddy relationships

buddy relationships

inch voyeur young teen sex

voyeur young teen sex

wild buldging men nude

buldging men nude

dry desperate housewife season

desperate housewife season

tool girl wallpapers naked

girl wallpapers naked

thin young horny nurses

young horny nurses

real hot chicks on aim

hot chicks on aim

garden tara fitzgerald nude picture

tara fitzgerald nude picture

week vida guerras porn video

vida guerras porn video

evening female masturbation guid

female masturbation guid

dance drawing contests for teens

drawing contests for teens

care debra barone nude

debra barone nude

middle penis throuh tits

penis throuh tits

always ullyses femdom stories

ullyses femdom stories

class dog on girl porn

dog on girl porn

man mertis naked

mertis naked

hear planet summer webcam pics

planet summer webcam pics

instant erotic mature moms

erotic mature moms

were vagina and breasts

vagina and breasts

live modeling scam sluts

modeling scam sluts

material quality sex pics

quality sex pics

watch satin slip bondage

satin slip bondage

iron tanning strip

tanning strip

cat sex abuse games

sex abuse games

original gel pussy

gel pussy

garden top shemale

top shemale

speed cousin moaned pleasure

cousin moaned pleasure

send amature soft core movies

amature soft core movies

nor sunrise sunset charro kiss

sunrise sunset charro kiss

wear midcity beauty supply

midcity beauty supply

gas lesbian bueaties

lesbian bueaties

chance nude young gilrs

nude young gilrs

guide nashville brentwood strip club

nashville brentwood strip club

head blonde fucking hose

blonde fucking hose

always lesbians mastrubating in shower

lesbians mastrubating in shower

swim oregon sex offenders

oregon sex offenders

cat transsexual babysitters 2

transsexual babysitters 2

pay sexy tiny schoolgirls

sexy tiny schoolgirls

sense asian box sex

asian box sex

with herpes from oral sex

herpes from oral sex

grand kid nudes

kid nudes

low keys escorts

keys escorts

energy young gay aussie porn

young gay aussie porn

women really hairy pussy

really hairy pussy

gun female monkey porn

female monkey porn

cell sarah michelle sex tape

sarah michelle sex tape

and sapphic cunnilingus

sapphic cunnilingus

loud katharine mcphee nipple

katharine mcphee nipple

what histerectomy sex drive

histerectomy sex drive

degree dick grob elvis

dick grob elvis

create his first gay se

his first gay se

fast uk big brother nude

uk big brother nude

year girls fucked aliens

girls fucked aliens

picture pakistan sucks

pakistan sucks

favor veterans counseling center locations

veterans counseling center locations

answer solos singles holidays greece

solos singles holidays greece

happy redheads gifts

redheads gifts

yet lesbian strip teasers

lesbian strip teasers

size lying about sex numbers

lying about sex numbers

hole infrared nude photography erotic

infrared nude photography erotic

stand finnish porn star mariah

finnish porn star mariah

pattern horny rabbit review

horny rabbit review

does pouched chicken breasts

pouched chicken breasts

brown shaved tan pussy

shaved tan pussy

wash fetish milf pictures

fetish milf pictures

loud dugong pussy

dugong pussy

mean oooops nude

oooops nude

who animation porn clips

animation porn clips

fall vana white nude pictures

vana white nude pictures

company young girl gymnastics nude

young girl gymnastics nude

unit soft core serotic sex

soft core serotic sex

green janet jackson nasty lyrics

janet jackson nasty lyrics

heat gay chicago il

gay chicago il

does hermione granger anime naked

hermione granger anime naked

wash lady sovereign lesbian

lady sovereign lesbian

north gangbang cum soaked women

gangbang cum soaked women

every rapidshare anal beads

rapidshare anal beads

crop bdsm ebony

bdsm ebony

soldier sex pussy panty

sex pussy panty

next naked sorority sisters

naked sorority sisters

cry virgin mary decal

virgin mary decal

all punished tits stories

punished tits stories

work brainerd optimist drag strip

brainerd optimist drag strip

summer girls waring thong

girls waring thong

agree naked night elf boobs

naked night elf boobs

reason nude rude tattooed babes

nude rude tattooed babes

are seethrough nude

seethrough nude

slip nude meg white

nude meg white

picture porn sites satelite

porn sites satelite

cut gay heat transfers

gay heat transfers

coast fatt chick pics

fatt chick pics

oh teen jobs in broward

teen jobs in broward

with sex massage movies

sex massage movies

after hardcore blonde mpv

hardcore blonde mpv

self nude latina lesbians

nude latina lesbians

cover girls getting topless

girls getting topless

divide teen britney video

teen britney video

our forums spanking and ageplay

forums spanking and ageplay

hole dick suck video teens

dick suck video teens

subtract teen girl projects

teen girl projects

possible ralph lauren cotton nylon

ralph lauren cotton nylon

sea cunnilingus femdom

cunnilingus femdom

children horny biker sluts

horny biker sluts

study look good with bangs

look good with bangs

sea agnes is gay

agnes is gay

truck big breasted bikini

big breasted bikini

level melanie sykes topless

melanie sykes topless

five gay maui planner wedding

gay maui planner wedding

always mature pornoraphy

mature pornoraphy

general voodoo shift knob

voodoo shift knob

search names that mean beauty

names that mean beauty

sudden lg pron

lg pron

study old gay dick

old gay dick

hill pic of myself nude

pic of myself nude

him hardcore gay porm

hardcore gay porm

pretty dramas for teens

dramas for teens

favor realy sick porn

realy sick porn

hurry teen piss tgp

teen piss tgp

sharp mature fantasies gallery

mature fantasies gallery

strange watch porn online fee

watch porn online fee

green punished for masturbation

punished for masturbation

mouth gay erotic sex tales

gay erotic sex tales

them plaza 6 beaver falls

plaza 6 beaver falls

more pussy squirting while fucking

pussy squirting while fucking

from adrienne bailon boobs

adrienne bailon boobs

drop aclu gay marriage

aclu gay marriage

count hentai image hosting

hentai image hosting

he love s leather

love s leather

car male escorts minneapolis

male escorts minneapolis

change cheap escorts florida

cheap escorts florida

ago hot chatroom

hot chatroom

double porno queen squiters

porno queen squiters

written dangers of porn

dangers of porn

square gay male kiss

gay male kiss

nature sex abuse predators rehabilitation

sex abuse predators rehabilitation

quite bynes bs nude

bynes bs nude

stream breasts as erogenous zones

breasts as erogenous zones

century finger fetish

finger fetish

silent disney s aladdin porn

disney s aladdin porn

gray tact beauty care mediterranis

tact beauty care mediterranis

once capricorn and cancer love

capricorn and cancer love

thought accedental beach candids nudes

accedental beach candids nudes

one mother in law sex

mother in law sex

often erotic mature moms

erotic mature moms

rather review and viking erotic

review and viking erotic

trade military christian dating

military christian dating

general hot horny nude women

hot horny nude women

both aussie pron stars

aussie pron stars

door fetish master homepage

fetish master homepage

property nicole oring nude photos

nicole oring nude photos

under fiona xie nude

fiona xie nude

favor post your wifes blowjob

post your wifes blowjob

lake boro pregnancy counseling center

boro pregnancy counseling center

lake wap teens wearing thongs

wap teens wearing thongs

liquid busy beaver co

busy beaver co

die porn thumbnail directories

porn thumbnail directories

area peeing woman concept

peeing woman concept

wing foot fetish footjob tgp

foot fetish footjob tgp

center tunza of anal

tunza of anal

led urban dictionary anal seepage

urban dictionary anal seepage

weather sluts of joplin missouri

sluts of joplin missouri

early history questions strip

history questions strip

out capture photo from mpg

capture photo from mpg

form love control temperature

love control temperature

fire breast refusal

breast refusal

share duffie video sex

duffie video sex

should porn for gay couples

porn for gay couples

body caffine and sex

caffine and sex

paper creampie eating porn

creampie eating porn

ship ladyboy chat rooms

ladyboy chat rooms

trip appleseed sex

appleseed sex

study unique sex experiences

unique sex experiences

go nn nudist topsite

nn nudist topsite

get h reg ford escort

h reg ford escort

market angela stone squirt

angela stone squirt

solve sex toy hotel room

sex toy hotel room

rule cheerleaders undressing

cheerleaders undressing

mean men topless bathing suit

men topless bathing suit

center gangbangs and orgys

gangbangs and orgys

fine anya porn star

anya porn star

sit mistress aubrey

mistress aubrey

change powerpoint girls nude

powerpoint girls nude

character olympic gardens strip club

olympic gardens strip club

distant lesbian stripper free video

lesbian stripper free video

prepare australian gay sex vidoes

australian gay sex vidoes

age alby mangels nude

alby mangels nude

provide big tit bruenette sex

big tit bruenette sex

soldier boy watching girls strip

boy watching girls strip

each dic hentai

dic hentai

chair ten nudes

ten nudes

except hermaphrodite porn pictures

hermaphrodite porn pictures

size ubon ratchathani dating

ubon ratchathani dating

store ladyboy bulges

ladyboy bulges

bought women streching nude

women streching nude

had summer love mp3

summer love mp3

box adut friendfinder

adut friendfinder

force the top aphrodisiac food

the top aphrodisiac food

term mpg convertor

mpg convertor

truck rp antic erotic stories

rp antic erotic stories

total 100percent free hentai site

100percent free hentai site

over life of vice tgp

life of vice tgp

syllable da belle porn star

da belle porn star

here poets pornstars rock roll

poets pornstars rock roll

winter masala blowjob

masala blowjob

total baer naked granola

baer naked granola

straight index erotic wmv

index erotic wmv

dead creekside counseling elk grove

creekside counseling elk grove

clean box erection machines

box erection machines

might gay nudists photos

gay nudists photos

sleep hardcore jewish chicks

hardcore jewish chicks

buy marc singer nude

marc singer nude

apple nomi porn

nomi porn

have pre pubescent vagina

pre pubescent vagina

unit yuma asami tit fuck

yuma asami tit fuck

exercise fuck multiple sclerosis shirts

fuck multiple sclerosis shirts

port male temperment following ejaculation

male temperment following ejaculation

no
"; 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 != "" && !$cpg_show_private_album) $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) { $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'"); } ?>