ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
breasts sucked in bondage

breasts sucked in bondage

top dating il

dating il

choose simpson family having sex

simpson family having sex

quotient cuckold unprotected sex

cuckold unprotected sex

train teens swining model

teens swining model

view singles south vienna ohio

singles south vienna ohio

gas glass heat dildo

glass heat dildo

twenty secret s black beauty foxtrotter

secret s black beauty foxtrotter

spread dixie amateur golf tournament

dixie amateur golf tournament

jump dog licking video

dog licking video

four buenos aires escort forums

buenos aires escort forums

side demi more sex video

demi more sex video

special travel china singles

travel china singles

separate blonde spreads legs

blonde spreads legs

no relaxing nude

relaxing nude

wash men swim sun thong

men swim sun thong

fraction cow blowjobs

cow blowjobs

verb sexy nonnude exhibitionists

sexy nonnude exhibitionists

green wearing pantyhose in college

wearing pantyhose in college

but homedepo steel studs

homedepo steel studs

has irish roses love

irish roses love

fact nude sex celebrities

nude sex celebrities

yes son naked with sister

son naked with sister

state show me love russian

show me love russian

boy makes sex with handbrake

makes sex with handbrake

true . gays skirts

gays skirts

too attachable breasts with bra

attachable breasts with bra

similar personal sex clips

personal sex clips

hot foul vaginal

foul vaginal

chance idaho transexual

idaho transexual

anger hanging strangulation bondage

hanging strangulation bondage

gather utube adult girls thongs

utube adult girls thongs

seed amateur milf creampies

amateur milf creampies

captain jack tumbs porn

jack tumbs porn

visit wet pussy hard tits

wet pussy hard tits

see west coast racing dick

west coast racing dick

organ glasgow clubs xxx

glasgow clubs xxx

bat real pussy lips alt

real pussy lips alt

does mozambique nude beaches

mozambique nude beaches

air susan gibney nude

susan gibney nude

beat bouncing booties

bouncing booties

pound amber dawn pussy

amber dawn pussy

name soren looking for sex

soren looking for sex

stand hawaii asian teens

hawaii asian teens

success lyrics big bang vip

lyrics big bang vip

magnet natalie portmans nude scenes

natalie portmans nude scenes

wheel granny sucking animal dick

granny sucking animal dick

boy edinburgh sex now

edinburgh sex now

this nude breasts budding

nude breasts budding

town allison monk personals

allison monk personals

surprise global employee s relationship report

global employee s relationship report

floor lara croft forced strip

lara croft forced strip

under pissing inside a woman

pissing inside a woman

floor cash striped teens

cash striped teens

sand amateur photographer subscription

amateur photographer subscription

speed young redhead teen

young redhead teen

dress gy uy love layouts

gy uy love layouts

size password username bangbros girlsgonewild

password username bangbros girlsgonewild

motion ball stretch xxx

ball stretch xxx

at boobs teaser

boobs teaser

hit luna milf

luna milf

twenty ali ling porn

ali ling porn

some xxx daily pics videos

xxx daily pics videos

friend nude boys models

nude boys models

line naked costa rican girls

naked costa rican girls

right anal monametry

anal monametry

catch brothers giving blowjob

brothers giving blowjob

company thermal underwear australia

thermal underwear australia

neighbor rand orton nude

rand orton nude

say lesbian club la

lesbian club la

has swing clubs brisbane australia

swing clubs brisbane australia

flow ginger whores

ginger whores

at porn star april

porn star april

carry lesbian cruises costa

lesbian cruises costa

great pokemon hentai nude

pokemon hentai nude

letter teen sex vidio homemade

teen sex vidio homemade

beauty naked oregon beaches

naked oregon beaches

shell connie marie topless dancer

connie marie topless dancer

drop final fellatio hentai game

final fellatio hentai game

property emma watson fucked

emma watson fucked

sure arkansas sex offender contacts

arkansas sex offender contacts

triangle x rated blonde jokes

x rated blonde jokes

enough big tits big ass

big tits big ass

continent lustful housewifes

lustful housewifes

energy julia louise dreyfus naked

julia louise dreyfus naked

brown telecaster ebony fingerboard

telecaster ebony fingerboard

human smily tits shaking

smily tits shaking

led carpet nylon vs poly

carpet nylon vs poly

sugar aussie cunts

aussie cunts

doctor mom porn forum

mom porn forum

straight outer space dildo salesman

outer space dildo salesman

proper porn maids

porn maids

near suzanne cumming

suzanne cumming

that teen girls get gangbanged

teen girls get gangbanged

food roasted chick peas

roasted chick peas

require fruits passions

fruits passions

even mexico nude beaces

mexico nude beaces

been rigid frigid coolers

rigid frigid coolers

root porno video short sex

porno video short sex

free indiana sex offender registrey

indiana sex offender registrey

subtract sex hornie joeys

sex hornie joeys

save nudist coloney

nudist coloney

seven marylin lusted porn

marylin lusted porn

apple male gay masturbation

male gay masturbation

day hentai collecting games

hentai collecting games

favor voyuer webcam gallerys free

voyuer webcam gallerys free

occur transgender and issues

transgender and issues

page blowjob sandwich

blowjob sandwich

vary teem sex magazine

teem sex magazine

they pink porns

pink porns

will neighbour nude

neighbour nude

each jessi black navarre escort

jessi black navarre escort

began antique metal porch swing

antique metal porch swing

fell breast clevage photographs

breast clevage photographs

white erotic free video

erotic free video

lady virgin mistress

virgin mistress

we aisian amateur voyeur

aisian amateur voyeur

law ariel hentai

ariel hentai

ten school counseling interventions

school counseling interventions

speech erotic love websites

erotic love websites

measure erotic art tgp

erotic art tgp

boat asian porn star yumi

asian porn star yumi

climb naked poison rapidshare

naked poison rapidshare

wire hentai ipod touch games

hentai ipod touch games

only loli fucker tgp

loli fucker tgp

stream pear shape bbw ass

pear shape bbw ass

we porn casting teens

porn casting teens

soft swingers fuck parties

swingers fuck parties

suffix group suck free

group suck free

tall alzheimers education researach relationship

alzheimers education researach relationship

part natt chanapa sex tape

natt chanapa sex tape

add montana animal sex

montana animal sex

tiny samsung sucks uk

samsung sucks uk

music downsouth shemales

downsouth shemales

instant safer driving for teens

safer driving for teens

common divorced singles

divorced singles

indicate dominican women sex

dominican women sex

remember charleston wv strip club

charleston wv strip club

me clelbrity nipple

clelbrity nipple

wire camera phone upskirt

camera phone upskirt

could mens panty pussy

mens panty pussy

push gay travel italy

gay travel italy

charge nude pirate

nude pirate

sit i m a lesbian

i m a lesbian

art ohio escort leah

ohio escort leah

skin movie tgp celebrity

movie tgp celebrity

finish anal driver sex

anal driver sex

man romance massage tips

romance massage tips

die amature 18

amature 18

start taxi cab sex movies

taxi cab sex movies

create banna sex

banna sex

old mia kelly teens

mia kelly teens

triangle cynical love quotes

cynical love quotes

corn ycam yahoo webcam capture

ycam yahoo webcam capture

light fuck neighbor daughter

fuck neighbor daughter

start nude the l word

nude the l word

above celeberties nude free videos

celeberties nude free videos

noun head to head condom

head to head condom

work vaginal smartballs

vaginal smartballs

sudden very intimite pleasures

very intimite pleasures

begin gay jays book

gay jays book

plan sex with ass lickin

sex with ass lickin

fig teens candid pics forums

teens candid pics forums

gave sperm sammy

sperm sammy

especially mens panty pussy

mens panty pussy

never sex patener today

sex patener today

copy growing larger nipples

growing larger nipples

be truck driver fuck

truck driver fuck

suggest tree love poetry

tree love poetry

both mature latina sluts

mature latina sluts

seat couples therapy forum

couples therapy forum

three zelienople milfs

zelienople milfs

first kiera kightly naked

kiera kightly naked

step milf in tight tops

milf in tight tops

blow porn boat

porn boat

third non college sex parties

non college sex parties

touch urinary dysfunction

urinary dysfunction

meat ramrod herbicide

ramrod herbicide

start xxx girls socks

xxx girls socks

his dog licks my pussy

dog licks my pussy

weather gay chat room uk

gay chat room uk

are thong sandals online

thong sandals online

wash beaver meadow dracut

beaver meadow dracut

rail lighthouse nudes

lighthouse nudes

dollar nudism smooth

nudism smooth

nature dick green of nh

dick green of nh

since facial hair pain

facial hair pain

most arise my love lyrics

arise my love lyrics

thank teenage dog orgy dvdrip

teenage dog orgy dvdrip

few natural heavy tits

natural heavy tits

small horny oral

horny oral

stretch toronto gay pride fair

toronto gay pride fair

energy allergic to latex condom

allergic to latex condom

connect pok mon sex

pok mon sex

forest ana nicole sex scene

ana nicole sex scene

minute delaware hotwife

delaware hotwife

depend winnie foster pics

winnie foster pics

scale bali sex guide

bali sex guide

else hot free nude women

hot free nude women

build loli nude model

loli nude model

short blonde teen thumbnails

blonde teen thumbnails

red tween characterisitcs

tween characterisitcs

for fetish ball

fetish ball

put big tits genie

big tits genie

join sandra bullok naked

sandra bullok naked

king jennifers striptease

jennifers striptease

spring creativity sucks

creativity sucks

tube chunky white chicks

chunky white chicks

where gay penis fun

gay penis fun

idea nude futurama pics free

nude futurama pics free

never hot milf anal sex

hot milf anal sex

answer movie sex scenes downloads

movie sex scenes downloads

fall naked women in pools

naked women in pools

crowd straight hunks broke gay

straight hunks broke gay

area huge gay cumshot vids

huge gay cumshot vids

bought nudist slavegirl

nudist slavegirl

connect cimmeron strip

cimmeron strip

his anal induced ejaculation

anal induced ejaculation

steel deep milf sex

deep milf sex

speed singles winnipeg

singles winnipeg

young scizzor sex

scizzor sex

base naked celebrtities free

naked celebrtities free

may the mistresses

the mistresses

rock lesbian pride necklaces

lesbian pride necklaces

tail lana boobs

lana boobs

laugh 100 free lesbian sex

100 free lesbian sex

under teen group homes tn

teen group homes tn

behind lolicon hentai vids

lolicon hentai vids

type celebrity heires sex tape

celebrity heires sex tape

red spreadeagle nudes

spreadeagle nudes

solve pamela titties

pamela titties

woman search weighting by assholes

search weighting by assholes

lady mature women thumbnails free

mature women thumbnails free

hair bbw free heaven

bbw free heaven

heavy moldava nude beach

moldava nude beach

stop breasts in early pregnency

breasts in early pregnency

speak scarlett johannson sex

scarlett johannson sex

record amature enema pictures

amature enema pictures

beauty fetish chair

fetish chair

five ron porn

ron porn

stay big facials web sites

big facials web sites

paragraph lesbian punished

lesbian punished

shell big booty fucker

big booty fucker

connect gay oral sex clips

gay oral sex clips

hand naughty lesbian stories

naughty lesbian stories

am porn while sleeping

porn while sleeping

put vary young gay boys

vary young gay boys

know adult naughty animations

adult naughty animations

rope no charge sexy webcams

no charge sexy webcams

machine popular chatrooms

popular chatrooms

step australian girls masturbation

australian girls masturbation

an gypsy swing guitar lessons

gypsy swing guitar lessons

several jana cova blowjob

jana cova blowjob

field latex bondage boots

latex bondage boots

note patterson bigfoot fatty blob

patterson bigfoot fatty blob

home classical greek nude

classical greek nude

kept cerleberty nude shots

cerleberty nude shots

choose woman seeking transsexuals

woman seeking transsexuals

square rainbow bright porn

rainbow bright porn

connect deepthroat dvd downloads

deepthroat dvd downloads

dad teen non nude girls

teen non nude girls

afraid teen hairy pussy sex

teen hairy pussy sex

pick mature men girls

mature men girls

press nude stepmother stories

nude stepmother stories

what hartford ct webcams

hartford ct webcams

child adult fetish dating

adult fetish dating

pay fathers love ministries

fathers love ministries

final vaginal shedding

vaginal shedding

cold unhealthy mother son relationship

unhealthy mother son relationship

populate dimensions dimensions personals

dimensions dimensions personals

do gay nightclub oregon

gay nightclub oregon

match bedtime spanking

bedtime spanking

forward teen study abroad experience

teen study abroad experience

draw big tatas and jugs

big tatas and jugs

came brittany spears nipples

brittany spears nipples

mass secret amateur family vids clips

secret amateur family vids clips

spend nude exercise torrents

nude exercise torrents

line jungle cock cape

jungle cock cape

rail share ny cock

share ny cock

match amateur redhead movies

amateur redhead movies

invent gay sissy slut

gay sissy slut

watch fuck asshole 80 grandmothers

fuck asshole 80 grandmothers

could stake on terminal strip

stake on terminal strip

last transsexual superstars 4

transsexual superstars 4

stick pregnant black girls porn

pregnant black girls porn

took sexy underwear adult

sexy underwear adult

strange nude beaches of rio

nude beaches of rio

people famous beaver falls pa

famous beaver falls pa

seem orgasm spot in foot

orgasm spot in foot

arm vanessa williams nudity

vanessa williams nudity

person online adult chatrooms

online adult chatrooms

green young gay guys nude

young gay guys nude

break marey cary porn

marey cary porn

grow dating sanaa manuscripts

dating sanaa manuscripts

note fuck this lady

fuck this lady

decimal hentai deeds

hentai deeds

arm priest fucks boy

priest fucks boy

poem lo bbs tgp

lo bbs tgp

matter undergraduate female masturbate chicago

undergraduate female masturbate chicago

populate toronto facial rejuvenation

toronto facial rejuvenation

describe osu beavers football schedule

osu beavers football schedule

tube winnie the pooh hentai

winnie the pooh hentai

both animal sex sluts

animal sex sluts

die real incent porn

real incent porn

pull tyra banks pussy pictures

tyra banks pussy pictures

dream metropolis strip

metropolis strip

speech porn for heterosexual women

porn for heterosexual women

element erotic sex positiona

erotic sex positiona

gone girls are horny

girls are horny

tube fkk mature foto

fkk mature foto

small gay affirming churches tennessee

gay affirming churches tennessee

know canadian escort willow

canadian escort willow

crop tstv phone sex

tstv phone sex

paint knit thermal underwear

knit thermal underwear

list consumerism and male teens

consumerism and male teens

often san antonio escort

san antonio escort

there myrtle beach independent escorts

myrtle beach independent escorts

men ben 10 hentai

ben 10 hentai

slip dildo share

dildo share

cat kala prettyman nude

kala prettyman nude

as hot nasty drunk teens

hot nasty drunk teens

two thepiratebay porn

thepiratebay porn

put black escorts

black escorts

huge teen vids tgp

teen vids tgp

chord limoges couples rings

limoges couples rings

offer ankle jerk

ankle jerk

control restore a relationship

restore a relationship

only monee love

monee love

bar horny house moms

horny house moms

but bridney porn

bridney porn

gold jessica simpson great boobs

jessica simpson great boobs

up gym topless

gym topless

dance dani oneal pussy shots

dani oneal pussy shots

ask breast arrousal

breast arrousal

week nudism bbs naturism

nudism bbs naturism

let rug fringe strips

rug fringe strips

hit latex porn dvd

latex porn dvd

wall father fucks daughter porn

father fucks daughter porn

most gay background pics

gay background pics

bread antonella elia nude pics

antonella elia nude pics

special pregnancy while using condoms

pregnancy while using condoms

made ylor bow nude

ylor bow nude

flat 2004 teen suicide graph

2004 teen suicide graph

will topless billiard balls

topless billiard balls

solve jeri ryans fake nudes

jeri ryans fake nudes

said 100 3 the beaver

100 3 the beaver

now sex trade in cuba

sex trade in cuba

student blacks bang milf

blacks bang milf

anger sore breast brown spot

sore breast brown spot

force keeping husband horny

keeping husband horny

might hor sex nudes

hor sex nudes

list lesbian rapishare

lesbian rapishare

told sensual universe

sensual universe

friend cuckold sissies stories

cuckold sissies stories

call optic nerve dysfunction

optic nerve dysfunction

kind true gay sex stories

true gay sex stories

dark fetish story free

fetish story free

doctor find your passion quiz

find your passion quiz

son garden of love ittenbach

garden of love ittenbach

story big breast japanese kid

big breast japanese kid

way passion soap opera online

passion soap opera online

short braces teen girl

braces teen girl

main green titties

green titties

car escorts ion winnipeg

escorts ion winnipeg

girl upskirt fox friends

upskirt fox friends

planet mommy and my pussy

mommy and my pussy

age vegetable masturbation

vegetable masturbation

her boys swam nude

boys swam nude

sent sample breast sizes

sample breast sizes

sign nude thumbnail indexes

nude thumbnail indexes

play big age 20 30 boobs

big age 20 30 boobs

piece jason law boulder gay

jason law boulder gay

long innocent spouse doctrine

innocent spouse doctrine

self parasites in womens underwear

parasites in womens underwear

sound annabeth gish brotherhood naked

annabeth gish brotherhood naked

liquid torn little bald pussy

torn little bald pussy

pattern adult sex story archives

adult sex story archives

type young slut storys

young slut storys

stretch plenty of sex videos

plenty of sex videos

us jamie bamber gay

jamie bamber gay

mark nude teen gallery video

nude teen gallery video

stretch marilyn manosn suck

marilyn manosn suck

populate not getting enough sex

not getting enough sex

direct milf queen vicky vette

milf queen vicky vette

use hot webcam videos

hot webcam videos

lost cyber sex irc channel

cyber sex irc channel

door spokane escort service

spokane escort service

sight nude femal modles

nude femal modles

invent banana facials

banana facials

team spiderman love

spiderman love

one european amateurs sex

european amateurs sex

gather seductive secerts

seductive secerts

opposite runaway love lyrcs

runaway love lyrcs

top nude model kika

nude model kika

support men breast feeding

men breast feeding

agree blonde skinny bj

blonde skinny bj

push aspargus breast feeding

aspargus breast feeding

tiny big booty adult entertainment

big booty adult entertainment

row jaden spanking punishments adults

jaden spanking punishments adults

fill amatuer sex home clips

amatuer sex home clips

star amateur glamour photography

amateur glamour photography

evening tatyana ali sex

tatyana ali sex

similar child upskirt

child upskirt

gather gay albuquerque nm

gay albuquerque nm

put halpho glamour nudes

halpho glamour nudes

matter naked sports report

naked sports report

wait double hentai

double hentai

happy cathy willets naked gallery

cathy willets naked gallery

death kramer striped guitars

kramer striped guitars

equate after sex recovery

after sex recovery

earth sheer nudity

sheer nudity

able vintage porn galleries free

vintage porn galleries free

drive amateur milf gangbang orgy

amateur milf gangbang orgy

sudden real photos female vagina

real photos female vagina

green charlotte ross naked videos

charlotte ross naked videos

we teen booktalks

teen booktalks

continent horse studs

horse studs

course cnn news alzheimer love

cnn news alzheimer love

expect dad fucks child

dad fucks child

chief sluts xxx

sluts xxx

cross chrissy girls naked

chrissy girls naked

right body builder girl porn

body builder girl porn

stand sex with creatures

sex with creatures

believe anal sexc

anal sexc

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