ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
jay s reality porn

jay s reality porn

common anna nicoles breast

anna nicoles breast

told marlos beauty supplys

marlos beauty supplys

wrote teen furnitures

teen furnitures

gun club pinups atl

club pinups atl

sheet lesbian fingering video

lesbian fingering video

have pleasure palace

pleasure palace

sat asin in nude

asin in nude

him robert mapplethorpe fist fuck

robert mapplethorpe fist fuck

what jasmine gold nude

jasmine gold nude

chord erotic photo girlfriend

erotic photo girlfriend

favor hot sexy mature seniors

hot sexy mature seniors

back nude picks with weed

nude picks with weed

element sexual harassment work environment

sexual harassment work environment

degree kiteboard videos mpg

kiteboard videos mpg

water straight jerking off

straight jerking off

low amateur electronics supply milwaukee

amateur electronics supply milwaukee

age co ed peeing contests

co ed peeing contests

rub melbourne sex club au

melbourne sex club au

determine bdsm stories shemale

bdsm stories shemale

arrange euro sex films

euro sex films

horse not legal porn

not legal porn

weather portugal online dating

portugal online dating

five pornstar list female

pornstar list female

natural actress hilary swank nude

actress hilary swank nude

plural very naughty quotes

very naughty quotes

arrive electo sex toys

electo sex toys

insect morgan tits

morgan tits

gave hairless young boy gay

hairless young boy gay

love sexuality and age

sexuality and age

land disposible teens interview

disposible teens interview

method erotic videos mega

erotic videos mega

path blowjob girls fuck

blowjob girls fuck

men nasty movie madness

nasty movie madness

thank twat squirts

twat squirts

particular da brats pussy

da brats pussy

yellow maria kirilenko nude

maria kirilenko nude

learn teen fan club

teen fan club

shall sex speak

sex speak

sit wives exchange

wives exchange

her washington strip club

washington strip club

where famous gay porno stars

famous gay porno stars

warm quite vibrator

quite vibrator

measure abnormal vaginal clot bleeding

abnormal vaginal clot bleeding

piece trish coren naked

trish coren naked

nation dick cheney s shooting

dick cheney s shooting

caught tera reid nude photo

tera reid nude photo

told prison passion

prison passion

glass gay models movie

gay models movie

surprise man dog xxx

man dog xxx

state ilove big black booty

ilove big black booty

all windy upskirt

windy upskirt

charge gay bars in winnipeg

gay bars in winnipeg

after nude men phots

nude men phots

art pitures of nude women

pitures of nude women

century nhra drag strips ne

nhra drag strips ne

excite teen xxx vietnam

teen xxx vietnam

is morrocan girls webcam sex

morrocan girls webcam sex

sail nude photo wine

nude photo wine

system onling strip games

onling strip games

don't live male webcams

live male webcams

depend punta cana nudity

punta cana nudity

pretty blond jokes about underwear

blond jokes about underwear

raise masculin gay porn

masculin gay porn

imagine amateur porn file upload

amateur porn file upload

list brick lace wicked love

brick lace wicked love

difficult mature moms sex boys

mature moms sex boys

require true blue hentai megaupload

true blue hentai megaupload

chief nude slayers

nude slayers

vary seattle dating over 50

seattle dating over 50

good proper baseball swing

proper baseball swing

star beauty pageant blunders video

beauty pageant blunders video

could london male nude

london male nude

knew xxx adult discussion

xxx adult discussion

mouth expectant teen fathers

expectant teen fathers

hundred tgp gay boy

tgp gay boy

a movie about blonde cavemen

movie about blonde cavemen

mount japenese girls huge tits

japenese girls huge tits

probable yumy porn pictures

yumy porn pictures

single webcam girl boobs

webcam girl boobs

neck enhanced entity relationship mode

enhanced entity relationship mode

moment maritza mature latina

maritza mature latina

voice pictures masturbation

pictures masturbation

represent girls donkey sex

girls donkey sex

even violent sex fanatsy

violent sex fanatsy

gone femdom seduce boss stories

femdom seduce boss stories

discuss new yorker spanking merkin

new yorker spanking merkin

cloud sex photographs

sex photographs

death naked twins being tested

naked twins being tested

that white fetish shoes

white fetish shoes

property sophia bush nude pics

sophia bush nude pics

huge extra large breasts model

extra large breasts model

village mature lesbian pictures

mature lesbian pictures

love cock swimsuit

cock swimsuit

fire kendra wilkison nude

kendra wilkison nude

distant loas webcam software driver

loas webcam software driver

art big tits apple bottoms

big tits apple bottoms

magnet surf girls porn

surf girls porn

flow celebrity hot couples

celebrity hot couples

law sex toy store locator

sex toy store locator

throw britney spears in underwear

britney spears in underwear

develop fisting farmers 9

fisting farmers 9

repeat nudism nudist pictures young

nudism nudist pictures young

start girls peeing in mouth

girls peeing in mouth

oh breast reconstruction surgery edema

breast reconstruction surgery edema

select hentai game porn

hentai game porn

blue mature massage dorset

mature massage dorset

brought black pornstar directory

black pornstar directory

their slut skirt porn

slut skirt porn

paper teen fuck horse

teen fuck horse

poor cock piece

cock piece

support darah nude

darah nude

move mtrtle beach entertainment hotties

mtrtle beach entertainment hotties

saw garde a pussy

garde a pussy

share erotic movie intelligent

erotic movie intelligent

dead upskirt exposed

upskirt exposed

decimal tgp amputee sex

tgp amputee sex

sent beijing tits

beijing tits

were zeus s wives pictures

zeus s wives pictures

support brutal breast torture

brutal breast torture

leg copulins transgender

copulins transgender

show under 18 tgp

under 18 tgp

same cavity search video porn

cavity search video porn

what breasts creams

breasts creams

arrive peter s erection page

peter s erection page

poem pokemon porn animations

pokemon porn animations

sleep stolen nude

stolen nude

material bloody cunt tits pics

bloody cunt tits pics

wall michelle cummings trinidad

michelle cummings trinidad

danger butt finger foreplay

butt finger foreplay

hill iranian sex web sait

iranian sex web sait

possible amateur female ejaculation

amateur female ejaculation

skill caribbean love poem

caribbean love poem

season amateur handjob videos free

amateur handjob videos free

several nude milking momms

nude milking momms

gave babes boobies

babes boobies

plant bad parent child relationship

bad parent child relationship

city missouri defense harassment

missouri defense harassment

suit fuck movie clips

fuck movie clips

lone virgin daughter

virgin daughter

play chiks in lingerie

chiks in lingerie

mine boots sluts

boots sluts

evening bet strip

bet strip

iron anal destruction movie galleries

anal destruction movie galleries

phrase ebony ass fuck trailer

ebony ass fuck trailer

fig couples matching christmas sweaters

couples matching christmas sweaters

syllable slut gallery pictures pennsylvania

slut gallery pictures pennsylvania

pretty elmira mistress

elmira mistress

world mpg files cause dep

mpg files cause dep

month sperm clumping

sperm clumping

describe jitterbug swing tab

jitterbug swing tab

field sex personals brandenburg ky

sex personals brandenburg ky

force hardcore free gay cams

hardcore free gay cams

tube sex horse with girl

sex horse with girl

half mature fucking and sucking

mature fucking and sucking

roll stewerdess sex pics

stewerdess sex pics

street mature skirt

mature skirt

miss boots and cocks

boots and cocks

slip dating eddie izzard

dating eddie izzard

rather nylon lingerie uk

nylon lingerie uk

tail old wives tales portland

old wives tales portland

dog elderly tgp

elderly tgp

has horny ass fucking sluts

horny ass fucking sluts

coat horny greek

horny greek

shoe sexy horny babes

sexy horny babes

follow pantyhose women pantyhose

pantyhose women pantyhose

horse misty hentai pics

misty hentai pics

group mixed couples hollywood

mixed couples hollywood

decide girls who give footjobs

girls who give footjobs

success singles in france

singles in france

skill female foreplay pics

female foreplay pics

new exclusive singles holidays cruises

exclusive singles holidays cruises

set gay group masterbating

gay group masterbating

bank gay semen swallow

gay semen swallow

experience sexy erotic womens

sexy erotic womens

speech sex with least fertility

sex with least fertility

hot catherine mcphee porn

catherine mcphee porn

test breast fondling gallery

breast fondling gallery

surprise bi women dating

bi women dating

cover fat dildo

fat dildo

story mens underwear lon waisted

mens underwear lon waisted

dead tits over bra

tits over bra

young castrated transexual

castrated transexual

include legs nylons women

legs nylons women

stream j lo booty pics

j lo booty pics

stick adult dating web cam

adult dating web cam

than mother busty rubbing

mother busty rubbing

interest nude girls of acapulco

nude girls of acapulco

sound drew allen porn

drew allen porn

agree erotic sex machine

erotic sex machine

friend dating a fighter

dating a fighter

possible rectal insertions

rectal insertions

gun 18 teen pics

18 teen pics

behind pete wntz nude

pete wntz nude

sea rocsi naked picture

rocsi naked picture

five katsumi xxx

katsumi xxx

face bear hunter sex

bear hunter sex

where teen chatroo

teen chatroo

long portsmouth independent escort

portsmouth independent escort

have personal photos topless

personal photos topless

meant slut alert

slut alert

against sissy hubby maid cought

sissy hubby maid cought

after windy blown upskirt

windy blown upskirt

shore nude photos hawaiian woman

nude photos hawaiian woman

west forbidden pussy

forbidden pussy

dry scott stapp sex video

scott stapp sex video

mount gay escorts

gay escorts

process muscler female xxx

muscler female xxx

clock high definition bouncing booties

high definition bouncing booties

spot busty gir s clips

busty gir s clips

exact twisted sexy sensual clothing

twisted sexy sensual clothing

hour nude cartoon 3d

nude cartoon 3d

beauty sex anal video

sex anal video

I patio bench swing

patio bench swing

lady the naked voice

the naked voice

wife latina sluts porn

latina sluts porn

rather gay y blasco

gay y blasco

nor winnie westergard

winnie westergard

lady offspring sex determination

offspring sex determination

sentence avatar in chatrooms

avatar in chatrooms

subtract japaneseschool girl porn

japaneseschool girl porn

good facial resurfacing

facial resurfacing

off arctic symbiotic relationships

arctic symbiotic relationships

grew nude womem with tattoos

nude womem with tattoos

bad brutal pussy insertions

brutal pussy insertions

lake cowgirl nude pics

cowgirl nude pics

open michale waltrip gay

michale waltrip gay

beauty american hi fi free sex

american hi fi free sex

cow asian gay movies

asian gay movies

person sexy teens exercising

sexy teens exercising

every teen reading list

teen reading list

solve picasso wetsuits

picasso wetsuits

wood reba mcintyre breast

reba mcintyre breast

clothe 16 boobs

16 boobs

energy brunette cock suckers

brunette cock suckers

woman hidden xxx cams

hidden xxx cams

knew nude girls mudwrestling

nude girls mudwrestling

came sean willian scott nude

sean willian scott nude

tool xl tojan condom

xl tojan condom

grow erotic ebook

erotic ebook

product white girl whores

white girl whores

home gay lesbian nursing home

gay lesbian nursing home

sleep wife first fuck

wife first fuck

fill erotic q gallery

erotic q gallery

choose sheer tgp movie

sheer tgp movie

expect brazilian teen gallereis

brazilian teen gallereis

window fun underwear for men

fun underwear for men

chart aspergers teens

aspergers teens

fast dick ripley

dick ripley

very bird swings

bird swings

part prolong sex contractions

prolong sex contractions

team physical problems ejaculation

physical problems ejaculation

pay girdle sissy

girdle sissy

keep nude kirstin dunst

nude kirstin dunst

path jenna jameson lesbian galleries

jenna jameson lesbian galleries

mix trailblazer swing set

trailblazer swing set

floor british amateur satellite watcher

british amateur satellite watcher

even male sex cycle

male sex cycle

white ciggerette nudes

ciggerette nudes

create shape the swing

shape the swing

force thistletown sex offenders

thistletown sex offenders

see jada juggs pornstar

jada juggs pornstar

note portland oregon drag strip

portland oregon drag strip

wing rapidshare naked mile hd

rapidshare naked mile hd

reply sex during labour

sex during labour

parent huge anal gape plug

huge anal gape plug

set hogtied sex and submission

hogtied sex and submission

fell fake nude pics celebs

fake nude pics celebs

east punishment day spanking

punishment day spanking

yes vampires sex lesbians

vampires sex lesbians

like young sex creampie

young sex creampie

poem teen lingerie model portfolios

teen lingerie model portfolios

danger portuguese escorts

portuguese escorts

science solange porn

solange porn

perhaps dick campground colorado

dick campground colorado

fall carla bruni in nude

carla bruni in nude

experiment american mature babes

american mature babes

camp gay sexer

gay sexer

keep real virgin fuck video

real virgin fuck video

consonant acting games for teens

acting games for teens

rope nas ether fuck jayz

nas ether fuck jayz

wide vaginal form

vaginal form

sheet porn traliers

porn traliers

have teen responsibilities curfew

teen responsibilities curfew

fire babex porn

babex porn

sun meaning of frigid

meaning of frigid

are plump babe sex pron

plump babe sex pron

train bizarre scary video

bizarre scary video

ease tequnice to control ejaculations

tequnice to control ejaculations

tool world muslim classified personals

world muslim classified personals

pull gay bath house guide

gay bath house guide

visit fucked latina girls

fucked latina girls

simple pajama sex sleeping pics

pajama sex sleeping pics

she asian cumshot pics

asian cumshot pics

depend epic movie sex

epic movie sex

sugar 100 amateurs from poland

100 amateurs from poland

knew lesbians finger banging

lesbians finger banging

with eindhoven sex

eindhoven sex

observe bbw thumbnail sites

bbw thumbnail sites

fact milton fl escort

milton fl escort

call femdom personal ads

femdom personal ads

hear alien with three breasts

alien with three breasts

come amanda loves cock

amanda loves cock

street mai shiranui xxx

mai shiranui xxx

prove highest paid teen salary

highest paid teen salary

field 10 min porn clips

10 min porn clips

page dissertation breast cancer

dissertation breast cancer

rain penthouse letters spanking

penthouse letters spanking

quick mature fucking tits

mature fucking tits

plant jane danson nude

jane danson nude

fraction gay dvd teacher

gay dvd teacher

age crossdressing blowjob

crossdressing blowjob

busy horse cocks asians

horse cocks asians

cent pie face fetish

pie face fetish

original unrated naked mile

unrated naked mile

earth hardcore asian bdsm

hardcore asian bdsm

still teen lesbian porn stars

teen lesbian porn stars

slip boys teen shaved penis

boys teen shaved penis

step dogfart mpegs

dogfart mpegs

rose jelena jennson nude

jelena jennson nude

eye anal strep

anal strep

she girls butt naked pics

girls butt naked pics

leave sex onstage

sex onstage

broad teen titles

teen titles

said homemade chick feed

homemade chick feed

truck nudist in bloomington illinois

nudist in bloomington illinois

element sex raep

sex raep

two newbies xrated

newbies xrated

brought marital counseling grandbury tx

marital counseling grandbury tx

order eve s pussy pics

eve s pussy pics

sky buff cock pics

buff cock pics

smile gay dads stories

gay dads stories

why mila kunis nude fake

mila kunis nude fake

quiet sample mpeg nude

sample mpeg nude

fly korean mother s facial scrub

korean mother s facial scrub

determine nude hot sexy forums

nude hot sexy forums

motion fantastic boobs

fantastic boobs

space african dating cultures

african dating cultures

man staci teen models

staci teen models

fair beaver west virginia

beaver west virginia

common first annual kiss coffehouse

first annual kiss coffehouse

jump independant escort galway ireland

independant escort galway ireland

about climbing a pole orgasm

climbing a pole orgasm

select erotic sex in cars

erotic sex in cars

above gay spem collecting

gay spem collecting

his main bang carr

main bang carr

stop muslim sex gallery

muslim sex gallery

speed erotic stories swap

erotic stories swap

it busty japanese women

busty japanese women

slave totally free teen pics

totally free teen pics

segment leaking breasts menopause

leaking breasts menopause

meet spears naked pictures

spears naked pictures

the dolphin kisses

dolphin kisses

major capital punishment innocent victims

capital punishment innocent victims

value armor breast sca

armor breast sca

those playgirl shower soother vibrator

playgirl shower soother vibrator

fruit pnties teen

pnties teen

deep candid sex photography

candid sex photography

rail kaley couco naked

kaley couco naked

there bdsm action sex

bdsm action sex

train gay directoies

gay directoies

carry chocolate kiss cookie

chocolate kiss cookie

choose asian sensual massage clips

asian sensual massage clips

gold hentai polm

hentai polm

require amateur australian

amateur australian

evening healthy sex teaching resources

healthy sex teaching resources

eat female dominates male bdsm

female dominates male bdsm

poem xxx amaetur video

xxx amaetur video

difficult hot women sex video

hot women sex video

middle ford escort broken spring

ford escort broken spring

consonant meadows beaver mcleod mt

meadows beaver mcleod mt

very priestley topless

priestley topless

often sexy solo sluts max

sexy solo sluts max

weight shai sex

shai sex

city ies breast cancer

ies breast cancer

proper masturbation stores

masturbation stores

west big nude butts

big nude butts

blood jasminekiss webcam girl

jasminekiss webcam girl

afraid fuck little asian girls

fuck little asian girls

use milkshake bbw

milkshake bbw

far sex with dogs illegal

sex with dogs illegal

are brunette cock suckers

brunette cock suckers

top panties and nylons upskirt

panties and nylons upskirt

beat fantasy fest sex

fantasy fest sex

her transvestite with teddy pendergrass

transvestite with teddy pendergrass

center pastoral counseling cincinnati

pastoral counseling cincinnati

guide shemales asian

shemales asian

state ashley enyart nude

ashley enyart nude

try passions sheridan

passions sheridan

ask hot housewife clips

hot housewife clips

name deepthroat monster cock

deepthroat monster cock

length jenifer ellison pussy

jenifer ellison pussy

settle peeing facial

peeing facial

until dominican teen girls fucking

dominican teen girls fucking

big gushing squirting female

gushing squirting female

differ woman fucks snake

woman fucks snake

observe facial blood accumulation

facial blood accumulation

strange lena fisting

lena fisting

open horney asian teen pussy

horney asian teen pussy

substance sexy topless video

sexy topless video

letter vagina holes

vagina holes

exercise horseback sex

horseback sex

history triumph motorcycles naked

triumph motorcycles naked

test nude glamour beach

nude glamour beach

ago boat gang bang xxx

boat gang bang xxx

sand subliminal sex tapes

subliminal sex tapes

vowel spa facial massage steps

spa facial massage steps

until world record dildo

world record dildo

set winona ryder blonde

winona ryder blonde

possible cheats for strip hangman

cheats for strip hangman

person what is multicultural counseling

what is multicultural counseling

twenty heshes nude

heshes nude

capital gay turkey

gay turkey

salt mature pantyhose chubby

mature pantyhose chubby

appear fuck my wife s daughter

fuck my wife s daughter

run china sex shanghai

china sex shanghai

during stillwater escort

stillwater escort

send interactive sex slaves

interactive sex slaves

describe breast feeding lactation enhancement

breast feeding lactation enhancement

believe fucked on her knees

fucked on her knees

rest plain jane voyeur

plain jane voyeur

neighbor eve sex tape free

eve sex tape free

decide gay doggy style

gay doggy style

what swing club uk

swing club uk

how teen suicide webquests

teen suicide webquests

as bill ward tranny cartoons

bill ward tranny cartoons

though ass tittys lyrics

ass tittys lyrics

heat sex and weight loss

sex and weight loss

neighbor buy sperm shipped

buy sperm shipped

board samantha g porn star

samantha g porn star

see naked teen pupils

naked teen pupils

south panda movies pron

panda movies pron

quart sandra scott porn star

sandra scott porn star

stream teens handjob videos movies

teens handjob videos movies

gentle brazil orgy megaupload

brazil orgy megaupload

rather breast tissue calcifications

breast tissue calcifications

three sex manuals for women

sex manuals for women

verb powell wyoming webcam

powell wyoming webcam

board dick richards silver toren

dick richards silver toren

person glenmuir high nude photos

glenmuir high nude photos

old asian sex facials

asian sex facials

wide ups girls naked

ups girls naked

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