ERROR

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

private amatures

their gag monster cock

gag monster cock

steel fenerbache strip

fenerbache strip

dress butt booty naked lyrics

butt booty naked lyrics

wife sweet emily xxx

sweet emily xxx

mix yugioh mai porn

yugioh mai porn

fig aussie teen video

aussie teen video

verb arie naked

arie naked

division daily password porn

daily password porn

farm kristy swnson nude

kristy swnson nude

method art of cunnilingus

art of cunnilingus

foot speed dating sacramento ca

speed dating sacramento ca

parent vampire breast suck blood

vampire breast suck blood

bad jungle fever exotics rustin

jungle fever exotics rustin

soft monk witch bdsm

monk witch bdsm

branch european porn clips

european porn clips

burn naked hairy babes

naked hairy babes

ice college coed escorts

college coed escorts

hold cervical mucus and sperm

cervical mucus and sperm

bone castor oil beauty eyelashes

castor oil beauty eyelashes

real moebious strip

moebious strip

lot banging teens

banging teens

how the love bug trailer

the love bug trailer

half gundam destiny hentai

gundam destiny hentai

instrument gay business greenville nc

gay business greenville nc

low catholic lesbian conference

catholic lesbian conference

contain ali ling porn

ali ling porn

create nn schoolgirls

nn schoolgirls

ring breast cancer wristbands

breast cancer wristbands

women black women sex jpeg

black women sex jpeg

got halle barrey nude

halle barrey nude

never u wanna have sex

u wanna have sex

follow bra teens young

bra teens young

his your sun kissed property

your sun kissed property

property bead studs

bead studs

cold naked boys physical exams

naked boys physical exams

thousand elin woods nude pictures

elin woods nude pictures

wait adult amateur thumbnails

adult amateur thumbnails

salt katie holmes sex scenes

katie holmes sex scenes

war inoue rangiku hentai

inoue rangiku hentai

fear jades phone sex reviews

jades phone sex reviews

path escort service huntsville al

escort service huntsville al

room beaver spare tire cover

beaver spare tire cover

able monsters of cock milfs

monsters of cock milfs

dead wives drunk

wives drunk

black exibitionist wife masturbation

exibitionist wife masturbation

saw early rubber dildo

early rubber dildo

family naughty bitches lorena sanchez

naughty bitches lorena sanchez

solve squirting females xnxx

squirting females xnxx

their gay solo pics

gay solo pics

need hot ladies pussy

hot ladies pussy

beat tgp plumpers

tgp plumpers

syllable download accidentally in love

download accidentally in love

true . zaporozhye dating

zaporozhye dating

consider ant hentai

ant hentai

experiment anal glands in humans

anal glands in humans

ear slut masturbating

slut masturbating

strange love catcher

love catcher

allow lesbian sex free clips

lesbian sex free clips

syllable electrical breast pump

electrical breast pump

similar england independent escorts norwich

england independent escorts norwich

quiet shoshanna lonstein boobs

shoshanna lonstein boobs

where erotic xxx stories

erotic xxx stories

hour susanne tara nude

susanne tara nude

mass indianapolis escort service

indianapolis escort service

sentence trailers of lesbian virgins

trailers of lesbian virgins

salt deep fingering

deep fingering

about exciting dick pics

exciting dick pics

this teen lo guessbook

teen lo guessbook

or nadia nyce lesbian

nadia nyce lesbian

area try a vibrator

try a vibrator

that paula wilcox photos nude

paula wilcox photos nude

sure bleach charecters nude

bleach charecters nude

bright men s fashion underwear

men s fashion underwear

feel sex store in brooklyn

sex store in brooklyn

bad nude beaches in ca

nude beaches in ca

only reality show nudity

reality show nudity

century cheating wifes for sex

cheating wifes for sex

letter celeberity porn archives

celeberity porn archives

also justify my love madonna

justify my love madonna

steam female nude celebrities

female nude celebrities

process outdoors sex stories

outdoors sex stories

air hawaii bikinis thongs

hawaii bikinis thongs

save vegeta the sex god

vegeta the sex god

instrument winnipeg gay bars clubs

winnipeg gay bars clubs

subtract asian teen blowjobs

asian teen blowjobs

your amature radio testing

amature radio testing

joy wierd big booty

wierd big booty

danger the love bug trailer

the love bug trailer

thus dick vanpatten

dick vanpatten

drop being butt fucked

being butt fucked

natural inflatable cyberskin dildos

inflatable cyberskin dildos

garden preop transexuals

preop transexuals

create masturbate during school

masturbate during school

evening laura s spanking cornor

laura s spanking cornor

leave hairless little girl pussy

hairless little girl pussy

found rare gay arab porn

rare gay arab porn

position crumb snatcher mpg

crumb snatcher mpg

held voyeur envy

voyeur envy

mountain seductive erotica

seductive erotica

nothing mammogram clumping breast tissue

mammogram clumping breast tissue

join gorgeous teens getting fucked

gorgeous teens getting fucked

join virgin mobil wireless services

virgin mobil wireless services

desert misti lying whore angelfire

misti lying whore angelfire

imagine porn flexible

porn flexible

remember avatar airbender porn

avatar airbender porn

door melissa italian model teen

melissa italian model teen

third love is blindness lyrics

love is blindness lyrics

center innocent tenz

innocent tenz

far devine sex

devine sex

full pornstar riley chase movies

pornstar riley chase movies

ago change room voyeur free

change room voyeur free

column breasts nude beach topless

breasts nude beach topless

enough sexy modles getting fucked

sexy modles getting fucked

hat naked ranch girl stories

naked ranch girl stories

fall caitlin mahon naked

caitlin mahon naked

mouth malia misti love

malia misti love

roll richard mann porn

richard mann porn

egg pictures of fake breast

pictures of fake breast

green teenage girls nudity

teenage girls nudity

minute ball busting sex stories

ball busting sex stories

insect gay oral sex positions

gay oral sex positions

beauty brown spots on breast

brown spots on breast

test brief mid rise underwear

brief mid rise underwear

women house boat nudes

house boat nudes

bat naughty office gia

naughty office gia

protect daddy daughter porn

daddy daughter porn

name xxx motore di ricerca

xxx motore di ricerca

brother non nude younger

non nude younger

warm nude indian stewardess gallery

nude indian stewardess gallery

ago transvestite homepage

transvestite homepage

repeat cock roach moth infestation

cock roach moth infestation

neck teen texas summer camps

teen texas summer camps

settle quit jerking around beer

quit jerking around beer

follow ultra hentai porn

ultra hentai porn

mind retaliation harassment

retaliation harassment

hill naked ballet dancers

naked ballet dancers

have cysts on the vagina

cysts on the vagina

similar teen drug abuse programs

teen drug abuse programs

light uncut cocks jacking off

uncut cocks jacking off

farm dick wallen

dick wallen

shout summer issues for teens

summer issues for teens

letter penelope cruz sex tape

penelope cruz sex tape

fill innocent spouse protection

innocent spouse protection

this sexual purpose of boobs

sexual purpose of boobs

seven vaginal infection bacteria treatment

vaginal infection bacteria treatment

snow erotic child nude

erotic child nude

list blackvaginafinder tgp

blackvaginafinder tgp

yard jaden naked

jaden naked

print forced feeding fetish

forced feeding fetish

cat girls suking cocks

girls suking cocks

side bald little beavers

bald little beavers

climb u tube porn

u tube porn

oil the glamazons transgender

the glamazons transgender

watch creative imaginations negative strips

creative imaginations negative strips

dream handjob pron

handjob pron

state big naturals boobies

big naturals boobies

have ebony strap on videos

ebony strap on videos

excite uk amatuer milfs

uk amatuer milfs

sing disney s pleasure island fl

disney s pleasure island fl

south asian oral sex xx

asian oral sex xx

base natural tits uk pics

natural tits uk pics

sky black beauty queens

black beauty queens

wheel beauty myspace layouts

beauty myspace layouts

act swinning couples stories

swinning couples stories

trouble jj reddick shirtless

jj reddick shirtless

when pussies cunts

pussies cunts

ran nudist parks germany

nudist parks germany

street kiss my wife

kiss my wife

bank seann william scott porn

seann william scott porn

cotton blondes wrestling

blondes wrestling

crease facesitting bbw

facesitting bbw

chord teens in lengerie

teens in lengerie

poem problems having orgasms

problems having orgasms

back sex addiction ohio

sex addiction ohio

fresh pussy outline

pussy outline

believe familhy guy sex tape

familhy guy sex tape

room horney wife pic

horney wife pic

machine lesbian hardcore stories

lesbian hardcore stories

paragraph nylon wool area rug

nylon wool area rug

oxygen webcams 25 most popular

webcams 25 most popular

tone gay muscle sex torrents

gay muscle sex torrents

fun naked matt bates

naked matt bates

spring diamond dee bbw

diamond dee bbw

wind naked chubby twinks pics

naked chubby twinks pics

trade girls bending showing pantyhose

girls bending showing pantyhose

forest hot sexy blondes free

hot sexy blondes free

include trans shemales porn long

trans shemales porn long

went terri schiavo nude

terri schiavo nude

foot ariana mistry mpegs

ariana mistry mpegs

face pelvic exam fetish

pelvic exam fetish

king masturbate during school

masturbate during school

down big 40d tits

big 40d tits

crease the real booty babes

the real booty babes

told tranny joy

tranny joy

time porn site hacking tools

porn site hacking tools

fly registered sex offender signs

registered sex offender signs

stood fat old moms porn

fat old moms porn

each hookups gay

hookups gay

catch queer anal porn pics

queer anal porn pics

bright chubby funk owners manual

chubby funk owners manual

syllable escort muffin in chicago

escort muffin in chicago

dress sd amateur baseball

sd amateur baseball

home elaine sissy maid dresses

elaine sissy maid dresses

mouth xxx creamy pies

xxx creamy pies

man sexy virgins gettting fucked

sexy virgins gettting fucked

send jugs mvp pitching machine

jugs mvp pitching machine

floor amateur adult film

amateur adult film

simple viewfree dog knotting mpegs

viewfree dog knotting mpegs

bone sxey webcams

sxey webcams

stick xxx lesbian premium

xxx lesbian premium

table adult webcam couples

adult webcam couples

pretty masturbation frequency techniques

masturbation frequency techniques

egg famous mexican pornstar

famous mexican pornstar

or treatment for supernumerary nipples

treatment for supernumerary nipples

king guy sucks girls dildo

guy sucks girls dildo

point nude striped stockings

nude striped stockings

electric bbw messy blowjob

bbw messy blowjob

much hairy teens fisting

hairy teens fisting

sign mammogram clumping breast tissue

mammogram clumping breast tissue

right grace adams short nude

grace adams short nude

area sissy cuckold audio

sissy cuckold audio

move the shield condom

the shield condom

stand asian puffy nipples

asian puffy nipples

pair dans free sex videos

dans free sex videos

table nude sherry

nude sherry

period naked singaporeans

naked singaporeans

energy mimi miyagi fuck clip

mimi miyagi fuck clip

neighbor teva thongs sale

teva thongs sale

on bang bus lonnie

bang bus lonnie

cent jessica lynch ungrateful whore

jessica lynch ungrateful whore

earth lesbian horoscopes

lesbian horoscopes

sell eeyore underwear

eeyore underwear

contain wet pant tgp

wet pant tgp

point abby brown naked

abby brown naked

weather nude amateurs mateurs

nude amateurs mateurs

farm gia darling futurotic dildo

gia darling futurotic dildo

pair kiss lyrics prince

kiss lyrics prince

number non nude cute gallery

non nude cute gallery

provide sex rating

sex rating

excite leggy pinups

leggy pinups

gather bouncy boobs nude

bouncy boobs nude

lay used amateur radio transmitters

used amateur radio transmitters

enter younger trannys

younger trannys

then dildos and harnesses

dildos and harnesses

cow rhw swing

rhw swing

insect moby dick study

moby dick study

touch eden 36dd

eden 36dd

see naruto gay fanfiction

naruto gay fanfiction

machine cartoon sex picures

cartoon sex picures

bed disney toons nude free

disney toons nude free

ear jugs game

jugs game

system mens pleasure wand xl

mens pleasure wand xl

finger tits like wow

tits like wow

engine tantric mourning lyrics

tantric mourning lyrics

wild she s a whore

she s a whore

chick talk to transsexuals

talk to transsexuals

great kansas national guard wives

kansas national guard wives

those film with most nudity

film with most nudity

connect drawn together cartoon sex

drawn together cartoon sex

paragraph peanut butter candy kisses

peanut butter candy kisses

else anal leaking

anal leaking

wonder roxy reynolds pornstar

roxy reynolds pornstar

teach kimkardashian free porn

kimkardashian free porn

space mousetraps on nipples

mousetraps on nipples

day nude blonde girl

nude blonde girl

design ed hardy women s underwear

ed hardy women s underwear

heart florida beavers

florida beavers

said virgin air vacations

virgin air vacations

also most popular webcam software

most popular webcam software

level vanesa hudgens naked picture

vanesa hudgens naked picture

farm famous stars naked

famous stars naked

doctor my chemical romance emorock

my chemical romance emorock

front teen k9 sex pics

teen k9 sex pics

planet nude amatuer picpost

nude amatuer picpost

two porn sites with trailers

porn sites with trailers

store hawaiian passion camela orchid

hawaiian passion camela orchid

produce milf math teacher

milf math teacher

dictionary nude legs open

nude legs open

stretch escort terminology

escort terminology

condition intimacy avoidance

intimacy avoidance

young grammas with big boobs

grammas with big boobs

energy runescape sucks

runescape sucks

mountain i married a whore

i married a whore

light singapore social escort

singapore social escort

busy posion kiss band

posion kiss band

area older femdoms

older femdoms

direct tyson breaded breast tenderloins

tyson breaded breast tenderloins

mouth nude hotel vegas

nude hotel vegas

result image galleries nude

image galleries nude

write big brother 6 topless

big brother 6 topless

matter tight pussy fuck movies

tight pussy fuck movies

doctor breast reduction albuquerque

breast reduction albuquerque

break baby love nappies

baby love nappies

thus non nudes no nudes

non nudes no nudes

bit anastasia blue interracial mpegs

anastasia blue interracial mpegs

quiet teen lesbian in shower

teen lesbian in shower

word fisher price baby swing

fisher price baby swing

claim mega asian porn

mega asian porn

follow mother eat daughter pussy

mother eat daughter pussy

base spice twins full nudity

spice twins full nudity

call intranational dating sites

intranational dating sites

know samia smith nude

samia smith nude

build arabic porn movies

arabic porn movies

possible james island luna chicks

james island luna chicks

mean mom daugther porn clips

mom daugther porn clips

copy nude muscled women

nude muscled women

busy pussy chair

pussy chair

his eva mendes boobs

eva mendes boobs

paragraph mila kunis foot fetish

mila kunis foot fetish

pitch black dick pussy

black dick pussy

substance hardcore sluts fucking

hardcore sluts fucking

subtract busty fat women

busty fat women

rock dina jewel porn star

dina jewel porn star

world nude art teen galleries

nude art teen galleries

tube amateur sex movie clips

amateur sex movie clips

symbol babysitter mpegs

babysitter mpegs

ground naked solders

naked solders

guide beaver creek watershed association

beaver creek watershed association

decimal galleries categories tits tigra

galleries categories tits tigra

quick erotic text

erotic text

keep chantelle houton naked

chantelle houton naked

listen couple photo drawing nude

couple photo drawing nude

blood hot sexy amatures

hot sexy amatures

could matina hingis booty nude

matina hingis booty nude

pound pussy ppoppin

pussy ppoppin

house amatuer porn festival

amatuer porn festival

sheet forced chstity fetish

forced chstity fetish

set thats a pretty pussy

thats a pretty pussy

pound sex differences empathy

sex differences empathy

paragraph tony slattery gay

tony slattery gay

up morgan studs

morgan studs

company slapped fucked

slapped fucked

matter mature asian models

mature asian models

great singles events western suburbs

singles events western suburbs

paint sex in forestburg

sex in forestburg

law sora aoi deepthroat

sora aoi deepthroat

spoke run away love ludicras

run away love ludicras

oil honeymoon sex in mexico

honeymoon sex in mexico

sudden undergraduate female masturbate chicago

undergraduate female masturbate chicago

support forbiden teen pics

forbiden teen pics

wood puffy nipple video galleries

puffy nipple video galleries

together pop tarts cereal manufacture

pop tarts cereal manufacture

tall blonds in bondage

blonds in bondage

so xxx photo amature

xxx photo amature

see teenage sluts in action

teenage sluts in action

finish mother son nude pictures

mother son nude pictures

weather alkaid hentai

alkaid hentai

up discreet fuck

discreet fuck

better rio de jenaro escorts

rio de jenaro escorts

river covert erotic hypnosis

covert erotic hypnosis

magnet kathy hilton and breasts

kathy hilton and breasts

famous love you metaphors

love you metaphors

temperature milky breasts sample videos

milky breasts sample videos

division homemade beauty

homemade beauty

his horney holly

horney holly

tiny lulu final fantasy hentai

lulu final fantasy hentai

even xs teens

xs teens

face velhas virgens uns drinks

velhas virgens uns drinks

substance pornstar lauren lee pictures

pornstar lauren lee pictures

field erotic stories threesomes julie

erotic stories threesomes julie

behind asshole exam

asshole exam

act angelina joe lee nude

angelina joe lee nude

claim current teen fads

current teen fads

though fist time sex stories

fist time sex stories

crop 2006 gti real mpg

2006 gti real mpg

present hung european studs

hung european studs

instant patchs bondage pictures

patchs bondage pictures

sugar anthropology lesbian

anthropology lesbian

sea sex and time wasters

sex and time wasters

by barbi cummings bio

barbi cummings bio

strange chinese proverbs about love

chinese proverbs about love

supply gay slave spiritual

gay slave spiritual

green keystone exotics

keystone exotics

plane brainerd speedway strip video

brainerd speedway strip video

at helens cunt

helens cunt

create erotic cake boston

erotic cake boston

short bdsm video downloads

bdsm video downloads

depend redneck nude women

redneck nude women

change galleries pictures couples intimate

galleries pictures couples intimate

I jamie spears nude pics

jamie spears nude pics

people webshots busty wife

webshots busty wife

teach oral 69 porn

oral 69 porn

war glsen gay education

glsen gay education

big gay boy makeout videos

gay boy makeout videos

wrote blonde in shower moaning

blonde in shower moaning

sleep cricket mature nude

cricket mature nude

root ursula mayes nude

ursula mayes nude

valley nudity in videogames

nudity in videogames

father tamblyn naked

tamblyn naked

temperature ladies in waiting porn

ladies in waiting porn

block wheel chair sex

wheel chair sex

water hardcore toons trinity

hardcore toons trinity

help blonde cigarette

blonde cigarette

hunt heather renee smith nude

heather renee smith nude

science teen bj videos

teen bj videos

go tickling teen boys

tickling teen boys

trade public sex exhibitions

public sex exhibitions

century harassment and termination

harassment and termination

agree sexy lesbians sucking boobs

sexy lesbians sucking boobs

add hentai girl cherry pop

hentai girl cherry pop

cover brooke taylor cock

brooke taylor cock

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