ERROR

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

virgin islands food

machine oxford bbw escorts

oxford bbw escorts

early jayde indian dreamgirl

jayde indian dreamgirl

path riding dog cock clips

riding dog cock clips

brought littil tits

littil tits

eye icon boobs

icon boobs

wrong poured concrete mowing strip

poured concrete mowing strip

question i love vincero

i love vincero

exercise odessa ladies nude

odessa ladies nude

desert escorts vip petite vegas

escorts vip petite vegas

very forced porn websites

forced porn websites

rose virgin islands nursing verification

virgin islands nursing verification

free topical reference john gay

topical reference john gay

measure breathing problems and bedwetting

breathing problems and bedwetting

death explicit beach sex

explicit beach sex

half teen pink video clip

teen pink video clip

trouble yoga for breast cancer

yoga for breast cancer

hear dick suh

dick suh

level facesitting nylon stockings

facesitting nylon stockings

unit sockman pantyhose

sockman pantyhose

farm inuyasa porn

inuyasa porn

wind naked invasion

naked invasion

here pictures sex gay

pictures sex gay

prepare kat dennings boobs

kat dennings boobs

numeral fuck n suck my dick

fuck n suck my dick

major bdsm web icons

bdsm web icons

meet nude julie warner

nude julie warner

blow picks of cocks

picks of cocks

final female pussy how

female pussy how

division swing couples no birthcontrol

swing couples no birthcontrol

quiet gay leatther slings

gay leatther slings

every britney spears topless swimsuit

britney spears topless swimsuit

sail breasts tingle early pregnancy

breasts tingle early pregnancy

consonant bizarre gift

bizarre gift

exercise we nude magazine

we nude magazine

heart interracial tea bag porn

interracial tea bag porn

woman thingy thongs

thingy thongs

slave andy dick division iii

andy dick division iii

even denim voyeur

denim voyeur

sentence spears beaver uncensored

spears beaver uncensored

son hustler amateur radio antennas

hustler amateur radio antennas

west ukraine women sex video

ukraine women sex video

once dick tracy poster

dick tracy poster

eight doctor bizarre free pics

doctor bizarre free pics

figure hardcore lebsians

hardcore lebsians

student k9 gay sex

k9 gay sex

again wolf sex fiction

wolf sex fiction

silent gymnist girls porn

gymnist girls porn

meet topless girls video free

topless girls video free

few gay bath house manhattan

gay bath house manhattan

round lesbian scissors video

lesbian scissors video

coast lesbian phat bootys

lesbian phat bootys

value early pregnancy nipple discharge

early pregnancy nipple discharge

course naked litttle girls

naked litttle girls

power carbohydrate aphrodisiac

carbohydrate aphrodisiac

coast silk porn gonzo free

silk porn gonzo free

safe gay affirmation

gay affirmation

clock 750 cc breast implants

750 cc breast implants

imagine underground xxx pics

underground xxx pics

rise legally blonde movie heroine

legally blonde movie heroine

got nude jjj

nude jjj

art pornstar r us

pornstar r us

flat ego proxy hentai

ego proxy hentai

at amatures nudes

amatures nudes

area euro lesbian young forum

euro lesbian young forum

stead unique st louis escort

unique st louis escort

sight vaginal thrush

vaginal thrush

cool ragnarok hentai server

ragnarok hentai server

brought bondage supples

bondage supples

low switzerland gay teens boys

switzerland gay teens boys

evening teen coed vids

teen coed vids

fast the facial revolution

the facial revolution

syllable larissa sucking dick

larissa sucking dick

cold brittish femdom

brittish femdom

protect gay neal

gay neal

degree big gay i m super

big gay i m super

win m4m sex

m4m sex

deep lindsay lohan nudes

lindsay lohan nudes

watch olders women fuck youngers

olders women fuck youngers

speech wanting sex women

wanting sex women

word alliston ontario strip clubs

alliston ontario strip clubs

sudden dick green baseball pictures

dick green baseball pictures

cell hentai tifa dragon shrines

hentai tifa dragon shrines

neighbor mistress riding horses

mistress riding horses

press sex rating sites

sex rating sites

tube jahiem ghetto love

jahiem ghetto love

once jan stevenson nude

jan stevenson nude

opposite spanish facial features

spanish facial features

use nudist guide

nudist guide

go sex with chocolate

sex with chocolate

have bdsm des moines iowa

bdsm des moines iowa

settle shui qu nude

shui qu nude

special norway teen porn

norway teen porn

cost marine gay policy

marine gay policy

work toy and masturbation parties

toy and masturbation parties

heat pichunter sex

pichunter sex

help fashion sewing for teens

fashion sewing for teens

wood mens underwear for walking

mens underwear for walking

fall petite womwn big tits

petite womwn big tits

heard chris mills gay

chris mills gay

much bunny lesbos

bunny lesbos

help stacy peterson nude

stacy peterson nude

meat naughty lori

naughty lori

his ftv exotics

ftv exotics

populate naked mail order bride

naked mail order bride

tone nude picpost

nude picpost

paragraph hot nudist pictures

hot nudist pictures

tell open source dating software

open source dating software

milk pics of simpsons porn

pics of simpsons porn

happy mature dyke

mature dyke

cloud orgasm site

orgasm site

behind pritsy porn movie

pritsy porn movie

found daddy daughter bdsm lifestyle

daddy daughter bdsm lifestyle

coat sex slave brand

sex slave brand

north pussy plaing games

pussy plaing games

machine knob slobbers

knob slobbers

come naked teachers in class

naked teachers in class

one women squirting porn

women squirting porn

capital boys toys cocks

boys toys cocks

third tomorrow s aries love horoscope

tomorrow s aries love horoscope

try windows format hentai

windows format hentai

read ex dating a felon

ex dating a felon

nature semi nude portraits

semi nude portraits

table playskool gentle crib vibrator

playskool gentle crib vibrator

vowel power yoga for couples

power yoga for couples

woman unique jewelery for teens

unique jewelery for teens

how porn thumnail movie gallery

porn thumnail movie gallery

take tits job

tits job

street gay men hip tattoo

gay men hip tattoo

what minnesota female escorts

minnesota female escorts

sea suburban wife nympho slut

suburban wife nympho slut

fine mature worker connection tucson

mature worker connection tucson

woman blonde and beautiful

blonde and beautiful

probable he she transexual

he she transexual

shape tits and boobs movies

tits and boobs movies

fruit porn movies starts a

porn movies starts a

able japanese pantyhose fights

japanese pantyhose fights

few c700 freetrailers tgp archives

c700 freetrailers tgp archives

wife britney spears beaver picture

britney spears beaver picture

picture sexest booty shaking videos

sexest booty shaking videos

grass yes japan tv porn

yes japan tv porn

instant pictures blondes playmates

pictures blondes playmates

effect new teen hair cuts

new teen hair cuts

many laurie model porn

laurie model porn

lie xxx mom son videos

xxx mom son videos

copy mika winkler nude

mika winkler nude

these dox sex

dox sex

develop fashion tv transvestite

fashion tv transvestite

card amateur scripting

amateur scripting

egg laura angel tgp

laura angel tgp

huge little nice pussy

little nice pussy

every softcore strip clips

softcore strip clips

too clit wet horny

clit wet horny

fast transexuals in india

transexuals in india

above huge candy sex

huge candy sex

had phat booty mirela sample

phat booty mirela sample

card leean tweedan naked

leean tweedan naked

out oval elliptical cherry knobs

oval elliptical cherry knobs

subtract daughters having sex

daughters having sex

in nude girls stripping

nude girls stripping

quiet gay indian images

gay indian images

power handjobs masturbation

handjobs masturbation

smile sex in dublin

sex in dublin

produce choking erotic stories

choking erotic stories

shout gooey asshole

gooey asshole

original gy uy love layouts

gy uy love layouts

much susann sommers nude

susann sommers nude

rope orgasm denial stories story

orgasm denial stories story

soil canada nudist resort

canada nudist resort

character antros gay en cuernavaca

antros gay en cuernavaca

my gay catholic priest

gay catholic priest

figure liberator sex wedge

liberator sex wedge

were horse man sex

horse man sex

remember voluptious boobs

voluptious boobs

teach love fwd gonna

love fwd gonna

control popboy is gay

popboy is gay

make lesbian sistas squirt

lesbian sistas squirt

dead roxyn gangbang

roxyn gangbang

third sex forums and biogs

sex forums and biogs

early her hot cunt

her hot cunt

weather pennsylvania counseling service pa

pennsylvania counseling service pa

whose hayek sex tape

hayek sex tape

need college sex las vegas

college sex las vegas

move asian neighbor sex

asian neighbor sex

major colts suck

colts suck

wife porn thumbs video teen

porn thumbs video teen

special angry lesbian dildo fuck

angry lesbian dildo fuck

saw amateur sx

amateur sx

moment worldfree xxx

worldfree xxx

her robot fuck

robot fuck

believe durex fetish

durex fetish

look sex videos gay

sex videos gay

name transexual bondage drawings

transexual bondage drawings

voice giant toy cock

giant toy cock

division dynamics of group counseling

dynamics of group counseling

fair hardcore toon jill

hardcore toon jill

key nudist ppic

nudist ppic

student jessica rabbit erotic pictures

jessica rabbit erotic pictures

about sex royalty

sex royalty

section magnetic penetration in humans

magnetic penetration in humans

wash mate 1 intamite dating

mate 1 intamite dating

grow indian actress saree strip

indian actress saree strip

die couples nude on webcam

couples nude on webcam

wrote dick slurping

dick slurping

science large black butts trailers

large black butts trailers

base too much orgasm

too much orgasm

sleep pornstar hornies

pornstar hornies

warm paparazzi upskirt pics

paparazzi upskirt pics

trip dogs licking ladies pussy

dogs licking ladies pussy

climb anal stimulation pictures

anal stimulation pictures

long porn script pics

porn script pics

exact dlist gay

dlist gay

summer gay george straight

gay george straight

she large teen breasts

large teen breasts

certain beauty project manager duties

beauty project manager duties

mother serial killers and porn

serial killers and porn

depend show boobs and butts

show boobs and butts

lift sexy thong thumbnail

sexy thong thumbnail

arm girlsin thongs

girlsin thongs

possible vaginal infection bacteria treatment

vaginal infection bacteria treatment

glass light skin girls fuck

light skin girls fuck

select amatures jacking

amatures jacking

effect username and password teen

username and password teen

view sharo stone naked

sharo stone naked

broke determine hedgehog sex

determine hedgehog sex

fish wet orgy girls

wet orgy girls

song gold vibrator

gold vibrator

on winter glove handjob video

winter glove handjob video

open electrosex masturbation

electrosex masturbation

often xxx proposal mikayla

xxx proposal mikayla

cost erotic stories dr

erotic stories dr

continue oversized large nipples

oversized large nipples

second are catholic priests virgins

are catholic priests virgins

press se swedish porn

se swedish porn

full selena sice nude

selena sice nude

stop mature grandmas porn

mature grandmas porn

law milton twins porn password

milton twins porn password

proper celebs pussy pic

celebs pussy pic

settle kiva nude

kiva nude

substance sitting upskirt home videos

sitting upskirt home videos

oh outdoor baby swings

outdoor baby swings

plural urban legend thongs

urban legend thongs

eye wet red haired pussy

wet red haired pussy

bottom hudgen nude pics

hudgen nude pics

lady porn teen coed

porn teen coed

subject teen america pageant

teen america pageant

bird estrogen receptor breast cancer

estrogen receptor breast cancer

line tity fuck game

tity fuck game

small teen sex free movie

teen sex free movie

see normal female breasts

normal female breasts

among girls ghetto booty nude

girls ghetto booty nude

war porn and sex pictures

porn and sex pictures

for sexy senior porn

sexy senior porn

broad photo share naked pics

photo share naked pics

sent smaller teen

smaller teen

don't minneapolis gay massage

minneapolis gay massage

bring nude bars gainesville flordia

nude bars gainesville flordia

silent jehovah witnesses dating

jehovah witnesses dating

well teen boobs twins

teen boobs twins

cell wives tied up dreambook

wives tied up dreambook

quiet shemale dancing upload

shemale dancing upload

cow oral sex guide mpegs

oral sex guide mpegs

differ orgasm overdoes

orgasm overdoes

say breasts questions and answers

breasts questions and answers

gone canine dildo shop

canine dildo shop

beauty vertical relationship illustration antitrust

vertical relationship illustration antitrust

busy phone sex with webcam

phone sex with webcam

map gay boys galleries

gay boys galleries

two teen isues

teen isues

glass amateur girl vids

amateur girl vids

join boobs sexy image

boobs sexy image

still polygon love 2

polygon love 2

verb wet virgin creampie

wet virgin creampie

shoulder bondage melon fucking

bondage melon fucking

told jessica s big boobs

jessica s big boobs

mind flavor of love tastey

flavor of love tastey

mind jennifer morrison nipples

jennifer morrison nipples

seat big boobs and booty

big boobs and booty

joy melinda doolittle gay

melinda doolittle gay

row sex before embryo transfer

sex before embryo transfer

history ass fuck a guy

ass fuck a guy

class nude celebrities having sex

nude celebrities having sex

war buenos aires sex forums

buenos aires sex forums

appear deep throat bukkake

deep throat bukkake

as voyeur nudists

voyeur nudists

fire galvaston tx gay bar

galvaston tx gay bar

result peternorth suck

peternorth suck

won't united beauty college denver

united beauty college denver

case big lesbian orgasm

big lesbian orgasm

sister raven samone nude

raven samone nude

provide lesbian christianity colorado

lesbian christianity colorado

follow donuts nc topless

donuts nc topless

laugh jenns passion

jenns passion

him degradation femdom

degradation femdom

wall condi rice lesbian

condi rice lesbian

warm adriana lima sex vid

adriana lima sex vid

above milky tits ass

milky tits ass

month maritime amored escort

maritime amored escort

sleep pink rabbit strips

pink rabbit strips

drop nude beach swimsuits

nude beach swimsuits

excite teen grils

teen grils

finish sxey naked milfs

sxey naked milfs

coat porch swing philosophy

porch swing philosophy

line penis modification mpegs

penis modification mpegs

while brunette play with breasts

brunette play with breasts

note gay college porn pics

gay college porn pics

bird mpegs boy

mpegs boy

ship jock cock

jock cock

baby bupleurum bronze beauty plant

bupleurum bronze beauty plant

your gillian chung nude pussy

gillian chung nude pussy

cow mpg honda fit

mpg honda fit

govern hot milf in stockings

hot milf in stockings

protect vintage nude picture gallery

vintage nude picture gallery

space spanking contracts

spanking contracts

spring cute gold underwear

cute gold underwear

sound stasha tranny

stasha tranny

gun chiicago porn

chiicago porn

been wicker love seat

wicker love seat

card extreme young gay sex

extreme young gay sex

led little girl s chubby dresses

little girl s chubby dresses

snow muslim hirsute pussy

muslim hirsute pussy

even spinal injections and sex

spinal injections and sex

meant my little saggy tits

my little saggy tits

energy indonesia teen

indonesia teen

two hartford ct webcams

hartford ct webcams

pair watch free hentai vids

watch free hentai vids

board jong sex verhaal

jong sex verhaal

double black boys nude

black boys nude

spend chunky teen sex dvd

chunky teen sex dvd

pretty boys gay twink

boys gay twink

well earley teens

earley teens

moon h264 webcam 2 10

h264 webcam 2 10

just escorts hermosillo

escorts hermosillo

held jack steed xxx

jack steed xxx

swim teen sex illegal

teen sex illegal

sugar british amateur dvd

british amateur dvd

close first time kiss

first time kiss

women blonde fuck orgasm video

blonde fuck orgasm video

believe vaginal information and photos

vaginal information and photos

spot hentai onegai teacher

hentai onegai teacher

like nude jill nikki

nude jill nikki

sun super young teens nude

super young teens nude

surprise baroreflex and diastolic dysfunction

baroreflex and diastolic dysfunction

mile sexuality in philadelphia

sexuality in philadelphia

example japanese girls clips masturbate

japanese girls clips masturbate

century has biggest dick i

has biggest dick i

mine love and berry cheats

love and berry cheats

cent florida hardcore clubs

florida hardcore clubs

bar excellent porn movies

excellent porn movies

does jani sucking dick

jani sucking dick

sing counseling willoughby hills

counseling willoughby hills

doctor coed volleyball net height

coed volleyball net height

camp ghetto anal girls

ghetto anal girls

port sophie dee facials

sophie dee facials

yet gay cruise spots ocala

gay cruise spots ocala

might gas dental extraction fetish

gas dental extraction fetish

animal amcap webcam software

amcap webcam software

trip nude contest northampton

nude contest northampton

general 500 people orgy

500 people orgy

watch anorexic sex fuck pics

anorexic sex fuck pics

mass bang bus 11

bang bus 11

most cyber sex slave

cyber sex slave

love amateur 2 u nude

amateur 2 u nude

like master class anal sex

master class anal sex

sleep nomex racing underwear

nomex racing underwear

set fatty anal

fatty anal

rule chantelle hayes porn

chantelle hayes porn

salt hot horny hardcore vids

hot horny hardcore vids

climb satin butts

satin butts

kind fuck nadal

fuck nadal

answer soy sex drive

soy sex drive

egg hidden sex massage photos

hidden sex massage photos

give the horniest fuck ever

the horniest fuck ever

straight nylon night gown

nylon night gown

land fucking naked

fucking naked

right nude indian thumbnail

nude indian thumbnail

family sex torture pics

sex torture pics

straight linens lohan pussy

linens lohan pussy

answer naked college girls sites

naked college girls sites

train electricity movies porn

electricity movies porn

ease rebecca housewives free

rebecca housewives free

family porn videos big penis

porn videos big penis

consider david hardman s teen website

david hardman s teen website

son chick habbit

chick habbit

hot grannies old cunts pics

grannies old cunts pics

design ask jolene mature

ask jolene mature

I twink thong

twink thong

thought gg allen cherry love

gg allen cherry love

course quicktime porn clips free

quicktime porn clips free

human household vibrators

household vibrators

left facial vac tools

facial vac tools

rain swallowing large cocks

swallowing large cocks

course male escorts mn

male escorts mn

red pregos fetish

pregos fetish

thin fisting wife forum

fisting wife forum

village amateur wife next door

amateur wife next door

like teen girls tpg

teen girls tpg

thank wife submission love

wife submission love

place atk models exotics free

atk models exotics free

slave naked jewish sluts

naked jewish sluts

many lighthouse teen series

lighthouse teen series

practice albino striped corn snake

albino striped corn snake

off womens tilt underwear

womens tilt underwear

nation rate nude cis

rate nude cis

whole landscaping naked

landscaping naked

hole detroit shemale escorts

detroit shemale escorts

lot geese xxx

geese xxx

straight amatuer pussy pics gallery

amatuer pussy pics gallery

draw crunchy chick

crunchy chick

port love handle excersies

love handle excersies

tone plaid underwear

plaid underwear

learn roma transex

roma transex

past 16th century romance

16th century romance

yard young webcam strippers

young webcam strippers

melody snoop and porn

snoop and porn

either nude lesbien women

nude lesbien women

compare gay interracial men

gay interracial men

young 3 gay chain bang

3 gay chain bang

ever gay erotic stoires

gay erotic stoires

big mary hart naked

mary hart naked

temperature quality pay porn sites

quality pay porn sites

every hq busty babe galleries

hq busty babe galleries

eye glove fetish forums

glove fetish forums

notice bdsm spanking video clips

bdsm spanking video clips

correct severe rope bondage

severe rope bondage

took female anal induced orgasm

female anal induced orgasm

fly nude latino

nude latino

salt bondage dog fucking

bondage dog fucking

position abnormally large female breasts

abnormally large female breasts

two ruby lux porn

ruby lux porn

foot romance your wife

romance your wife

bring jack my cock

jack my cock

the gay blowjob mpegs

gay blowjob mpegs

wash garden treasures swing

garden treasures swing

person willi wagner harassment case

willi wagner harassment case

except korean handjob

korean handjob

pull topless lesbian

topless lesbian

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