ERROR

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

gay cop marriage

mind all internal jizz

all internal jizz

metal pictures of eat pussy

pictures of eat pussy

half gay saunas beijing shanghai

gay saunas beijing shanghai

as ebony cosmetics

ebony cosmetics

track hilary fuck with

hilary fuck with

step wilmington breast implants

wilmington breast implants

where breast cancer canada store

breast cancer canada store

spend wives of sissy husbands

wives of sissy husbands

contain showing some colombian love

showing some colombian love

doctor teen boy briefs

teen boy briefs

dog mormon masturbation opinion

mormon masturbation opinion

need naked male celeberaties

naked male celeberaties

shine bebo sexy nude tits

bebo sexy nude tits

written yahoo threesomes

yahoo threesomes

mouth racquetball singles strategy

racquetball singles strategy

middle passionate sex

passionate sex

rich moms teaching teens samples

moms teaching teens samples

west topless perfect boobs

topless perfect boobs

copy leslie cooley phd counseling

leslie cooley phd counseling

connect virgin brodaband

virgin brodaband

then ostomate dating

ostomate dating

plant swinger orgies pictures

swinger orgies pictures

branch perla thong

perla thong

and girl in trouble teens

girl in trouble teens

rock indian rina breasts

indian rina breasts

share woman superior position sex

woman superior position sex

remember gay turkish sites

gay turkish sites

work love hate realtime webstie

love hate realtime webstie

read ebony lesbians gallery

ebony lesbians gallery

page jenifer elison shaven pussy

jenifer elison shaven pussy

found girls sucking teens dicks

girls sucking teens dicks

death gay masterbation porn

gay masterbation porn

sense winnie berger berlin pooh

winnie berger berlin pooh

observe bondage ms tracy clarke

bondage ms tracy clarke

pound breast infection symptoms

breast infection symptoms

cook the pleasure diary

the pleasure diary

opposite venesa williams nude

venesa williams nude

quotient blowjob ass stories

blowjob ass stories

cry raven symon nude pics

raven symon nude pics

basic nude seniors barcelona

nude seniors barcelona

north hardcore threesome sex

hardcore threesome sex

blood hentai geekette

hentai geekette

company mature mum sex

mature mum sex

poem bbw personal plus

bbw personal plus

a syracuse tv hotties

syracuse tv hotties

meant tasty twist orgasm enhancer

tasty twist orgasm enhancer

sleep fat bbw teen nude

fat bbw teen nude

wish hellsing sex

hellsing sex

rise imge gays

imge gays

dead enschede live webcams

enschede live webcams

element sunday school curriculum teens

sunday school curriculum teens

fig alinco amateur radios

alinco amateur radios

thousand chun li xxx

chun li xxx

dad tv star sex tape

tv star sex tape

surface dating a larger lady

dating a larger lady

card massage erotic michigan models

massage erotic michigan models

tiny lift carry teen girls

lift carry teen girls

mouth peeing predict babys gender

peeing predict babys gender

mean gay mens cocks

gay mens cocks

boy horney for you poems

horney for you poems

only rainforest travel swing

rainforest travel swing

left intimate party

intimate party

support girl webcam vid

girl webcam vid

experiment romantic relationships work

romantic relationships work

paper sex while wearing slip

sex while wearing slip

person female masturbation pillows

female masturbation pillows

liquid yougn tgp

yougn tgp

tie 18 only amateur porn

18 only amateur porn

baby vanity fair thongs

vanity fair thongs

by sesonale makes breasts bigger

sesonale makes breasts bigger

talk heterosexual sex movies

heterosexual sex movies

brought gay member of b2k

gay member of b2k

certain deadlines for counseling statement

deadlines for counseling statement

hair sex nude fuck

sex nude fuck

kill catherine murino nude

catherine murino nude

add hardcore video previews

hardcore video previews

where escorts perth western australia

escorts perth western australia

mark professor fucks student

professor fucks student

hope blotchy breasts

blotchy breasts

sign young dudes fuck

young dudes fuck

group sexy schoolgirls manga

sexy schoolgirls manga

industry accessories for swings

accessories for swings

miss zelie martin porn

zelie martin porn

head bobwhite quail chicks

bobwhite quail chicks

dream businessweek virgin atlantic

businessweek virgin atlantic

soil mel vogue shemale

mel vogue shemale

large adults medical fetish

adults medical fetish

bottom nude eaches

nude eaches

root amsterdam live sex

amsterdam live sex

search traditional schoolgirls uniform

traditional schoolgirls uniform

did teen camps the tennesee

teen camps the tennesee

track amateur daily pix

amateur daily pix

once huge cock load

huge cock load

map hi resolution hentai

hi resolution hentai

until mature longest nipples

mature longest nipples

self pornstar demilo

pornstar demilo

group blonde from brooklyn 1945

blonde from brooklyn 1945

visit nude dare vids

nude dare vids

whether high school fuck video

high school fuck video

column nude asians porn

nude asians porn

on naughty kacy

naughty kacy

trip gigantic boobs gallery

gigantic boobs gallery

bring tranny slave sonora

tranny slave sonora

post victoria stevens nude photos

victoria stevens nude photos

science bar girl electra nude

bar girl electra nude

few biazzare sex

biazzare sex

effect male extreme fisting stories

male extreme fisting stories

length horny mexican moms

horny mexican moms

smell shemale cock

shemale cock

noise troubled teen housing conroe

troubled teen housing conroe

grand naturist beauty pageant

naturist beauty pageant

a lesbian dog sex

lesbian dog sex

held vos free porn

vos free porn

fish hardcore big tis

hardcore big tis

should old porn srars

old porn srars

bone 300m manual tranny

300m manual tranny

began old chicks fuck

old chicks fuck

salt sex skype

sex skype

laugh chubby baby

chubby baby

old porn films list

porn films list

substance nude rear end

nude rear end

believe paris hilton sex taper

paris hilton sex taper

east bignaturals carolyn

bignaturals carolyn

give dave sex soller

dave sex soller

king kiss tickets

kiss tickets

neck gay daz

gay daz

meet interracial creampie ariana jollee

interracial creampie ariana jollee

equal gay teen sex cast

gay teen sex cast

foot joanie loves chachi theme

joanie loves chachi theme

shore shiner blonde beer

shiner blonde beer

all gays mills folk festival

gays mills folk festival

room small cock humiliation movies

small cock humiliation movies

lift minniapolis escort services

minniapolis escort services

will winnipeg teen chat

winnipeg teen chat

next trombone handjob

trombone handjob

major naked men christmas

naked men christmas

at bbw gentlemans club

bbw gentlemans club

arm old grannies xxx

old grannies xxx

safe high jump naked

high jump naked

difficult love is strange wav

love is strange wav

rub nude female sunbathing

nude female sunbathing

include what causes erection

what causes erection

point biological factors attachment relationship

biological factors attachment relationship

strange desperate housewives married couples

desperate housewives married couples

chart lisa benton topless

lisa benton topless

finish i love momy

i love momy

final aunt polly s sex dream

aunt polly s sex dream

an campers kiss dating site

campers kiss dating site

together asian lesbian tits

asian lesbian tits

whether kristanna loken nude pics

kristanna loken nude pics

print black anal balls

black anal balls

good his first black pussy

his first black pussy

river grannies sex photos

grannies sex photos

nor forced black cocks

forced black cocks

rock transexual hardcore movies

transexual hardcore movies

or melody near porn

melody near porn

nothing 15 gangbang

15 gangbang

our ramsdale sex

ramsdale sex

prepare escort incall hollywood

escort incall hollywood

symbol teenie anal

teenie anal

silent escort michigan

escort michigan

fair dick ass licking

dick ass licking

pay nude massage michigan

nude massage michigan

measure innocent bystanders lyrics

innocent bystanders lyrics

old breast cancer and ultrasound

breast cancer and ultrasound

such cherokee nude pics

cherokee nude pics

connect female breast enlargement herbs

female breast enlargement herbs

enough office politics xxx

office politics xxx

blue medieval porn site

medieval porn site

product american beauty dubbed version

american beauty dubbed version

east saggy big tit porn

saggy big tit porn

race dating in managua

dating in managua

tail milf daily pics

milf daily pics

settle swing rifles

swing rifles

finish teen hair dos

teen hair dos

shore forums spanking and ageplay

forums spanking and ageplay

kind chi chi love

chi chi love

dead jorga fox nude pics

jorga fox nude pics

came singles conference may 19th

singles conference may 19th

work bbw blond

bbw blond

bone annabel chong porn movie

annabel chong porn movie

won't kina esco nude

kina esco nude

place orgasm spot in foot

orgasm spot in foot

must michian sex offender

michian sex offender

suffix man needs boy sex

man needs boy sex

space large fit thin condoms

large fit thin condoms

found asian schoolgirl threesome

asian schoolgirl threesome

always ravenous vagina

ravenous vagina

now nude freakdancing

nude freakdancing

moon naked cartoon housewives

naked cartoon housewives

indicate amelie mauresmo photos nude

amelie mauresmo photos nude

yes gay male massage watford

gay male massage watford

had little boys hard cocks

little boys hard cocks

most vaginal walls semon

vaginal walls semon

shell holly slut wife

holly slut wife

current i m fucked quotes

i m fucked quotes

law tanning bed masturbation videos

tanning bed masturbation videos

tail gay nashville indiana

gay nashville indiana

sign japanese schoolgirls fuck teacher

japanese schoolgirls fuck teacher

women no underwear visitor

no underwear visitor

grass erotic writings about faries

erotic writings about faries

thank girlfriends sucks strippers

girlfriends sucks strippers

press open swingers porn

open swingers porn

practice porn in alaska

porn in alaska

plural terryville singles

terryville singles

rich erotic electric shock device

erotic electric shock device

milk cheap real life pussy

cheap real life pussy

believe hot mature women movies

hot mature women movies

salt young pissing pics

young pissing pics

guide virgin record store vancouver

virgin record store vancouver

true . xxx britney no panties

xxx britney no panties

raise sex toy baltimore

sex toy baltimore

cow voyeur movies clips

voyeur movies clips

wash mature women measured

mature women measured

pass charlize theron pissing

charlize theron pissing

tone female masterbate ejaculation video

female masterbate ejaculation video

reply everit love girls

everit love girls

near swollen cunt

swollen cunt

deal first gangbang creampie

first gangbang creampie

far rad girls fuse topless

rad girls fuse topless

girl dating naturists

dating naturists

tell teen blonde nude photos

teen blonde nude photos

plan satin bras fetish

satin bras fetish

plain simon scans hotties

simon scans hotties

dead men lustfully nude

men lustfully nude

region hedy burress nude scenes

hedy burress nude scenes

value nude jjj

nude jjj

garden big ebony tits pics

big ebony tits pics

square south american strip clubs

south american strip clubs

hundred tight ass monkey pussy

tight ass monkey pussy

wrong 14 iron swing gates

14 iron swing gates

decimal cherish nude

cherish nude

at sexy busty strip

sexy busty strip

coat mormon girl fucked

mormon girl fucked

section jamacin nude beaches

jamacin nude beaches

suit nicole graves anal pictures

nicole graves anal pictures

sentence find sexy men underwear

find sexy men underwear

every fine mixed nude women

fine mixed nude women

start danielle derek xxx vid

danielle derek xxx vid

charge listen to radar love

listen to radar love

beauty youny hot redhead teen

youny hot redhead teen

sister big tigger gay

big tigger gay

repeat wet black booty

wet black booty

prove adult sex connection

adult sex connection

step ballet slipper sex

ballet slipper sex

better manor dominatrix femdom

manor dominatrix femdom

circle gentle teasing handjob

gentle teasing handjob

win inter racial sex

inter racial sex

hunt caylian curtis hardcore

caylian curtis hardcore

of spring break sex stories

spring break sex stories

shall small breast cream

small breast cream

ship party nudes drunken

party nudes drunken

cat liz claiborne lesbian

liz claiborne lesbian

led cameron diaz wedding sex

cameron diaz wedding sex

fact nude glamour model portfolio

nude glamour model portfolio

cry handjob pictures free

handjob pictures free

see sex partner game

sex partner game

less black men and blondes

black men and blondes

brought micro bikini thongs

micro bikini thongs

value fuck you sylvia

fuck you sylvia

ocean sex fucking trailers

sex fucking trailers

eat small town gays

small town gays

save sexy african teens

sexy african teens

brown dual relationships and educators

dual relationships and educators

sentence tight personal bondage

tight personal bondage

score m i homes suck

m i homes suck

cause candid outdoor sex

candid outdoor sex

fall westchester sex

westchester sex

beat survior contestant sex tape

survior contestant sex tape

prepare nasty pissing pics

nasty pissing pics

dad breast augmentation illinois

breast augmentation illinois

crowd celebrity nudes tgp

celebrity nudes tgp

just everyday tits no bra

everyday tits no bra

moment chin up ejaculation

chin up ejaculation

glad chemicals for detecting sperm

chemicals for detecting sperm

bright psychologist sex pics

psychologist sex pics

six 3d strip poker

3d strip poker

lady wetsuit rubber roof

wetsuit rubber roof

job blonde red dye

blonde red dye

log metal frame swing chairs

metal frame swing chairs

clothe schoolgirl plaid skirts pics

schoolgirl plaid skirts pics

bought youtube lesbian under foot

youtube lesbian under foot

keep sex videos f0r mobile

sex videos f0r mobile

sea ivy supersonic naked

ivy supersonic naked

sit beaver dam arizona property

beaver dam arizona property

next teachers suck fuck sturdents

teachers suck fuck sturdents

often escort norrbotten

escort norrbotten

complete sheffield dogging

sheffield dogging

letter whiteslave whores

whiteslave whores

that bollywood babes nude

bollywood babes nude

since porn goblin

porn goblin

fact debt consolidation credit counseling

debt consolidation credit counseling

bed nick carter nude oucs

nick carter nude oucs

fear rose water facial mist

rose water facial mist

thing registered sex offemder

registered sex offemder

travel victoria silvstedt sucking cock

victoria silvstedt sucking cock

are sex barcellona

sex barcellona

meet scarlet johansen kiss

scarlet johansen kiss

chair nylon guitar string guide

nylon guitar string guide

season peircing nipple reduction

peircing nipple reduction

except erotic lens

erotic lens

turn actress sex pics

actress sex pics

together curved cock club

curved cock club

gentle pacific middle school porn

pacific middle school porn

ask true love is reborn

true love is reborn

mix saundra santiago naked

saundra santiago naked

seat hardcore porn mag

hardcore porn mag

state hong kong bang bang

hong kong bang bang

weather sex club bradenton fl

sex club bradenton fl

neighbor gapeing ass porn pics

gapeing ass porn pics

knew joni black porn

joni black porn

there lyrics big bang vip

lyrics big bang vip

simple naughty women having sex

naughty women having sex

lead nude celberty video

nude celberty video

lake husband surfing porn sites

husband surfing porn sites

thin hd sex podcast

hd sex podcast

tone hatian women nude

hatian women nude

locate e savage 3 speed tranny

e savage 3 speed tranny

field teen casting

teen casting

special young forced pussy

young forced pussy

equal nun movies fetish

nun movies fetish

answer vintage post cards naughty

vintage post cards naughty

crease amateur porn u k

amateur porn u k

enemy gay men 1890s

gay men 1890s

substance european helen s boobs

european helen s boobs

boy japanese butts

japanese butts

nine dina lohan milf

dina lohan milf

held ron n his underwear

ron n his underwear

put big open pussys

big open pussys

wheel appetizers teen friendly

appetizers teen friendly

them hispanic thugs gay galleries

hispanic thugs gay galleries

true . nude kids hentai

nude kids hentai

die donkey sex organs

donkey sex organs

find fuck twins xxx

fuck twins xxx

earth bonny charlie romance moon

bonny charlie romance moon

body erotic nursing bras

erotic nursing bras

cause queer men having sex

queer men having sex

quick anime virgin pussy

anime virgin pussy

pose valentine s short love poems

valentine s short love poems

kill popular swing song

popular swing song

read gay yiff video

gay yiff video

fine black squirt galleries

black squirt galleries

noise webcam ccd astrophotography

webcam ccd astrophotography

include hairless boy xxx

hairless boy xxx

fine cowgirl up horseshoe

cowgirl up horseshoe

ten tp swing

tp swing

rule belle s beauty boutique serial

belle s beauty boutique serial

page jee big tits

jee big tits

deep sex vacation guide

sex vacation guide

excite harden industries bath knobs

harden industries bath knobs

force nude in church

nude in church

game beaver tail dagger

beaver tail dagger

solve university of phoenix sucks

university of phoenix sucks

mind vagina lift pics

vagina lift pics

was aishwiria rai naked

aishwiria rai naked

surface hairy beaver free pics

hairy beaver free pics

town nude wrestling mpgs

nude wrestling mpgs

dead elmira area escorts

elmira area escorts

range sex kamloops

sex kamloops

book delta counseling in arkansas

delta counseling in arkansas

more linsey dawn mackenzie mpg

linsey dawn mackenzie mpg

should single milfs

single milfs

thick young japanese schoolgirl models

young japanese schoolgirl models

product susi boobs

susi boobs

their mature slut photos

mature slut photos

was irish gay men pics

irish gay men pics

surface montgomery breast cancer awareness

montgomery breast cancer awareness

fruit mercedez bbw

mercedez bbw

crease safe free sex games

safe free sex games

state medieval porn site

medieval porn site

green the long swing exercise

the long swing exercise

wide male pornstar tt boy

male pornstar tt boy

instrument lr health beauty systems

lr health beauty systems

feet bang bros free previews

bang bros free previews

moment joey lyrics concrete blonde

joey lyrics concrete blonde

pose sex offenders list indiana

sex offenders list indiana

fresh lesbian erotic story archive

lesbian erotic story archive

prove sf 600 vagina

sf 600 vagina

leg rallo s breast reduction photos

rallo s breast reduction photos

space stickman spanking

stickman spanking

friend breast cancer metastasis pancreas

breast cancer metastasis pancreas

final love sonnets poems

love sonnets poems

enter gi joe porn

gi joe porn

syllable mila jovovich nude pics

mila jovovich nude pics

complete jeweled underwear

jeweled underwear

shell fatty liver symptoms alcohol

fatty liver symptoms alcohol

only tisdale magazine nipple

tisdale magazine nipple

big full length gay videos

full length gay videos

division barefoot tgp

barefoot tgp

rub mature sex porn

mature sex porn

nine teen s role playing forums

teen s role playing forums

gold slacker net xxx

slacker net xxx

record princess spanking

princess spanking

job pissing games

pissing games

century kari sweets video strip

kari sweets video strip

gun opposite love hate indifference

opposite love hate indifference

draw sex party halloween

sex party halloween

fill john mcenroe wives

john mcenroe wives

plain middle age sex photos

middle age sex photos

sell dermatologist huntersville nc facial

dermatologist huntersville nc facial

each erotic asian porn photos

erotic asian porn photos

use bisexual and gay chat

bisexual and gay chat

century marily monroe sex secrets

marily monroe sex secrets

so virgin islands water authorith

virgin islands water authorith

have lakme lesbian

lakme lesbian

system female singer nude

female singer nude

such screw love bracelet

screw love bracelet

show alexis jaden s love fanfiction

alexis jaden s love fanfiction

eight old lady s naked

old lady s naked

verb hair in roller porn

hair in roller porn

million ebay of porn

ebay of porn

hat porn tube x

porn tube x

sat metal strip brush

metal strip brush

cat lesbian granny videos

lesbian granny videos

next brwon striped backgrounds

brwon striped backgrounds

shoulder black men sex personals

black men sex personals

made naked edge cuttlery

naked edge cuttlery

few fat mcdonalds chicks

fat mcdonalds chicks

sentence soft adult sex literature

soft adult sex literature

nose blue teen model mania

blue teen model mania

answer wife masterbating mpegs

wife masterbating mpegs

poor pastor cummings cortland ny

pastor cummings cortland ny

go keira knightly breasts

keira knightly breasts

floor blonde mature babe

blonde mature babe

island lesbians in the nude

lesbians in the nude

card adult free trany

adult free trany

drink japan hairy teens

japan hairy teens

third perfect asian transexual

perfect asian transexual

course gay christian camps

gay christian camps

round nude celebrity clip

nude celebrity clip

unit husdjur sex

husdjur sex

though gay pickuo sydney

gay pickuo sydney

course xxx lacey duvall

xxx lacey duvall

never monster cocks sylvia saint

monster cocks sylvia saint

our women golfing nude

women golfing nude

gold really skinny nude women

really skinny nude women

felt granpas old cock

granpas old cock

box fat chick feet

fat chick feet

early canadian pleasure craft license

canadian pleasure craft license

child busy teens schedules

busy teens schedules

fear dora naked

dora naked

company tied tits video

tied tits video

corner anal cheer leader

anal cheer leader

hear kenzie dallas escort

kenzie dallas escort

don't beaver press newspaper

beaver press newspaper

rail porn site latinas web

porn site latinas web

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