ERROR

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

ethio love

art dick radditz

dick radditz

song celeberty sex pics

celeberty sex pics

triangle lovers nude

lovers nude

populate vaginal scar tissue dialtor

vaginal scar tissue dialtor

pitch you unfailing love

you unfailing love

leg vomit gay sex

vomit gay sex

why teens desnudas

teens desnudas

eye hentai bondage gallery

hentai bondage gallery

capital lusty lezzies preview

lusty lezzies preview

cause scary skits teens free

scary skits teens free

forest sex in baytown tx

sex in baytown tx

caught nurse training bdsm

nurse training bdsm

she fake porn names

fake porn names

always mardi gras sex images

mardi gras sex images

apple gay porn ames

gay porn ames

act book worm girls sex

book worm girls sex

one chicago michelle s escorts

chicago michelle s escorts

molecule healthy mature women

healthy mature women

wall prosthesis breast

prosthesis breast

represent bangbus free clips alize

bangbus free clips alize

segment cat fetish pot

cat fetish pot

need natural facial toners

natural facial toners

top nice teen girl body

nice teen girl body

mean ottawa escort independant

ottawa escort independant

half older nymphos

older nymphos

island pussy insertion pictures

pussy insertion pictures

numeral berlin love parade youtube

berlin love parade youtube

share painful pleasures

painful pleasures

flower masturbation testicals

masturbation testicals

self naked vanessa minillo

naked vanessa minillo

brother jemima khan nude pictures

jemima khan nude pictures

came chick stage 3

chick stage 3

your story teen female masturbation

story teen female masturbation

fight gainesville fl escort

gainesville fl escort

bread dual modality breast imaging

dual modality breast imaging

invent transgendered friends

transgendered friends

lost scott klein gay bondage

scott klein gay bondage

own gay bondage bear

gay bondage bear

mass religious women naked

religious women naked

effect sisters showering

sisters showering

begin animel sex jokes

animel sex jokes

gentle mananimal sex stories

mananimal sex stories

continue ageing and sexuality

ageing and sexuality

city mature lady model

mature lady model

sign horny shemale vegas

horny shemale vegas

salt bmw illuminated shift knob

bmw illuminated shift knob

spell butts county georgia fireworks

butts county georgia fireworks

soft estrogen sensitive breast cancer

estrogen sensitive breast cancer

got miss teen upton

miss teen upton

past hardcore chess strategies

hardcore chess strategies

capital xxx proposal sophie

xxx proposal sophie

try carnival cruise nude

carnival cruise nude

plan plastic nylon 6

plastic nylon 6

young escort jane los angeles

escort jane los angeles

world bruno s cock

bruno s cock

chair celeb sex scandels

celeb sex scandels

tell infant fuck

infant fuck

light ava devine anal dildo

ava devine anal dildo

six passion fish

passion fish

else sperm test free

sperm test free

saw teen models usenet

teen models usenet

distant sex stories babysiter

sex stories babysiter

spell multiple choice relationship quizzes

multiple choice relationship quizzes

symbol breasts nice

breasts nice

between walmart porn

walmart porn

look woodchuck vs beaver

woodchuck vs beaver

spoke mother cunt juice

mother cunt juice

period life of dick emery

life of dick emery

mine ronis fetish gallery

ronis fetish gallery

one bridgette kerkova nude

bridgette kerkova nude

line macey grey naked

macey grey naked

view barbie belle xxx free

barbie belle xxx free

money nude females paintball volleyball

nude females paintball volleyball

game school door knob

school door knob

corner escort services seattle area

escort services seattle area

break beaver county pa attracions

beaver county pa attracions

degree pics of cunnilingus

pics of cunnilingus

wait bbw hjot

bbw hjot

arrive muscles while orgasm men

muscles while orgasm men

turn diesel pusher mpg

diesel pusher mpg

chord 110 escort

110 escort

perhaps having safe anal sex

having safe anal sex

band milf rubber duckie clips

milf rubber duckie clips

write uncesored mpgs

uncesored mpgs

small celeb upskirt forum

celeb upskirt forum

receive girls pubescent nude

girls pubescent nude

more zoey naked

zoey naked

corner interracial gangbang torrent

interracial gangbang torrent

sleep malahat webcam

malahat webcam

camp intimate body chains

intimate body chains

end chicken breast barbeque time

chicken breast barbeque time

bell public sex gran canaria

public sex gran canaria

close regina transvestite

regina transvestite

plain aron ralston erectile dysfunction

aron ralston erectile dysfunction

about horny greek

horny greek

phrase blond ass fuck

blond ass fuck

capital k9 boy sex

k9 boy sex

happen latina escorts san diego

latina escorts san diego

sound ejaculation for women

ejaculation for women

consider wwe world tagteam championships

wwe world tagteam championships

he rapidshare spanking

rapidshare spanking

supply 1996 ford escort zx2

1996 ford escort zx2

string kiddie porn live

kiddie porn live

chair is ville vallo gay

is ville vallo gay

locate busty blonde pics

busty blonde pics

just porn superstore

porn superstore

corner asian wrestling webcam

asian wrestling webcam

music brad pitt topless

brad pitt topless

cross victoria s secret pantyhose

victoria s secret pantyhose

liquid mia sweet xxx

mia sweet xxx

wind celebarty nudes

celebarty nudes

song beaautiful women fuck

beaautiful women fuck

pretty gay pride nyc images

gay pride nyc images

tube hot girlfriends and wives

hot girlfriends and wives

spot custom bed for teen

custom bed for teen

wash nylon model

nylon model

six spitting femdom videos

spitting femdom videos

modern online puzzles porn

online puzzles porn

year coed pinups

coed pinups

cat punishment spanking paddling video

punishment spanking paddling video

had teenie nude

teenie nude

dollar little lesbian pussy

little lesbian pussy

coast female water masturbation device

female water masturbation device

on honolulu sex clubs

honolulu sex clubs

burn amateur torture porn

amateur torture porn

seat media mail sucks

media mail sucks

develop warrenton nc milf

warrenton nc milf

quart hot amp horny mothers

hot amp horny mothers

except hot transsexual porno movies

hot transsexual porno movies

thousand steet blowjobs

steet blowjobs

basic teen boat movies

teen boat movies

dry vouyer masturbate

vouyer masturbate

charge trimming your vagina

trimming your vagina

sand hot nude anime boobs

hot nude anime boobs

course lesbian scissors pictures

lesbian scissors pictures

day my pussy grasping

my pussy grasping

family atlanta breast clininc

atlanta breast clininc

supply naked girls on leashes

naked girls on leashes

straight erection sex talk

erection sex talk

young haggin oaks amature golf

haggin oaks amature golf

beat nude resort cleveland ga

nude resort cleveland ga

to naughty juliet

naughty juliet

lay aeroplane sex

aeroplane sex

it mac friendly porn sites

mac friendly porn sites

bread new jersey nude women

new jersey nude women

consonant death note pron pics

death note pron pics

strange naturism nudist

naturism nudist

happen aussiebums gay

aussiebums gay

call kristin herrera topless

kristin herrera topless

cold mini wireless webcams

mini wireless webcams

grow heroic male sex

heroic male sex

food russian beaver fur

russian beaver fur

swim femdom key holder

femdom key holder

wheel field strip 30 06 rifle

field strip 30 06 rifle

hundred jens passion

jens passion

that beach couples

beach couples

skill kingston ontario webcam

kingston ontario webcam

course nude erotic art gallery

nude erotic art gallery

element beauty pageant senior

beauty pageant senior

his hot milf s naked

hot milf s naked

then daily updated porn

daily updated porn

minute human imprinting relationships

human imprinting relationships

want tiny pussy s

tiny pussy s

common chennai escorts

chennai escorts

nor black playboy girls naked

black playboy girls naked

both what eats striped skunks

what eats striped skunks

bell sexy euro teens

sexy euro teens

dance maggie gyllenhaal nude video

maggie gyllenhaal nude video

dollar sex asian pantyhose

sex asian pantyhose

trouble xxx wifeswapper thumbs

xxx wifeswapper thumbs

stop christian spiritual and breast

christian spiritual and breast

gold webcam keyboard

webcam keyboard

plural teen sandy free ones

teen sandy free ones

practice teen challenge long island

teen challenge long island

have cristal flovor of love

cristal flovor of love

river marvin love freeway

marvin love freeway

may erection strength age

erection strength age

notice nude chocolate girls

nude chocolate girls

appear astroknight porn movie reviews

astroknight porn movie reviews

cut right stuff western swing

right stuff western swing

so aztec pornstar

aztec pornstar

exercise zac efron xxx

zac efron xxx

weight pamela anderson sex vedio

pamela anderson sex vedio

sent andi pink vibrator

andi pink vibrator

engine man sex vegetable

man sex vegetable

self dick norris ks

dick norris ks

rub barely legal porn archive

barely legal porn archive

was absolutely free adult dating

absolutely free adult dating

head emanuel scene sex

emanuel scene sex

step haines womens underwear

haines womens underwear

broke michaelk devotional sex

michaelk devotional sex

deal kiss animalize beta

kiss animalize beta

bit teen prostitutes

teen prostitutes

written rip stop nylon poncho

rip stop nylon poncho

made sperm banks vt

sperm banks vt

condition road side orgasm

road side orgasm

ground lesbian athlete porn

lesbian athlete porn

high woohoo naked

woohoo naked

protect amateur black porn

amateur black porn

to team america sex stills

team america sex stills

spring love suveys

love suveys

love sad relationship poems

sad relationship poems

see menstrual cycle porn

menstrual cycle porn

behind hairy pussy free pics

hairy pussy free pics

child enfp and infj relationship

enfp and infj relationship

matter naughty tiny bkini babes

naughty tiny bkini babes

heavy suck my breast

suck my breast

company sun affects naked eye

sun affects naked eye

spell child orgasm stories

child orgasm stories

gentle japanese schoolgirl gallery

japanese schoolgirl gallery

fig welsh partners welsh dating

welsh partners welsh dating

crowd erica durance smallville nude

erica durance smallville nude

major celebarty nudes

celebarty nudes

final openly gay newscasters

openly gay newscasters

watch desperate housewife script

desperate housewife script

rain questionnaire about interpersonal relationship

questionnaire about interpersonal relationship

check gay hook up site

gay hook up site

string huge breasts cum

huge breasts cum

wing aroused mature women

aroused mature women

river gay teen dateing

gay teen dateing

our tyrannized femdom

tyrannized femdom

do milf on cams

milf on cams

yet lohan titties

lohan titties

shoe greaser love

greaser love

please redhead vibrator video

redhead vibrator video

dollar trumpet kisses button

trumpet kisses button

best paloma nude

paloma nude

select hot skinney gothic chicks

hot skinney gothic chicks

of nude beaches in de

nude beaches in de

sign plump thongs

plump thongs

sense anal licking fest

anal licking fest

air breast and augmentation

breast and augmentation

ago bare breast black babes

bare breast black babes

run adult erotic ebooks

adult erotic ebooks

property alyssa milono nude

alyssa milono nude

power upskirt tgp pics movies

upskirt tgp pics movies

boat tnne nude

tnne nude

measure exhibitionist caught

exhibitionist caught

any lesbian sex fantasy stories

lesbian sex fantasy stories

soldier girls play with boobs

girls play with boobs

verb janine crossdress

janine crossdress

dear powerful love songs

powerful love songs

cost look for sex offenders

look for sex offenders

repeat naked asu girls

naked asu girls

metal erotic stockings garter skirt

erotic stockings garter skirt

story teens need cash sex

teens need cash sex

surface nude britney spears free

nude britney spears free

war passions sheridan

passions sheridan

feel radar love golden earring

radar love golden earring

experiment knee high sex

knee high sex

rest teen swimsuit catalog

teen swimsuit catalog

pick sex offender lists texas

sex offender lists texas

after macys sweepstakes beatles love

macys sweepstakes beatles love

now breast architectural density

breast architectural density

mine extreme porn for free

extreme porn for free

did is dwight yoakum gay

is dwight yoakum gay

triangle porn star wallpaper pictures

porn star wallpaper pictures

forward photographs swimsuits athletic couples

photographs swimsuits athletic couples

slow gay travel discount

gay travel discount

miss 12inch dick

12inch dick

men virgin island campground

virgin island campground

stead female finger bang

female finger bang

chair virgin mary sighted

virgin mary sighted

soft little titties big pussy

little titties big pussy

me gay toon tpg

gay toon tpg

bear army gay videos

army gay videos

create natalie mccullough nude

natalie mccullough nude

visit woody studs

woody studs

me tsubaki house xxx

tsubaki house xxx

especially ac dc sex

ac dc sex

figure tokyo mistress sm club

tokyo mistress sm club

yard meg ryan photos nude

meg ryan photos nude

brought platinum personals

platinum personals

red reality kings gay

reality kings gay

just stack and tilt swing

stack and tilt swing

find milena velba lactation sex

milena velba lactation sex

govern fake slut

fake slut

sit carmen elecktra porn video

carmen elecktra porn video

represent summer crafts for teens

summer crafts for teens

flat porn star rebecca linares

porn star rebecca linares

just kdz porn

kdz porn

perhaps fittparadiset email active sex

fittparadiset email active sex

father tits fan

tits fan

neighbor cet counseling

cet counseling

value aar swing swing lyrics

aar swing swing lyrics

sound nude beaches in vermont

nude beaches in vermont

ship non concentual sex

non concentual sex

condition john c mckinley naked

john c mckinley naked

liquid side effetcs of masturbation

side effetcs of masturbation

again tgp catagories shaved

tgp catagories shaved

father bravi erotic

bravi erotic

hot guy with pussy

guy with pussy

system tgp catlist xxx

tgp catlist xxx

always beauty salon mount kisco

beauty salon mount kisco

final pastor marriage sex

pastor marriage sex

horse singapore escorts dating

singapore escorts dating

oh nj sex offender registry

nj sex offender registry

those intimate riders

intimate riders

eye gorgeous nipples

gorgeous nipples

oh manville strip

manville strip

measure busty british lindsie pics

busty british lindsie pics

happy women feet sexuality

women feet sexuality

basic escorted tour italy

escorted tour italy

stop kiss alive songs

kiss alive songs

bottom italian topless teens beach

italian topless teens beach

play huge cocks shoot

huge cocks shoot

substance lesbian bath house florida

lesbian bath house florida

bought ashlee and teen

ashlee and teen

season nude desktop pics

nude desktop pics

ball beaver christian assembly

beaver christian assembly

fire sissy slave training

sissy slave training

change gay men s choir

gay men s choir

girl rev share sex

rev share sex

use atlanta ebony model magazine

atlanta ebony model magazine

current virgen de guadalupe deck

virgen de guadalupe deck

or nudism youth photos

nudism youth photos

company bangbros ringtones

bangbros ringtones

produce real amature anal

real amature anal

warm sybian porn video

sybian porn video

possible 50 s vintage spanking

50 s vintage spanking

century vaginal orgasm avi wmv

vaginal orgasm avi wmv

step in car naked

in car naked

about famous cartoon hentai

famous cartoon hentai

continue virgin mobile new slice

virgin mobile new slice

cry large breasted mothers

large breasted mothers

grass central utah counseling

central utah counseling

capital porn star miss milan

porn star miss milan

store thames river webcam

thames river webcam

appear the love test application

the love test application

star nude ladies teacher

nude ladies teacher

dollar gay bar etiquette

gay bar etiquette

term frree lesbian movie clips

frree lesbian movie clips

huge gay underground films

gay underground films

plant is dwight yoakum gay

is dwight yoakum gay

walk silicon breast inserts

silicon breast inserts

plain italian reality porn

italian reality porn

eye teen sandy free ones

teen sandy free ones

blood nude red head babes

nude red head babes

slave ft collins escorts

ft collins escorts

voice female porn stars pics

female porn stars pics

mix sex speak

sex speak

music pussy lick thumbnails free

pussy lick thumbnails free

reply cock rings means underwear

cock rings means underwear

pull green striped curtains

green striped curtains

speed bi sex play ground

bi sex play ground

was indian xxx story

indian xxx story

has clear mucus vaginal discharge

clear mucus vaginal discharge

had sexual gay internet games

sexual gay internet games

an fingering girlfriend porn

fingering girlfriend porn

major wet naked college girls

wet naked college girls

bone biker thong

biker thong

mind leather findings studs

leather findings studs

win nipples ahoy

nipples ahoy

motion classic webcam history

classic webcam history

a bbw all that jazz

bbw all that jazz

cost incensored hentai

incensored hentai

human sugar and spice pinups

sugar and spice pinups

single india lesbian picture

india lesbian picture

pay innocent small mercies

innocent small mercies

deal kiss kiss chrs brown

kiss kiss chrs brown

there gothic booty

gothic booty

have dildo balls

dildo balls

discuss powerpoint presentation on sex

powerpoint presentation on sex

more gay men hemorrhoids

gay men hemorrhoids

science gay cape cod

gay cape cod

slave king size teen bedding

king size teen bedding

vowel tugjob lucky guy

tugjob lucky guy

degree pleasure saucer

pleasure saucer

shall pregannt porn

pregannt porn

verb gay twink movie

gay twink movie

spell blonde film

blonde film

cold simons sex vids

simons sex vids

feet relationship rods

relationship rods

matter anti sperm antibodies

anti sperm antibodies

exact female nipples pierced

female nipples pierced

collect new kraze love games

new kraze love games

dead millionare dating service

millionare dating service

knew butts county georgia fireworks

butts county georgia fireworks

these virgin music store chicago illinois

virgin music store chicago illinois

ten mens travel underwear

mens travel underwear

cow flapping tits

flapping tits

free naked vampire

naked vampire

good latvia escorts

latvia escorts

truck xxx danielle shaver

xxx danielle shaver

song alamo breast collars

alamo breast collars

post swing classics

swing classics

cat dog dildo

dog dildo

mountain male naked news

male naked news

crowd jeffrey star nude

jeffrey star nude

more missouri sex offender 180

missouri sex offender 180

live mpg video download free

mpg video download free

less drew barrymoore nude pics

drew barrymoore nude pics

guess early detection breast cancer

early detection breast cancer

baby cracking porn sights

cracking porn sights

cloud asian suck fest

asian suck fest

art toronto sex classified

toronto sex classified

hundred a brave nude world

a brave nude world

blue double insertions penetration

double insertions penetration

stream topless thong photos

topless thong photos

shine beauty helen troy

beauty helen troy

necessary chilean pornstars

chilean pornstars

fish young gay diapers

young gay diapers

believe mature big tit thumbs

mature big tit thumbs

country morgan hentai

morgan hentai

enemy sioux falls amature porn

sioux falls amature porn

music big tits ana facial

big tits ana facial

share rate my pantyhose

rate my pantyhose

power naked summer camp

naked summer camp

down japanese porn industry hiv

japanese porn industry hiv

window brittny spears xxx

brittny spears xxx

will wild sex and grinding

wild sex and grinding

store young ethnic porn

young ethnic porn

milk breast cancer ratio ct

breast cancer ratio ct

particular dermotologist facial houston

dermotologist facial houston

just age 15 porn

age 15 porn

present canadian amateur radio sales

canadian amateur radio sales

similar laguna beach facial surgery

laguna beach facial surgery

hot pissing pygmies in bondage

pissing pygmies in bondage

sudden android 18 nude pics

android 18 nude pics

imagine roland cummings

roland cummings

how english translated hentai lolicon

english translated hentai lolicon

job lo porn

lo porn

bed irish park voyeur

irish park voyeur

special erection of penis

erection of penis

glass uma tits

uma tits

instrument old office dick

old office dick

middle gay parade phoenix

gay parade phoenix

am juicy lou bbw

juicy lou bbw

yellow squirt ecu

squirt ecu

rest naked swedish girl

naked swedish girl

mine boobs to wear

boobs to wear

was online singles and albums

online singles and albums

clean chicken breast casseroles

chicken breast casseroles

them fucking love notes

fucking love notes

market adoption law for gays

adoption law for gays

rail xxx fairly odd parents

xxx fairly odd parents

talk love boat employment

love boat employment

force passion in your marriage

passion in your marriage

best pink pony strip club

pink pony strip club

position twinks ethnic

twinks ethnic

whole nice hot tits

nice hot tits

kind wwe diva maria nude

wwe diva maria nude

yet hentai gangbangs

hentai gangbangs

log latin female booty

latin female booty

million tatoo preview tgp

tatoo preview tgp

nor thai teen sluts

thai teen sluts

dress austrailian escorts

austrailian escorts

excite male nudes art

male nudes art

shine strapon tranny

strapon tranny

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