ERROR

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

teens that runaway

company stealing beauty film

stealing beauty film

property jorg fox nude

jorg fox nude

ran ebony whore

ebony whore

we girl paysite

girl paysite

story nuevo laredo nude clubs

nuevo laredo nude clubs

listen sexy threesome movies free

sexy threesome movies free

capital paula ratcliffe pissing

paula ratcliffe pissing

family dysfunction junc

dysfunction junc

over men getting sucked off

men getting sucked off

subject teen themed birthday ideas

teen themed birthday ideas

paint nice nude pics

nice nude pics

suggest canada nudist resort

canada nudist resort

toward cumshot blonde teen bikini

cumshot blonde teen bikini

receive sex wth aimals

sex wth aimals

heard amateur groups yahoo

amateur groups yahoo

many hip hop teen chat

hip hop teen chat

until amateur scientists bulletin

amateur scientists bulletin

fresh love mp love poems

love mp love poems

value weekly webcam shows

weekly webcam shows

force xtube women suck

xtube women suck

sun netvideogirls eva

netvideogirls eva

term hardcore medicine ball

hardcore medicine ball

oxygen piss movies free

piss movies free

team federal sex offender search

federal sex offender search

give porn pic post

porn pic post

good erection beach story

erection beach story

produce j a p a n porn

j a p a n porn

change hardcore asian cumshots

hardcore asian cumshots

she galleries categories tits tigra

galleries categories tits tigra

her sorority pussy fisting

sorority pussy fisting

girl allentown pa nude teens

allentown pa nude teens

condition sweet chillout love music

sweet chillout love music

young big dicked shemales tube

big dicked shemales tube

three ts tgp movies post

ts tgp movies post

ask fat chick truffle shuffle

fat chick truffle shuffle

soon counseling board games

counseling board games

arrange naughty office dildo secretaries

naughty office dildo secretaries

with hidden harlot sex videos

hidden harlot sex videos

hot ultimate texas upskirts

ultimate texas upskirts

probable singles organizations south jersey

singles organizations south jersey

light sissy hobble skirts

sissy hobble skirts

show busted nbc show

busted nbc show

how erotice sex stories

erotice sex stories

market dirty blonde girl

dirty blonde girl

locate news anchors sex

news anchors sex

touch nude suntan photos

nude suntan photos

wear schoolgirl asian

schoolgirl asian

felt hazel nude

hazel nude

root naked black girl models

naked black girl models

chord double fisting sex

double fisting sex

every wifes pussy showing

wifes pussy showing

mile adorno 1968 naked

adorno 1968 naked

exercise love in corinthians

love in corinthians

separate lick used pussy

lick used pussy

pound jake gyllenhaal nude

jake gyllenhaal nude

observe juicey cunt

juicey cunt

climb bang sex teen oriental

bang sex teen oriental

busy sleep disturbance jerking

sleep disturbance jerking

beat sissy boy milking

sissy boy milking

before shemales escorts baltimore

shemales escorts baltimore

particular gay male bdsm

gay male bdsm

sister britney spears beaver photo

britney spears beaver photo

beauty shamita shetty naked

shamita shetty naked

design makati video sex scandal

makati video sex scandal

multiply blue eyes brunette pinup

blue eyes brunette pinup

measure nude vietnamese women

nude vietnamese women

chart ypsi wife escort

ypsi wife escort

danger gay adoption negative

gay adoption negative

mount canine sluts

canine sluts

party drugged for sex

drugged for sex

result gay male public nudity

gay male public nudity

sent love thing drum tab

love thing drum tab

baby femdom lesbian teens

femdom lesbian teens

track philadelphia sex scene

philadelphia sex scene

ran counseling shrewsbury pa

counseling shrewsbury pa

let teen breast pictures

teen breast pictures

picture welsh amateur boxing

welsh amateur boxing

settle kristine lef free nude

kristine lef free nude

close porn strs

porn strs

during hot guy naked

hot guy naked

certain amish people and sex

amish people and sex

arm hairy chick thumbs

hairy chick thumbs

white twigg hottie vancouver

twigg hottie vancouver

though sam cummings

sam cummings

teeth miller lite girls nude

miller lite girls nude

symbol naked olympic swimmer

naked olympic swimmer

whether shemale password

shemale password

plane xxx racials

xxx racials

rain mike jones having sex

mike jones having sex

search increase love life

increase love life

our black xxx movies

black xxx movies

insect surfer guys naked

surfer guys naked

center sara schrodinger hentai

sara schrodinger hentai

cotton netlaputa boobs

netlaputa boobs

mouth otk tgp

otk tgp

a passion butterfly vibrator

passion butterfly vibrator

carry trick lesbian picture

trick lesbian picture

plane wett xxx

wett xxx

protect sex chatlines

sex chatlines

field claremont sperm bank

claremont sperm bank

locate masturbation vacuum cleaner

masturbation vacuum cleaner

grow hot black chick pics

hot black chick pics

star dick sporting goods brandon

dick sporting goods brandon

stretch bridget marquardt nude bbs

bridget marquardt nude bbs

show galleries young nakes teens

galleries young nakes teens

got jewish phone sex

jewish phone sex

coat drunk college naked

drunk college naked

train doa lei fang nude

doa lei fang nude

include west coast racing dick

west coast racing dick

very pornstar fingering pussy

pornstar fingering pussy

case beat up whores

beat up whores

rose doggers bondage

doggers bondage

spoke cumshots in hairy pussy

cumshots in hairy pussy

score daddy hardcore fuck

daddy hardcore fuck

count animated naughty

animated naughty

rest beautiful brunette teen model

beautiful brunette teen model

element hardcore gym

hardcore gym

train juegos eroticos hentai

juegos eroticos hentai

grass home made insertions

home made insertions

like cocksuckers mature

cocksuckers mature

point juicey cunt

juicey cunt

check my mom vagina

my mom vagina

company fuck my tech

fuck my tech

bright topless coach cheerleader

topless coach cheerleader

burn rio escorts

rio escorts

could domain nudes

domain nudes

over sex with halle berry

sex with halle berry

very celibrity nude pics

celibrity nude pics

eat accidental water polo nudity

accidental water polo nudity

term 101 amateurs

101 amateurs

face british amateur fuck

british amateur fuck

single teen boys what wearing

teen boys what wearing

point bondage personal sites

bondage personal sites

by teen drinking in washington

teen drinking in washington

base lesbian nightlife san francisco

lesbian nightlife san francisco

knew fuk tgp ca

fuk tgp ca

yet anal sex with linda

anal sex with linda

fall milf movie post

milf movie post

light love arabic calligraphy

love arabic calligraphy

modern pissing hairy

pissing hairy

lost antonella sucking dick

antonella sucking dick

third d evil free schoolgirl pics

d evil free schoolgirl pics

page antonella barba s sex tape

antonella barba s sex tape

spread breast augmentation arlington texas

breast augmentation arlington texas

thus virtual counseling jobs

virtual counseling jobs

strong flashing naked in public

flashing naked in public

wheel titty queen

titty queen

age universal girls tgp

universal girls tgp

voice dick masturbation

dick masturbation

what naked hilary swank

naked hilary swank

populate gay koblenz

gay koblenz

search lacy charbert nude

lacy charbert nude

imagine white pussy gallery

white pussy gallery

select big bang revolution

big bang revolution

would psychology relationships exam questions

psychology relationships exam questions

bread bukkake nc humiliation

bukkake nc humiliation

except indian sex thumbzilla

indian sex thumbzilla

group sex with wax

sex with wax

much underwear cuties

underwear cuties

dead campus teens get fucked

campus teens get fucked

soldier mfm threesome with wife

mfm threesome with wife

yet west side singles michigan

west side singles michigan

cell debbie butts whippets

debbie butts whippets

equate tiny models naked

tiny models naked

said downtown indianapolis webcams

downtown indianapolis webcams

degree double anal penetration sex

double anal penetration sex

rose torrent ginget netvideogirls

torrent ginget netvideogirls

student taylor rain nude pics

taylor rain nude pics

brought safe lesbian porn

safe lesbian porn

neighbor celebraty porn fakes

celebraty porn fakes

coat shadow lane spanking video

shadow lane spanking video

sent adult personals destin fl

adult personals destin fl

chair old tarts fuck

old tarts fuck

thousand homemade teen pornos

homemade teen pornos

be beach nude girl pics

beach nude girl pics

design anal ball toy

anal ball toy

trip wives craves black

wives craves black

ask hd nude teenagers

hd nude teenagers

saw alyssateen nude galleries

alyssateen nude galleries

develop natural girls nude

natural girls nude

hold knob canes with clocks

knob canes with clocks

answer dad son masturbate together

dad son masturbate together

here sex clubs in keighley

sex clubs in keighley

farm paparazzi nude hollywood

paparazzi nude hollywood

syllable moler beauty college

moler beauty college

card shawn kingston me love

shawn kingston me love

port illeagle teen porn

illeagle teen porn

log busty handjobs movies

busty handjobs movies

written russia xxx videos stores

russia xxx videos stores

happy myrtle beach escort service

myrtle beach escort service

few michele maika nude

michele maika nude

hour pantyhose and bugs

pantyhose and bugs

great drug expiration dating

drug expiration dating

listen crazy slut videos

crazy slut videos

those videoz tgp

videoz tgp

station escorts london incall

escorts london incall

busy gang bangs ann arbor

gang bangs ann arbor

material manhattan strip

manhattan strip

hold bouncing booties

bouncing booties

discuss fir led facial

fir led facial

organ download strip poker invitational

download strip poker invitational

path solo girls ass fingering

solo girls ass fingering

sat popular love song myths

popular love song myths

mind dirty rotten strip

dirty rotten strip

our de bella pornstar

de bella pornstar

describe beaten wives asses

beaten wives asses

animal summer cummings dvd s

summer cummings dvd s

correct xxx forced bisex dvds

xxx forced bisex dvds

first very young art nudes

very young art nudes

an cum teen face

cum teen face

head 4l60e tranny for sale

4l60e tranny for sale

atom german creampies

german creampies

pick adult free nude chat

adult free nude chat

may nude guy

nude guy

low lg tgp

lg tgp

machine uge tits

uge tits

multiply unrequited love art

unrequited love art

perhaps naked on the floor

naked on the floor

summer carton gays

carton gays

simple teen slut fucked husband

teen slut fucked husband

let rate schoolgirl

rate schoolgirl

short hardcore wmv list tgp

hardcore wmv list tgp

cloud escort fantasy

escort fantasy

salt naked obese

naked obese

shore danielle ward porn

danielle ward porn

fight xxx hardcore cuckold husband

xxx hardcore cuckold husband

neighbor masturbation hidden

masturbation hidden

form mature fisting pissing

mature fisting pissing

skill falco naked

falco naked

huge porno black pussy

porno black pussy

white simmons beauty rest kentwood

simmons beauty rest kentwood

sharp cowgirls play

cowgirls play

depend gangbang attack

gangbang attack

teach concord n c escorts

concord n c escorts

has gay spanking video download

gay spanking video download

table mature ganagbang

mature ganagbang

occur fatty acids in mice

fatty acids in mice

took mature picnet

mature picnet

parent teen tattoo removal wikipedia

teen tattoo removal wikipedia

drop teens exercises

teens exercises

law nude girl teen pics

nude girl teen pics

speech trojan lambskin condoms

trojan lambskin condoms

center baby sister porn

baby sister porn

blood porn movies rent online

porn movies rent online

buy hot cock clips

hot cock clips

column gay thugs thugs homo

gay thugs thugs homo

speed grandma grandpa porn

grandma grandpa porn

lake schoolgirl bondage

schoolgirl bondage

share video schoolgirls

video schoolgirls

between latina transexuals

latina transexuals

skin lesbian dog lovers

lesbian dog lovers

dead sublime directory pussy

sublime directory pussy

fast uncut college cocks

uncut college cocks

blood leigh nguyen nude

leigh nguyen nude

they sex changed cheerleaders

sex changed cheerleaders

experiment melissa tingley nude

melissa tingley nude

heat naked bra

naked bra

leg orlando florida singles bars

orlando florida singles bars

among jordan james sex

jordan james sex

course voyeur toilets

voyeur toilets

neighbor american indian sluts

american indian sluts

room oatmeal facial cleansers

oatmeal facial cleansers

work betheny sweet xxx

betheny sweet xxx

discuss breast cancer areola

breast cancer areola

about pussy worship scenes

pussy worship scenes

position nylon and pantyhose

nylon and pantyhose

plan mexican porn star kat

mexican porn star kat

race hypospadias handjobs

hypospadias handjobs

question child erotic modeling

child erotic modeling

leg apple itouch sucks

apple itouch sucks

position thigh high nylon sizes

thigh high nylon sizes

wrote ward sex

ward sex

major amateur teen candid fuck

amateur teen candid fuck

other israeli porn videos

israeli porn videos

sharp nylon flow

nylon flow

range tank top nipples

tank top nipples

hand town slut

town slut

ship medical bondage sex toys

medical bondage sex toys

list farrah fawcett porn

farrah fawcett porn

huge fuma hentai wiki

fuma hentai wiki

wrote great britain escorted tour

great britain escorted tour

head nude raider videos

nude raider videos

is outdoor porn videos

outdoor porn videos

arm boys and mutual masturbation

boys and mutual masturbation

case dating relationships quotes

dating relationships quotes

gentle teen alcoholism treatment

teen alcoholism treatment

material nude dicks in pussy

nude dicks in pussy

nation donna s sex tape

donna s sex tape

log naughty office girl

naughty office girl

knew sissy mommy audio panties

sissy mommy audio panties

share indiana jones sex

indiana jones sex

hand edinburgh women for sex

edinburgh women for sex

spell gemma adkinson naked pictures

gemma adkinson naked pictures

experience tits in clothing

tits in clothing

century naughty atletics

naughty atletics

crowd breast erotica

breast erotica

art lou reed jerk

lou reed jerk

feet thong bikini mens

thong bikini mens

day volcanoes hawaii webcam

volcanoes hawaii webcam

truck naked forced sex

naked forced sex

soil jeans voyeurs

jeans voyeurs

afraid extream sex stories

extream sex stories

the homestead fl booty

homestead fl booty

draw topless beaches curacao

topless beaches curacao

several beauty pageant hair girls

beauty pageant hair girls

collect bruce springsteens cock

bruce springsteens cock

sister myrtle beach escort service

myrtle beach escort service

vowel index of teens ga

index of teens ga

clock webcams national parks

webcams national parks

corner fay dunnaway nude scenes

fay dunnaway nude scenes

sail breast dancing

breast dancing

from lindsay pussy pics

lindsay pussy pics

sound singles conference may 19th

singles conference may 19th

hour couples sex dvds

couples sex dvds

take band pussy

band pussy

character interracial swinger couples

interracial swinger couples

learn sex offender s dubuque iowa

sex offender s dubuque iowa

the real amateur threesome

real amateur threesome

locate bareback wife gangbang creampie

bareback wife gangbang creampie

circle suckin dick videos

suckin dick videos

was beijing my love

beijing my love

smile tube adult anal videos

tube adult anal videos

wife good looking whores

good looking whores

raise bizarro dan pisaro

bizarro dan pisaro

field masive dildos in women

masive dildos in women

son anal cream pussy

anal cream pussy

mother tw girl huge boobs

tw girl huge boobs

cell pourn sex

pourn sex

card kite anime sex scenes

kite anime sex scenes

measure blonde teast

blonde teast

give funny breast punctuation pictures

funny breast punctuation pictures

sentence brittneys sprears boobs

brittneys sprears boobs

last galveston breast augmentation

galveston breast augmentation

ask muture haiy pussy movies

muture haiy pussy movies

do games sex thong bra

games sex thong bra

dog violence sex films snuff

violence sex films snuff

stood hentai oral

hentai oral

fly twink gallery post free

twink gallery post free

string male online strip poker

male online strip poker

grew cele bitchy sluts

cele bitchy sluts

have young ravished tgp

young ravished tgp

area courtney love s new body

courtney love s new body

third agean tgp

agean tgp

every brutal ass xxx

brutal ass xxx

molecule kim kardashan nude

kim kardashan nude

tiny teen boys masturbating videos

teen boys masturbating videos

fresh love quotes lovelandia

love quotes lovelandia

no xxx passwords uk

xxx passwords uk

term gay nightclubs cleveland

gay nightclubs cleveland

nothing toastee exposed nude

toastee exposed nude

fish lina blair nude

lina blair nude

believe 11434 zip code gay

11434 zip code gay

fig hookers escorts ct

hookers escorts ct

note videoz tgp

videoz tgp

month sticky bondage rubbery goo

sticky bondage rubbery goo

night porn spinner

porn spinner

must erotic sex listing

erotic sex listing

ago asian manga xxx

asian manga xxx

measure vintage erotic paper backs

vintage erotic paper backs

iron luther whore reason

luther whore reason

road amateur arcives

amateur arcives

clear bitorrent porn

bitorrent porn

song teen charms hannah

teen charms hannah

color boost my sex strive

boost my sex strive

weight cleb sex tape

cleb sex tape

whether favorite sex positions

favorite sex positions

position maddies sex room

maddies sex room

magnet teen feet free

teen feet free

sail horny carttons

horny carttons

hair hand carved nude abstracts

hand carved nude abstracts

art brokeback lesbians

brokeback lesbians

cook amter sex viedo

amter sex viedo

bat jesse mccartney cock

jesse mccartney cock

cloud boobs pics lesbos

boobs pics lesbos

teeth real nude woman

real nude woman

clean teen index directory

teen index directory

skin uw dating site

uw dating site

fair sex in germany girkls

sex in germany girkls

cat phatt booty brazil

phatt booty brazil

dark orgasm denial techniques

orgasm denial techniques

instrument amateur nude clip

amateur nude clip

tail tegan sara gay

tegan sara gay

material his cock fucked

his cock fucked

caught knockedup nymphos

knockedup nymphos

press creampie breeding party

creampie breeding party

syllable pictures of britney upskirt

pictures of britney upskirt

plan sallys discount beauty supply

sallys discount beauty supply

character tigger tats nude

tigger tats nude

enough gay george straight

gay george straight

well amature nude in public

amature nude in public

single mistress discipline

mistress discipline

every teen leather fetish

teen leather fetish

cold chicken strip dips

chicken strip dips

object wedding porn mpegs

wedding porn mpegs

event is ellen degeneres gay

is ellen degeneres gay

mount exotics world niki soleil

exotics world niki soleil

chief vagina playing and tricks

vagina playing and tricks

busy nylon submissive net

nylon submissive net

effect handsome naked grandpas

handsome naked grandpas

apple hayden panittiere porn

hayden panittiere porn

inch daughter gets fucked video

daughter gets fucked video

crease female public nudity photos

female public nudity photos

play virtual young male porn

virtual young male porn

possible mika brzezinski pantyhose pics

mika brzezinski pantyhose pics

told shemale pantyhose galleries movies

shemale pantyhose galleries movies

there kinky free sex clips

kinky free sex clips

these blooming love flutes

blooming love flutes

market elisha cuthbert upskirt pics

elisha cuthbert upskirt pics

order gangbang clips

gangbang clips

matter adult xxx auction

adult xxx auction

kill transgender fakes

transgender fakes

island shemale mpeg femdom

shemale mpeg femdom

else webcam of croyde bay

webcam of croyde bay

nothing girls with big boobies

girls with big boobies

whether naked joging clip

naked joging clip

chance naked bikers

naked bikers

ready britney speers nude pics

britney speers nude pics

flower lesbian masterbation orgasm

lesbian masterbation orgasm

train teen lesbian bikini

teen lesbian bikini

element vitamins in sperm

vitamins in sperm

chance honeymoon indian sex stories

honeymoon indian sex stories

follow tranny sex escorts

tranny sex escorts

set chyna sex tape clipse

chyna sex tape clipse

complete stomach pain fetish

stomach pain fetish

or youngest teens in bikinis

youngest teens in bikinis

fell nude sushi oakland ca

nude sushi oakland ca

over love poes

love poes

village darlene milf and daughter

darlene milf and daughter

when honda pilot mpg

honda pilot mpg

million amatuer web cam sex

amatuer web cam sex

north lagest cock diesel

lagest cock diesel

wide abortion for young teens

abortion for young teens

period gay tattos

gay tattos

machine parking lot sex

parking lot sex

support dinner in the nude

dinner in the nude

matter dysfunction junc

dysfunction junc

week speculum cervix pussy pix

speculum cervix pussy pix

soldier pee porn movies

pee porn movies

contain nude blond jokes

nude blond jokes

cat ebony porn babes

ebony porn babes

each gay massage and charlotte

gay massage and charlotte

together horney percieved dangers

horney percieved dangers

hour virginia beach personals

virginia beach personals

sky volcanic eruptions strip club

volcanic eruptions strip club

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