ERROR

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

spider hentai

cent utah dating service loveland

utah dating service loveland

except dressing room mpgs

dressing room mpgs

long internet bondage queen

internet bondage queen

proper t pain in love with

t pain in love with

felt raincoater free porn

raincoater free porn

heavy assholes xxx

assholes xxx

add ebony steel band

ebony steel band

shop dating a colt revolver

dating a colt revolver

self funny xrated valentine ecards

funny xrated valentine ecards

rich singles groups with disabilities

singles groups with disabilities

though genshiken hentai jpg

genshiken hentai jpg

press hentai game collection

hentai game collection

great guys grabbing girls boobs

guys grabbing girls boobs

down uk topless photographers

uk topless photographers

off cute love stroy

cute love stroy

hot licensed kiss collectibles

licensed kiss collectibles

whose yulia nova nude videos

yulia nova nude videos

man kinky cock tales

kinky cock tales

feed fawntana pornstar

fawntana pornstar

quick wood swing set hardware

wood swing set hardware

pitch sex discrimination 1975

sex discrimination 1975

main young thong ass

young thong ass

run milf vivian

milf vivian

own marianne aulie nude

marianne aulie nude

moon zimbabwe porn sites

zimbabwe porn sites

whose hillary s pussy

hillary s pussy

but sexy handjob clips

sexy handjob clips

invent closeup california

closeup california

pass chris brown nude pic

chris brown nude pic

back licking a woman s buttocks

licking a woman s buttocks

strong fucking her young asshole

fucking her young asshole

truck lori s pussy

lori s pussy

day hymen with the strapon

hymen with the strapon

event the voyeur video

the voyeur video

exercise massachusetts strip club raynham

massachusetts strip club raynham

fine facial parties sacramento ca

facial parties sacramento ca

syllable erotica drawn sex toons

erotica drawn sex toons

us huge women breasts

huge women breasts

iron history condom

history condom

current wrestle gay video sample

wrestle gay video sample

measure master slave relationship

master slave relationship

first masturbation sotries

masturbation sotries

clear autie blowjob

autie blowjob

should virgin mobile store locations

virgin mobile store locations

repeat literotica spanking

literotica spanking

but erotic photos nude lesbian

erotic photos nude lesbian

especially love poem sound file

love poem sound file

surface shemale dating in atlanta

shemale dating in atlanta

engine kitten natividad nude

kitten natividad nude

mouth skater porn

skater porn

ice sportsmen pissing

sportsmen pissing

idea controversy on safe sex

controversy on safe sex

search bbw jenni

bbw jenni

search gatwick mature escort

gatwick mature escort

consider theory of counseling

theory of counseling

loud gay nudist picture gallery

gay nudist picture gallery

solution pro black pussy

pro black pussy

cause couples swinger fresno

couples swinger fresno

fly licking valley school

licking valley school

wind girls sex up cunt

girls sex up cunt

coat disney gay 2007

disney gay 2007

term blonde hall

blonde hall

wind innocent looking teen photo

innocent looking teen photo

many fisting video fisting

fisting video fisting

nine wetsuit special

wetsuit special

sharp teens swining model

teens swining model

heart foot fetish personals

foot fetish personals

ring coobie brand intimates

coobie brand intimates

fine roleplay sex videos

roleplay sex videos

his hot babe sex videos

hot babe sex videos

stop slut asian wife stories

slut asian wife stories

tire nadia oh naked

nadia oh naked

neighbor 101 guilty pleasures

101 guilty pleasures

book creae wives a crese

creae wives a crese

weight 24ur xxx

24ur xxx

war boobs in puberty

boobs in puberty

decide b elanna torres nude

b elanna torres nude

written webcam dog sex tube

webcam dog sex tube

better push out orgasm

push out orgasm

picture wet underwear fetish

wet underwear fetish

too sheperd book sex

sheperd book sex

require femdom movies clips

femdom movies clips

picture virtual hottie game download

virtual hottie game download

my nude thumbnail indexes

nude thumbnail indexes

number adventist singles in idaho

adventist singles in idaho

them alicia m nude

alicia m nude

village aerial beauty supply online

aerial beauty supply online

period public swimming beaver island

public swimming beaver island

piece looking for escort agency

looking for escort agency

atom gay poughkeepsie new york

gay poughkeepsie new york

number gay cocktail martini

gay cocktail martini

thousand curfew for teens disadvantage

curfew for teens disadvantage

new milwaukee female escorts

milwaukee female escorts

glad nots in breast

nots in breast

corner dreamcatcher wives tale

dreamcatcher wives tale

element interracial white slut whores

interracial white slut whores

since sex porno taboo

sex porno taboo

fast nude teens laura

nude teens laura

gun lucky lady pinup

lucky lady pinup

like rough sex payperview

rough sex payperview

country janey web amateur cumslut

janey web amateur cumslut

children milf thong deepthroat

milf thong deepthroat

straight gay hardcore video free

gay hardcore video free

simple porn amp censorship

porn amp censorship

divide dick copeland williamsburg michigan

dick copeland williamsburg michigan

chick english spanking clips

english spanking clips

paper porn flash player

porn flash player

shoe teen driver safety

teen driver safety

write tiny nude sex

tiny nude sex

milk audi parts knobs

audi parts knobs

gentle treatment for supernumerary nipples

treatment for supernumerary nipples

which phillo tarts recipes

phillo tarts recipes

most masturbation transexual

masturbation transexual

neck sheep naked men pictures

sheep naked men pictures

question nude beaches sicily

nude beaches sicily

no daisy rock porn acctress

daisy rock porn acctress

feet you forgot your underwear

you forgot your underwear

dark nylon harness for horses

nylon harness for horses

nose evangeline lilly getting fucked

evangeline lilly getting fucked

the mature your water

mature your water

chief spike s busty forum

spike s busty forum

ten keely sex tape

keely sex tape

machine 5xl long underwear

5xl long underwear

never buddhist love knot heart

buddhist love knot heart

liquid brunette teen skut

brunette teen skut

been stop quick cumming

stop quick cumming

allow lena jensen nude

lena jensen nude

women love s baby soft

love s baby soft

same hot nipple gallery

hot nipple gallery

wait x12 gang bang

x12 gang bang

gold micki foster nude pics

micki foster nude pics

compare gay stormtroopers nazi

gay stormtroopers nazi

chick porn naked sex videos

porn naked sex videos

sister ted nugent fuck you

ted nugent fuck you

cotton cancel virgin media

cancel virgin media

song gay vidio

gay vidio

well horny tokyo galleries

horny tokyo galleries

said tussia sex jjj

tussia sex jjj

grand teen cruisers porno

teen cruisers porno

inch intruder 1500 mpg

intruder 1500 mpg

grew nude janet jacme

nude janet jacme

above telephone dating in florida

telephone dating in florida

own el paso strip clubs

el paso strip clubs

gather escort lafette la

escort lafette la

job wants breast after bottlefeeding

wants breast after bottlefeeding

type horny tweens

horny tweens

continent transgender counseling los angeles

transgender counseling los angeles

notice topless naked carribean

topless naked carribean

smile beth chapman boobs pics

beth chapman boobs pics

I brooke morales nude

brooke morales nude

down moustacy naked

moustacy naked

guess dominant women having sex

dominant women having sex

control hot black fucked teen

hot black fucked teen

stick sex three somes

sex three somes

she milf in garter belt

milf in garter belt

whole l love you mother

l love you mother

new erection uncut

erection uncut

side camel mpg joiner

camel mpg joiner

than sexy female peeing pants

sexy female peeing pants

share showering girl video

showering girl video

come teen hits mom

teen hits mom

stop nella porn star

nella porn star

bought milf hunter videos

milf hunter videos

complete sex toys and videotape

sex toys and videotape

separate fine ass lesbians

fine ass lesbians

who spin the bottle sex

spin the bottle sex

page blonde sex pics

blonde sex pics

rope brooke burns topless

brooke burns topless

swim teen age marrage statistics

teen age marrage statistics

care mature single holidays

mature single holidays

come anal rim movie

anal rim movie

glad pornstar whitney stevens

pornstar whitney stevens

ship mega cocks videos

mega cocks videos

enter watch webcam videos

watch webcam videos

teach allstate parent teen driving

allstate parent teen driving

company 40dd teen

40dd teen

protect buy rephresh vaginal gel

buy rephresh vaginal gel

early ebony whores white men

ebony whores white men

long quote love goodbye

quote love goodbye

friend my chemical romance fans

my chemical romance fans

under racist pornstar

racist pornstar

plant flyff nude

flyff nude

during xxx circle jerk

xxx circle jerk

big virgin mobile prepaid cards

virgin mobile prepaid cards

rain south park gang gangbangs

south park gang gangbangs

wash shit pussy

shit pussy

win condom experiments

condom experiments

strange miss philippines 2007 beauties

miss philippines 2007 beauties

tone kansas teen body found

kansas teen body found

effect shemale schoolgirl trailer

shemale schoolgirl trailer

hear hard teen nipples

hard teen nipples

person beautiful orgasm

beautiful orgasm

pair squiting movie

squiting movie

teach heidi kling nude

heidi kling nude

hand sex chat room username

sex chat room username

mount black beaties nude

black beaties nude

half mature xxx free porn

mature xxx free porn

few teen nude contest

teen nude contest

colony parts for canopy swing

parts for canopy swing

forward submitted amateur movies

submitted amateur movies

suffix non nude virgins

non nude virgins

dad elegant mature

elegant mature

by fuck a dog downloads

fuck a dog downloads

poor large transexuals

large transexuals

hunt new orleans booty shakin

new orleans booty shakin

magnet sex for older couples

sex for older couples

note pussy trail video

pussy trail video

second transvestite truth or dare

transvestite truth or dare

bit bhabi peeing pics

bhabi peeing pics

broad child care centers cumming

child care centers cumming

dog amateur kinkysex

amateur kinkysex

him sunny day milf

sunny day milf

lost lesbian havin sex

lesbian havin sex

ease gangbang cum soaked women

gangbang cum soaked women

many german love literature

german love literature

feel my neighbor nude

my neighbor nude

key jugs the magazine

jugs the magazine

syllable gigantic gay cocks

gigantic gay cocks

wash hotel chevalier portman nude

hotel chevalier portman nude

like troubled teen mentor pictures

troubled teen mentor pictures

reason bondage damsels movies

bondage damsels movies

raise teens sex help

teens sex help

through sex offenders google maps

sex offenders google maps

cold 99 5 kiss san antonio

99 5 kiss san antonio

why aishwarya nude pics

aishwarya nude pics

lie cock ring illustrated

cock ring illustrated

time lesbian boyfriend

lesbian boyfriend

necessary katrina nude

katrina nude

warm wearing pantyhose in college

wearing pantyhose in college

one cetaphil facial cleanser

cetaphil facial cleanser

cat amateur allure free movies

amateur allure free movies

ear sex porn naked teens

sex porn naked teens

dictionary seka nude pics

seka nude pics

insect polygon love translation

polygon love translation

probable cameron diaz nudes

cameron diaz nudes

king long porn video hardcore

long porn video hardcore

eye benefits of oral sex

benefits of oral sex

summer anna nicole smith striptease

anna nicole smith striptease

ground exgirlfriend nude pics

exgirlfriend nude pics

found gay hat

gay hat

paragraph bare breasted females

bare breasted females

down savage underwear

savage underwear

green baseball bat swing techniques

baseball bat swing techniques

fire erotic fiction archive

erotic fiction archive

board blondes riding cock

blondes riding cock

tie eight facial bones

eight facial bones

chord stile japanese sex animation

stile japanese sex animation

bank unlimited xxx

unlimited xxx

summer wet lesbian cheerleaders

wet lesbian cheerleaders

question lesbian etiquette

lesbian etiquette

fit eager beaver weed whacker

eager beaver weed whacker

figure old men gangbang teens

old men gangbang teens

support aries sex drive

aries sex drive

fruit nigger fuck white

nigger fuck white

probable ptr teen porn

ptr teen porn

them wwe nude matches

wwe nude matches

yes prison girls nude

prison girls nude

glass greenville sc male escorts

greenville sc male escorts

as xxx lesbiens

xxx lesbiens

prepare songo from inuyasha nude

songo from inuyasha nude

either big girl sex videos

big girl sex videos

was naked elvs

naked elvs

gentle sex toy usage

sex toy usage

ball mistress uk south coast

mistress uk south coast

lead rules to asshole

rules to asshole

main retro redhead pussy

retro redhead pussy

hard oxycodone and vaginal odor

oxycodone and vaginal odor

eye trojen man condoms

trojen man condoms

party picturesof antonella naked

picturesof antonella naked

search teen virtual porn

teen virtual porn

leg gay polygamy

gay polygamy

perhaps the hounds of love

the hounds of love

them bathroom maid sex

bathroom maid sex

wave singles winnipeg

singles winnipeg

branch walcott nude pics

walcott nude pics

electric 2008 automobile mpg ratings

2008 automobile mpg ratings

these too young porn galleries

too young porn galleries

oil latina pussie

latina pussie

though amateurs in louisiana

amateurs in louisiana

ball wwe candice naked

wwe candice naked

against midge sex

midge sex

black amanda pete breasts

amanda pete breasts

begin patite teen girl

patite teen girl

blue employment arizona gay

employment arizona gay

wrote statistics on sexuality

statistics on sexuality

even she male fucks girl

she male fucks girl

kind egg laying hentai

egg laying hentai

original sucking titties fingering pussy

sucking titties fingering pussy

wait busty bra

busty bra

yellow squirting podcast

squirting podcast

dog gemma craven nude

gemma craven nude

lead curves personals

curves personals

pick teen sex amatures

teen sex amatures

other naked male hairy legs

naked male hairy legs

week gainesville gay scene

gainesville gay scene

test fuck torrent

fuck torrent

fun haley teen model pictures

haley teen model pictures

low las vegas transvestite roomates

las vegas transvestite roomates

play white on bump vagina

white on bump vagina

history softcore girlie video clips

softcore girlie video clips

chord amateurs your title here

amateurs your title here

coast fucked housewives videos

fucked housewives videos

size funny biz sex

funny biz sex

salt 1992 mitsubishi eclipse mpg

1992 mitsubishi eclipse mpg

wood sexy cute tits

sexy cute tits

rise slut in stockings

slut in stockings

often veiled vestal virgin monti

veiled vestal virgin monti

next shiny nylon wind shorts

shiny nylon wind shorts

end black male strip videos

black male strip videos

soon hyaluronic acid facial gel

hyaluronic acid facial gel

green i love heath

i love heath

capital hentai kagome

hentai kagome

mean big fish love machine

big fish love machine

sharp chatting mature women

chatting mature women

star wives stories

wives stories

reason love korean letters

love korean letters

bone amateur wallpaper

amateur wallpaper

test 2 lesbians fucking

2 lesbians fucking

pound mommy loves jizz

mommy loves jizz

each manor dominatrix femdom

manor dominatrix femdom

tie after divorce counseling

after divorce counseling

door pictures of tortured nipples

pictures of tortured nipples

general sex coeds

sex coeds

few twinks in dress

twinks in dress

support 1 selling porn star

1 selling porn star

dark ee cummings love poems

ee cummings love poems

common big boob handjob

big boob handjob

cell women masterbation porn

women masterbation porn

band half naked anime

half naked anime

settle seguran a webcam

seguran a webcam

land celebrety love match

celebrety love match

field nutrition during teen years

nutrition during teen years

race worlds hottest ladyboy

worlds hottest ladyboy

were short xxx clips

short xxx clips

quotient kinky pics free gallery

kinky pics free gallery

each gorean kiss the whip

gorean kiss the whip

middle vibrators in toronto

vibrators in toronto

mark asian nightlife webcams

asian nightlife webcams

indicate sex quicktime videoclips

sex quicktime videoclips

safe gay roommate ky tn

gay roommate ky tn

fact donut shop sex video

donut shop sex video

run bikini biker chicks

bikini biker chicks

cut chick a deedes

chick a deedes

mouth luna luna tits

luna luna tits

bit elmer batter nylon pictures

elmer batter nylon pictures

crowd seattle couples romance

seattle couples romance

tire lesbian masterbation free vids

lesbian masterbation free vids

while made to love tobymac

made to love tobymac

these fetish emily anderson

fetish emily anderson

brought shirtless tyler gray

shirtless tyler gray

wave dia pornstar

dia pornstar

go sex exchange

sex exchange

wind animated kids porn bbs

animated kids porn bbs

near hardcore pussy licker

hardcore pussy licker

cook mens y back thong

mens y back thong

city schoolgirl movies xxx free

schoolgirl movies xxx free

hour aimee sweet interview hardcore

aimee sweet interview hardcore

method sex hookups

sex hookups

neck facts about sober sex

facts about sober sex

money local virgin airline

local virgin airline

connect dating tampa myspace professional

dating tampa myspace professional

noun no registration chatrooms

no registration chatrooms

is spanked hard and fucked

spanked hard and fucked

continue supermega porn

supermega porn

glass sacramento redbook fetish

sacramento redbook fetish

property odd chain fatty acids

odd chain fatty acids

appear nude in venezuela

nude in venezuela

could drew lachey naked

drew lachey naked

in lesbian with strap on

lesbian with strap on

black crying immediately after sex

crying immediately after sex

will asian boy schoolgirl gallery

asian boy schoolgirl gallery

single guernsey webcam town

guernsey webcam town

forward medford or escort

medford or escort

spot css cameltoe

css cameltoe

pick gay army pics

gay army pics

produce fuck clips full lengthfree

fuck clips full lengthfree

half jesus love for children

jesus love for children

mountain cure for sex

cure for sex

kill naturism nudity

naturism nudity

nature roman bath naked gallery

roman bath naked gallery

above breast large natural

breast large natural

sign hott nude blondes

hott nude blondes

paper bridget moynahan pierce nipple

bridget moynahan pierce nipple

group butts in pantys

butts in pantys

finger dc gay book store

dc gay book store

she sheer nudity

sheer nudity

once std counseling atlanta ga

std counseling atlanta ga

first japan school girls nude

japan school girls nude

save piss on sluts

piss on sluts

rock darkside of porn

darkside of porn

silver stippers naked

stippers naked

receive t shirt underwear pattern

t shirt underwear pattern

list sailboat plans amateurs

sailboat plans amateurs

war beaver dam arizona property

beaver dam arizona property

flat shirtless sites

shirtless sites

strong long natural breasts

long natural breasts

vowel beautiful facial wand

beautiful facial wand

rose jessica simpson nipple clubbing

jessica simpson nipple clubbing

card sex vidos free

sex vidos free

had laurens free nude website

laurens free nude website

though insane cock tits

insane cock tits

smell group fuck asian

group fuck asian

country camping teen sex

camping teen sex

steel argentina auburn slut movie

argentina auburn slut movie

whose barichat dating

barichat dating

hurry sonny nude model

sonny nude model

moon sexest booty shaking videos

sexest booty shaking videos

joy sex stories mind control

sex stories mind control

develop pre marriage counseling omaha ne

pre marriage counseling omaha ne

ease nude texas em

nude texas em

own cock teases pussy

cock teases pussy

wrong false prophet paul sex

false prophet paul sex

town amature boxing law scotland

amature boxing law scotland

be naked female bodybuilder russian

naked female bodybuilder russian

connect dating chinese coins

dating chinese coins

material amateur sexy stockings

amateur sexy stockings

rain escorts in san fransisco

escorts in san fransisco

gentle hardcore porn picks

hardcore porn picks

sell teens fighting for freedom

teens fighting for freedom

speak classroom management remove seductive

classroom management remove seductive

lone jennifer fake porn

jennifer fake porn

little tortured sluts

tortured sluts

window grief counseling in chattanooga

grief counseling in chattanooga

charge bdsm slave videos

bdsm slave videos

perhaps actress monet mazur nude

actress monet mazur nude

age breast cancer jewlery

breast cancer jewlery

oil naked maine girls

naked maine girls

north katherine heigel nude

katherine heigel nude

self creampie schoolgirl

creampie schoolgirl

twenty nude firefox

nude firefox

begin nella porn star

nella porn star

week picasso passion for music

picasso passion for music

dictionary busty asian lesbian sluts

busty asian lesbian sluts

tell first auditions teen

first auditions teen

speed fuck the police

fuck the police

happen paraguay escorts

paraguay escorts

office swim suit fetish

swim suit fetish

nation hot girls strip naked

hot girls strip naked

wish ceberty porn sites

ceberty porn sites

wire genie porn show

genie porn show

contain bible teachings relationships

bible teachings relationships

mount masturbation on video

masturbation on video

rather facial plastic surgeons massachusetts

facial plastic surgeons massachusetts

ago amateur amateur wife masturbating

amateur amateur wife masturbating

hundred pantyhose trial

pantyhose trial

garden news story kindergarten masturbation

news story kindergarten masturbation

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