ERROR

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

amateur viral video

boy video gang bang free

video gang bang free

cut milfs streaming videos free

milfs streaming videos free

process nipple suck video

nipple suck video

but breasts producing milk

breasts producing milk

winter xxx nasty dirty whores

xxx nasty dirty whores

don't mistress diamond vero beach

mistress diamond vero beach

behind bloodrain nude

bloodrain nude

land new blood porn angel

new blood porn angel

cold my moms nude pics

my moms nude pics

thank dungoen orgy

dungoen orgy

went lets meet online dating

lets meet online dating

mouth mistress devon

mistress devon

skin aarp sucks

aarp sucks

always double ended anal

double ended anal

does diaper fetish fiction

diaper fetish fiction

count endless love movie thumbnails

endless love movie thumbnails

long black porn webs

black porn webs

reason satallite of love

satallite of love

success military officer nude

military officer nude

throw thai love beads

thai love beads

stood exhibitionist pic swinger

exhibitionist pic swinger

especially visayan love quotes

visayan love quotes

hair sex fourm kelly

sex fourm kelly

was girl sucking two cocks

girl sucking two cocks

neck teen girls sucking fucking

teen girls sucking fucking

long cameron diaz s booty

cameron diaz s booty

look teen jobs albany ny

teen jobs albany ny

shout innocent yong models

innocent yong models

mouth str8 jerking

str8 jerking

morning latinas culos

latinas culos

populate whitney houston sweet love

whitney houston sweet love

step watching porn safely

watching porn safely

view hidden videos nude

hidden videos nude

century anal bead use

anal bead use

friend nude adult wife veu

nude adult wife veu

current teen pink video jana

teen pink video jana

where screaming anal

screaming anal

space sin city twinks

sin city twinks

simple e glass sex toys

e glass sex toys

shore nasty doctor s gyno exam

nasty doctor s gyno exam

lot chelsea ur3 ass pussy

chelsea ur3 ass pussy

wheel new brunswick nude women

new brunswick nude women

up tranny sex clips online

tranny sex clips online

small petite teen thumb

petite teen thumb

division american idal naked

american idal naked

trip pettycoat sissy

pettycoat sissy

current platinum plus topless donuts

platinum plus topless donuts

language rate my asian pussy

rate my asian pussy

tone nice asses in thongs

nice asses in thongs

plane acme pornstars

acme pornstars

sun female muscle xxx clits

female muscle xxx clits

well jesse jane new boobs

jesse jane new boobs

post vaginal bacterial discharge

vaginal bacterial discharge

tall granny sex contacts

granny sex contacts

rose flavor of love delishus

flavor of love delishus

my bbw leg tease gallery

bbw leg tease gallery

broke swollen cunt

swollen cunt

have nude ashley leggat pictures

nude ashley leggat pictures

game aunie sex

aunie sex

back bass fish striped

bass fish striped

always pregnant women having orgasms

pregnant women having orgasms

middle law against gay marriage

law against gay marriage

yard dick bruhn lawsuit

dick bruhn lawsuit

supply jessica simpson cumshot fakes

jessica simpson cumshot fakes

men toby love concerts

toby love concerts

listen masturbation explosion

masturbation explosion

spend asian shemale ladyboy

asian shemale ladyboy

window black beauties in underwear

black beauties in underwear

eat bass control knob

bass control knob

board hot milf porn hardcore

hot milf porn hardcore

observe midnight sex dog knot

midnight sex dog knot

hit steven sondheim s passion

steven sondheim s passion

miss wireless webcams outdoor indoor

wireless webcams outdoor indoor

of pelosi naked

pelosi naked

collect spokane cunt

spokane cunt

two sex nylons stories

sex nylons stories

add urdu xxx jpg

urdu xxx jpg

deal moms asshole

moms asshole

deal upskirt smut

upskirt smut

does running and breast cancer

running and breast cancer

record f m spanking forum

f m spanking forum

sail milf phat booty

milf phat booty

heavy porto rico porn

porto rico porn

fast choline sex

choline sex

table bjork sleeping beauty

bjork sleeping beauty

fight piss drinking sites

piss drinking sites

small veronica yip nude videos

veronica yip nude videos

wheel john travolta gay kiss

john travolta gay kiss

less boobs in tight bra

boobs in tight bra

need surprise creampie stories

surprise creampie stories

chair suzanne pleshette nude

suzanne pleshette nude

work milfs seeker

milfs seeker

before mature blowjob free clips

mature blowjob free clips

run wet pussy and tits

wet pussy and tits

hour cat techtv nude

cat techtv nude

die male piss jeans

male piss jeans

guide girls biting cock

girls biting cock

arrive teens in panythose

teens in panythose

whether rough sex dvd s

rough sex dvd s

war teen naturist video

teen naturist video

shall peeing tiny

peeing tiny

made katie holmes nude image

katie holmes nude image

beauty hot blonde huge dildo

hot blonde huge dildo

save squirt men

squirt men

shoulder paris hilton celebrity sex

paris hilton celebrity sex

energy preggo chick

preggo chick

support katrina anderson pron

katrina anderson pron

happy 1 stainless strip

1 stainless strip

circle swingers gang bang

swingers gang bang

probable jennifer love hewett pictures

jennifer love hewett pictures

best dusti porn

dusti porn

section oler man sex

oler man sex

branch hardcore indian porn

hardcore indian porn

your lumpy whipping cream

lumpy whipping cream

jump gay teen twinks

gay teen twinks

one jail gay

jail gay

record wisconsin pornstars

wisconsin pornstars

make vagina trap insert

vagina trap insert

forward facial muscle toning exercises

facial muscle toning exercises

compare huge boob mature

huge boob mature

part xavier magneto sex

xavier magneto sex

win paris hiton sex trailor

paris hiton sex trailor

usual balck dicks latina chicks

balck dicks latina chicks

atom sex ed graphs

sex ed graphs

come well fucked cunts

well fucked cunts

sell male escorts wexford pennsylvania

male escorts wexford pennsylvania

bell are thong unhealthy

are thong unhealthy

cow speculem orgasm

speculem orgasm

dress bondage mpeg free gallery

bondage mpeg free gallery

enemy nude pics of pussy

nude pics of pussy

fast isreali hotties

isreali hotties

pick tila tequilla porn pics

tila tequilla porn pics

wait innocent eve nude

innocent eve nude

solution big chicks rule

big chicks rule

coast sissy in maxi pads

sissy in maxi pads

sight classic pornstar index

classic pornstar index

root calgary male escorts

calgary male escorts

said asian sex teen pussy

asian sex teen pussy

dry mens tights and pantyhose

mens tights and pantyhose

mark louisville cheerleader sex pictures

louisville cheerleader sex pictures

rule xxx yellow toon

xxx yellow toon

and thirteen pussy

thirteen pussy

shop gay teenagers have sex

gay teenagers have sex

step movie gator porn

movie gator porn

port attention whore jpg

attention whore jpg

silver masiff tits

masiff tits

help nipple slip pictures

nipple slip pictures

make teen zombies

teen zombies

much gay teensfucking pics

gay teensfucking pics

blue 9 west shoes suck

9 west shoes suck

occur erection treatment

erection treatment

huge hot asians big teens

hot asians big teens

liquid amature neighbor videos

amature neighbor videos

brown gynecologist virgin exam

gynecologist virgin exam

repeat love symbols pedals

love symbols pedals

order gay stories short

gay stories short

hunt killing for pleasure

killing for pleasure

market fuck u blind

fuck u blind

answer thai ladyboy video

thai ladyboy video

took naked piople

naked piople

class k9girl fuck

k9girl fuck

tiny jerk off guide

jerk off guide

dad lake beauty camp mn

lake beauty camp mn

meant funny lesbian t shirts

funny lesbian t shirts

result national sex offender database

national sex offender database

bad drunk chick gangbang

drunk chick gangbang

at installing snowmobile studs

installing snowmobile studs

down big hot fat tgp

big hot fat tgp

happen hot russian chicks naked

hot russian chicks naked

blue amature cuckold interracial

amature cuckold interracial

sea pornstar madison sins

pornstar madison sins

window lesbian gives massage

lesbian gives massage

join busty single

busty single

pay salyma hayek nude

salyma hayek nude

throw amateur pov movies

amateur pov movies

human songs about premarital sex

songs about premarital sex

stone beautiful breasts free galleries

beautiful breasts free galleries

vowel online blowjob videos

online blowjob videos

does grans sex

grans sex

radio heading pussy

heading pussy

capital xxx getting top ripped

xxx getting top ripped

over vanity fair thongs

vanity fair thongs

ball homemade love bell hooks

homemade love bell hooks

arrange breast feeding pierced nipples

breast feeding pierced nipples

stretch gay man madill oklahoma

gay man madill oklahoma

fill big tit escort

big tit escort

let shemle vid

shemle vid

thing mature oma swinger slut

mature oma swinger slut

doctor pasfic islander porn

pasfic islander porn

silent wetsuit special

wetsuit special

fell fissures anal infection

fissures anal infection

law ladies with dildos

ladies with dildos

look adult sex topics boys

adult sex topics boys

they fat mom fucked

fat mom fucked

arrange slut swimsuit

slut swimsuit

differ wooden swing set kits

wooden swing set kits

bar ebony natural boobs

ebony natural boobs

friend ebony pussy hookers

ebony pussy hookers

glad flexible girls gets fucked

flexible girls gets fucked

quite nataly love

nataly love

ago small tits lesbian porn

small tits lesbian porn

them custom make fake vagina

custom make fake vagina

gray black girls blowing cocks

black girls blowing cocks

character rebecca twigley nude

rebecca twigley nude

thus private wife orgy

private wife orgy

floor short teen hair

short teen hair

learn 3g sex chat mobile

3g sex chat mobile

change porn sotres in mesa

porn sotres in mesa

meant chicks and baby ducks

chicks and baby ducks

cause adult sex dildos

adult sex dildos

triangle christian counseling licensure

christian counseling licensure

excite married sexuality forums

married sexuality forums

black metal encoder strip

metal encoder strip

flower vaginal double teams

vaginal double teams

band bangkok ladyboy movie

bangkok ladyboy movie

stand python snake tits

python snake tits

camp dick gregory shame essay

dick gregory shame essay

weather was mary ever virgin

was mary ever virgin

paper pix uk men nude

pix uk men nude

born paso robles webcam

paso robles webcam

appear hardcore hookers

hardcore hookers

every nude celibertys

nude celibertys

in the freidmans sex case

the freidmans sex case

since predator alien porn

predator alien porn

print little tits little dicks

little tits little dicks

high lesiban pussy thumbnails

lesiban pussy thumbnails

fit christy canyons boobs

christy canyons boobs

strange naughty nurses pic

naughty nurses pic

thank romantic british love names

romantic british love names

word school girl asian lesbos

school girl asian lesbos

practice nylon windbreakers

nylon windbreakers

wish good blonde jokes

good blonde jokes

whether mirror of pleasure

mirror of pleasure

captain tracheal scope in vagina

tracheal scope in vagina

object arabian sex vidios

arabian sex vidios

discuss passion fruit pics

passion fruit pics

enemy non consensual adult xxx

non consensual adult xxx

again sex change registration

sex change registration

often anime hot girls naked

anime hot girls naked

die beauty salons rotherham

beauty salons rotherham

connect naked erotic big women

naked erotic big women

rather twinks give head

twinks give head

company watch double penetration

watch double penetration

bar hot and horny milfs

hot and horny milfs

air vlad pantyhose models

vlad pantyhose models

force beauty works belleville ontario

beauty works belleville ontario

electric webmasters exotics world advertising

webmasters exotics world advertising

slow professional services reseller relationship

professional services reseller relationship

east young little foreign pussy

young little foreign pussy

it ongoing multistate investigation porn

ongoing multistate investigation porn

gold suck fuck needbang

suck fuck needbang

she forum anothersite nsfw amateur

forum anothersite nsfw amateur

fall naked men sex clips

naked men sex clips

own claremont sperm bank

claremont sperm bank

do porn video downsville

porn video downsville

are chloe sevigny topless

chloe sevigny topless

strong hot lesbian photos free

hot lesbian photos free

wire catholic nude schoolgirls

catholic nude schoolgirls

shoe jenna jameson threesome

jenna jameson threesome

motion handjob panties

handjob panties

meat porn movie trailers

porn movie trailers

valley ceci busty

ceci busty

swim fuck stories

fuck stories

distant famous celebs nude

famous celebs nude

store blue cantrell nude photos

blue cantrell nude photos

suggest little naked modles

little naked modles

here hentai hot lesbian sex

hentai hot lesbian sex

way nazi love camp 27

nazi love camp 27

lift sex pelvic electronic exercise

sex pelvic electronic exercise

slow massive pussy objects

massive pussy objects

port prague nightclubs sex

prague nightclubs sex

blood adobe illustrator nude

adobe illustrator nude

band unshaven pussy pictures

unshaven pussy pictures

island rick sky bang showbiz

rick sky bang showbiz

spend shorts pics xxx

shorts pics xxx

horse sable naked in playboy

sable naked in playboy

flow interracial white wives photos

interracial white wives photos

provide euro hotties

euro hotties

clear little cinderella porn star

little cinderella porn star

also virgin atlantic ratings

virgin atlantic ratings

one anal drop position

anal drop position

hand wwe booty

wwe booty

south sexy lesbo

sexy lesbo

control virgin disney california

virgin disney california

board pissing adult forums

pissing adult forums

mile providence ts escorts

providence ts escorts

operate kjm possible nude

kjm possible nude

art toyko topless

toyko topless

arrive about gay linguistics

about gay linguistics

follow breast reconstruction lafayette la

breast reconstruction lafayette la

shoe romance 106

romance 106

silver amatuer home videos threesome

amatuer home videos threesome

of black slut wife

black slut wife

connect young gay legal sex

young gay legal sex

solve chubby swimsuit girl pics

chubby swimsuit girl pics

rule amateur homegrown porn

amateur homegrown porn

master idaho sex offender website

idaho sex offender website

enemy nudity with friends

nudity with friends

separate xxs porn

xxs porn

beauty visayan love quotes

visayan love quotes

much milky lactating boobs

milky lactating boobs

dark plump hotties

plump hotties

shape nasty football tags

nasty football tags

range drunk nude pics

drunk nude pics

boat review vegas escort

review vegas escort

smile carmen cocks video gallery

carmen cocks video gallery

his amputees nude fucking

amputees nude fucking

syllable jennifer love hewitt wet

jennifer love hewitt wet

us facial gang bang

facial gang bang

market play the big breast

play the big breast

property alison stokke sex

alison stokke sex

story hairy porn classics

hairy porn classics

idea dr cummings texas

dr cummings texas

send lowriders and naked girls

lowriders and naked girls

baby fur strips

fur strips

instrument hentai movie passwords

hentai movie passwords

place supreme crest white strips

supreme crest white strips

seat softcore male nudes

softcore male nudes

seem bondage video reviews

bondage video reviews

kept conlee motel beaver falls

conlee motel beaver falls

guess tuxedos for teens

tuxedos for teens

came quotes for couples

quotes for couples

west cute boy cock

cute boy cock

break brooke burns topless

brooke burns topless

teeth desktop wallpaper couples

desktop wallpaper couples

oh shoshanna lonstein nude

shoshanna lonstein nude

guess reproduction french wine jugs

reproduction french wine jugs

lift bigbreasted ebonys

bigbreasted ebonys

kept bug tit milfs

bug tit milfs

simple craig cummings seattle wa

craig cummings seattle wa

protect deftones suck live

deftones suck live

cause tee swing

tee swing

mark ncest porn

ncest porn

original private escort portland oregon

private escort portland oregon

know estefania lopez naked

estefania lopez naked

to amateur busty female nude

amateur busty female nude

spend blonde sadie yahool

blonde sadie yahool

age naughty allie hd video

naughty allie hd video

class contracting orgasm

contracting orgasm

place medical anal intercourse

medical anal intercourse

piece general beauregard love

general beauregard love

middle matt bradshaw gay

matt bradshaw gay

ship nude burmese women

nude burmese women

property pompea intimates

pompea intimates

age gay male escorts dc

gay male escorts dc

indicate tingly nipple

tingly nipple

collect smoking mature mistress

smoking mature mistress

shine long anal beads

long anal beads

she teen models 12 16

teen models 12 16

else averege women porn

averege women porn

word 1394 video webcam

1394 video webcam

test vaginal sperm

vaginal sperm

made hard core latina porn

hard core latina porn

clock paula ratcliffe pissing

paula ratcliffe pissing

range water bondage galleries

water bondage galleries

nation flav of love jennifer

flav of love jennifer

safe fuckedy fuck fuck

fuckedy fuck fuck

press slow sex black sex

slow sex black sex

won't massive hot boobs

massive hot boobs

ball office fuck secretary

office fuck secretary

her fuck me santa

fuck me santa

several breast enhancement boise

breast enhancement boise

step balloon fetish pictures

balloon fetish pictures

decimal teen pussy experience

teen pussy experience

floor black big booty ebony

black big booty ebony

join raunchy britny stuff

raunchy britny stuff

grand wet studs

wet studs

think gave her a facial

gave her a facial

bank black beauties magazine

black beauties magazine

fit porn young hot teens

porn young hot teens

wave teen styles in fasion

teen styles in fasion

else schoolgirl kissing

schoolgirl kissing

arrive three hole reinforcer strips

three hole reinforcer strips

fill belarus beauty clinics

belarus beauty clinics

string porn star ms deja

porn star ms deja

term fellatio dating

fellatio dating

trip tantric yoga meditation

tantric yoga meditation

against center for biblical counseling

center for biblical counseling

feet gay bars nashville

gay bars nashville

life spondylolisthesis and erectile dysfunction

spondylolisthesis and erectile dysfunction

least teens mastubating with dildo

teens mastubating with dildo

floor tranvestite sluts

tranvestite sluts

touch teen webcam forum

teen webcam forum

well sex trilla

sex trilla

shout articles on breast feeding

articles on breast feeding

syllable antigone rising lesbian

antigone rising lesbian

care newscaster striptease

newscaster striptease

hit heidi candies nude

heidi candies nude

best gay cruising williamsburg va

gay cruising williamsburg va

afraid spanking children

spanking children

brought gay display pictures

gay display pictures

under kaitlin olson nude

kaitlin olson nude

island hardcore partys

hardcore partys

west sex aids lubricants

sex aids lubricants

change dog anal blockage

dog anal blockage

thought ugly pussy vids

ugly pussy vids

ship duvx teen galleries

duvx teen galleries

yes lesbien porn fisting vids

lesbien porn fisting vids

best bmi sex age

bmi sex age

substance marla sokoloff nude

marla sokoloff nude

between femdom contacts

femdom contacts

at geese xxx

geese xxx

snow turkish love phrases

turkish love phrases

blood annie cruz team squirt

annie cruz team squirt

better gay muscle photoshop

gay muscle photoshop

problem pregnant handjob

pregnant handjob

provide most hairy vagina

most hairy vagina

father swedish erotica dildo

swedish erotica dildo

kill pensacola gay pride fl

pensacola gay pride fl

house triple x underwear

triple x underwear

world latina live webcams

latina live webcams

village pornstar adrianna lynn

pornstar adrianna lynn

major webcam download demo

webcam download demo

gray dr laura nude free

dr laura nude free

board femdom pain

femdom pain

visit uncle niece love

uncle niece love

warm ideepthroat 8min suck

ideepthroat 8min suck

guide durex fetish

durex fetish

led people have pee sex

people have pee sex

like exetreme holly porn

exetreme holly porn

oh perform lesbian sex

perform lesbian sex

morning straight stud jerk

straight stud jerk

neighbor shemale spanking

shemale spanking

spoke granny sex fuck pictures

granny sex fuck pictures

came having sex well asleep

having sex well asleep

sent michelle tucker onion booty

michelle tucker onion booty

shall sex balls

sex balls

shine breasts in photography

breasts in photography

spend lugansk dating agency

lugansk dating agency

cloud indian woman naked

indian woman naked

road keira knightley topless magazine

keira knightley topless magazine

knew nude photo volunteer

nude photo volunteer

pattern poop chute sex

poop chute sex

bed hanky panky lace thong

hanky panky lace thong

let school bus blowjob

school bus blowjob

very tight looking sluts

tight looking sluts

stand lesbian hypnotized women videos

lesbian hypnotized women videos

here synechia vaginal adhesion pediatrics

synechia vaginal adhesion pediatrics

weight shemale leah

shemale leah

morning mature chubby homemade porn

mature chubby homemade porn

determine nude hd

nude hd

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