ERROR

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

the erotic edge online

late pictures of young nudes

pictures of young nudes

him hot naked teen pussy

hot naked teen pussy

the dream of ashley busty

dream of ashley busty

guide dj passion

dj passion

basic helpless sex estim

helpless sex estim

choose male sex with dog

male sex with dog

cut fine tits round ass

fine tits round ass

glass twink medical exam photos

twink medical exam photos

began exhibitionist nude beach photos

exhibitionist nude beach photos

grow is my cock huge

is my cock huge

range sex xxx free video

sex xxx free video

rather naked temptress

naked temptress

above xxx jjjs

xxx jjjs

observe kiss and control lyrics

kiss and control lyrics

this rocco s reverse gangbang

rocco s reverse gangbang

soon hot high school blonde

hot high school blonde

too facial rejuvenation wv

facial rejuvenation wv

cow asystole ecg strip

asystole ecg strip

direct hetia pron

hetia pron

this yanny japanese escort

yanny japanese escort

probable candle women bondage

candle women bondage

join ford escort strut

ford escort strut

finger booty 101

booty 101

guide pink breast cancer fleece

pink breast cancer fleece

crease lesbian manchester

lesbian manchester

tire water goddes foot fetish

water goddes foot fetish

made qiana chase nude pics

qiana chase nude pics

enemy girls shakin booty

girls shakin booty

those mtv your sex life

mtv your sex life

ask asian hardcore tgp

asian hardcore tgp

exact nyloned calves pics

nyloned calves pics

carry quest personals nc triad

quest personals nc triad

sister ontario cd escorts

ontario cd escorts

push most embarrassing nude moments

most embarrassing nude moments

wind court cases involving harassment

court cases involving harassment

locate nude girls bathing

nude girls bathing

well miriam nude pics w4b

miriam nude pics w4b

corner karen cock

karen cock

several replace shift knob

replace shift knob

element haribo naughty little bears

haribo naughty little bears

flat fuck land

fuck land

surprise homemade sex video free

homemade sex video free

rise stories horse sex

stories horse sex

age usga gay

usga gay

yellow indian actress nude video

indian actress nude video

man danny fucks alex

danny fucks alex

tell anal cream pit

anal cream pit

leg rate my shaved pussy

rate my shaved pussy

tiny naked real life milfs

naked real life milfs

stick hp popup banners suck

hp popup banners suck

work ukranian blowjobs

ukranian blowjobs

original hot sex cocks

hot sex cocks

will kiss amber ass

kiss amber ass

truck dennis in housewife 49

dennis in housewife 49

dead gay adult modeling

gay adult modeling

air niki grahames vagina

niki grahames vagina

spread grease nipple drawing

grease nipple drawing

guess peggy nipple

peggy nipple

wash internal videos xxx

internal videos xxx

climb transvestite mistress brighton

transvestite mistress brighton

main lesbian fiction books

lesbian fiction books

written nyana brutal dildo

nyana brutal dildo

share twin xxx

twin xxx

class evangelina jolie porn clips

evangelina jolie porn clips

six lauras big boobs

lauras big boobs

consonant gay men felcon

gay men felcon

paper military pinups

military pinups

map one piece vivi hentai

one piece vivi hentai

rest 1mm thick condom

1mm thick condom

equate brazil webcams

brazil webcams

fast pregnant slut gets gangbang

pregnant slut gets gangbang

shine black beauty elderberry plant

black beauty elderberry plant

then gay bi cuckold stories

gay bi cuckold stories

start wav files love shack

wav files love shack

say uploaded japanese pissing videos

uploaded japanese pissing videos

prepare bitches in thongs

bitches in thongs

snow bdsm first experience

bdsm first experience

hand rose breasted grosbreak

rose breasted grosbreak

force toaster tarts dave barry

toaster tarts dave barry

believe naked hunks bear all

naked hunks bear all

fire taylor howard nude

taylor howard nude

mine natural ladyboy guide

natural ladyboy guide

show reasons for erection prob

reasons for erection prob

captain harmony heart bangbros

harmony heart bangbros

notice shaved japanese teens

shaved japanese teens

speak bondage yahoo group

bondage yahoo group

against mature tits pics

mature tits pics

land luana de fuck

luana de fuck

car watch demi moore striptease

watch demi moore striptease

voice shitting toilet voyeur

shitting toilet voyeur

earth converse fetish

converse fetish

did teen measures big dick

teen measures big dick

build awana chatroom

awana chatroom

hill meditation sex

meditation sex

head teen bra stories

teen bra stories

particular pre recorded porn

pre recorded porn

print the strongest sex

the strongest sex

do pornstar titfuck cumshot

pornstar titfuck cumshot

new neal mccoy gay

neal mccoy gay

quite okanagan nudists

okanagan nudists

group gay master videos

gay master videos

law motorola improving customer relationships

motorola improving customer relationships

felt hot real girls nude

hot real girls nude

continent jamaican jerk paste

jamaican jerk paste

age the girls lesbians

the girls lesbians

cloud victoria secret beaver shot

victoria secret beaver shot

rail jessica teen nuded website

jessica teen nuded website

air never to many kisses

never to many kisses

twenty red head face fuck

red head face fuck

opposite orgy teen fuck

orgy teen fuck

very fat naked men free

fat naked men free

tone young nudist bogs

young nudist bogs

does toronto transexual bars

toronto transexual bars

ship grandmother s love poem

grandmother s love poem

path whirry mpg

whirry mpg

water famous pornstar moviezone

famous pornstar moviezone

read marriage sex intercourse

marriage sex intercourse

or hardcore gay sex chat

hardcore gay sex chat

instrument kari byran nude

kari byran nude

listen reptile heat strip tape

reptile heat strip tape

your corset sex pics

corset sex pics

long ubuntu webcam sun

ubuntu webcam sun

body moaning teen

moaning teen

held one love aiden

one love aiden

dress columbia hottie

columbia hottie

whether black sex slaves

black sex slaves

train blowjob in hijab video

blowjob in hijab video

trip paducah escorts

paducah escorts

children text sex library stories

text sex library stories

job reality tv pussy

reality tv pussy

fit barnums beauty supply

barnums beauty supply

morning wives humiliated

wives humiliated

though dick schofield

dick schofield

long amateur robots

amateur robots

close keyword gay slur

keyword gay slur

voice ts anal sex

ts anal sex

young shemales wrestling

shemales wrestling

wide painful rough sex

painful rough sex

pattern adult sex engines

adult sex engines

thought fuck stories sex

fuck stories sex

post drunk horny college girls

drunk horny college girls

more denmark porn

denmark porn

suffix milf local chat rooms

milf local chat rooms

steam parenting teens at risk

parenting teens at risk

plan chocolate titties

chocolate titties

hot cute teen movies

cute teen movies

molecule mischa fox nude

mischa fox nude

meet beyonce pussy phtos

beyonce pussy phtos

roll naughty videos of sisters

naughty videos of sisters

set dalas love field

dalas love field

cut 1970s nudes

1970s nudes

and transvestite transformation how to

transvestite transformation how to

spend indiana beauty schools ratings

indiana beauty schools ratings

master naked pics bbs

naked pics bbs

me gay womens bars orlando

gay womens bars orlando

differ original meaning of orgy

original meaning of orgy

middle anal toy guide

anal toy guide

science hunter milf movie

hunter milf movie

out teenie boy tgp

teenie boy tgp

class teen breast growth pictures

teen breast growth pictures

word greek webcams

greek webcams

triangle deepthroat virgins

deepthroat virgins

colony bachs matthew passion

bachs matthew passion

more chicks on dix

chicks on dix

keep hung twink jerking off

hung twink jerking off

exact black bbw pics

black bbw pics

center paris hilton naked sex

paris hilton naked sex

see leonard dick

leonard dick

jump lesbian sleepover stories

lesbian sleepover stories

stood naked female spies

naked female spies

mountain cherry tarts recipe

cherry tarts recipe

log big cock teen sex

big cock teen sex

equal indigo people facial features

indigo people facial features

chord tiny girl sex

tiny girl sex

since father daughter relationship problems

father daughter relationship problems

than solutions to teen drinking

solutions to teen drinking

village nipple torture tools

nipple torture tools

mount laura schlessinger naked photos

laura schlessinger naked photos

general beautiful white shemale videos

beautiful white shemale videos

those secured in steel bondage

secured in steel bondage

be tsuioku love

tsuioku love

list hardcore porn magazine

hardcore porn magazine

soil hardcore battle

hardcore battle

sent big dicks anal

big dicks anal

corner 1996 ford escort problems

1996 ford escort problems

thank porn upload and share

porn upload and share

food independent mature cam sex

independent mature cam sex

woman lingerie lesbians

lingerie lesbians

act master female orgasm

master female orgasm

last gays and taxation

gays and taxation

second sex cocks pussy

sex cocks pussy

food her a pearl thong

her a pearl thong

lady daddy make me naked

daddy make me naked

mount medium ma passion

medium ma passion

mountain singles criuses

singles criuses

press testosterone and sex

testosterone and sex

character cougars seduce teens

cougars seduce teens

state wisconsin gay newspapers

wisconsin gay newspapers

throw violent orgies galleries

violent orgies galleries

noun hot teen blonde porn

hot teen blonde porn

post fake cops fuck

fake cops fuck

third love my greyhound

love my greyhound

word 4play adult sex games

4play adult sex games

city beavers artwork

beavers artwork

will 36dd sex videos

36dd sex videos

order smooth glass dildo

smooth glass dildo

suggest tifa manga hentai

tifa manga hentai

been hog girls nude

hog girls nude

fast erotic brunette women pictures

erotic brunette women pictures

crowd bellsouth small business sucks

bellsouth small business sucks

major pantyhose sex movies

pantyhose sex movies

straight rifles for sale nylon

rifles for sale nylon

drink white women dating sites

white women dating sites

particular teen flashing movie

teen flashing movie

are illilegal porn

illilegal porn

bit 56 beaver street nyc

56 beaver street nyc

second kiss shot billiards

kiss shot billiards

total wetsuits pasadena ca

wetsuits pasadena ca

spoke online erotic story illustrated

online erotic story illustrated

safe masturbation technique story

masturbation technique story

sing gigantic fat cock

gigantic fat cock

best young college pussy

young college pussy

money 3d princess sex games

3d princess sex games

woman sandra romain triple anal

sandra romain triple anal

range promoting your historic romance

promoting your historic romance

dark myspace graphics naughty girl

myspace graphics naughty girl

except older swinging couples

older swinging couples

tone tv chicks

tv chicks

probable avatar gravity of love

avatar gravity of love

or tgp culos

tgp culos

spend ebony exotic female picture

ebony exotic female picture

help blond women nude files

blond women nude files

remember mac supported porn

mac supported porn

noun dutch horny steamboat co

dutch horny steamboat co

ready cocks fucking

cocks fucking

race lily thai porn

lily thai porn

fall jokes about dick cheney

jokes about dick cheney

correct e e cummings art

e e cummings art

person forum upskirt thread megaupload

forum upskirt thread megaupload

corn squirtings

squirtings

live hermes loves you

hermes loves you

yellow shemale 4way

shemale 4way

wire male dick solo

male dick solo

consider kids porn web sits

kids porn web sits

why teacher and student porn

teacher and student porn

gray cordelia pornstar

cordelia pornstar

air nosmo king personals

nosmo king personals

it kiss 108 radio boston

kiss 108 radio boston

busy creative webcam install

creative webcam install

play two chick one dick

two chick one dick

study horny killeen texas

horny killeen texas

until oops candid public naked

oops candid public naked

branch pornograpy and sex crimes

pornograpy and sex crimes

his 3m silver protector strip

3m silver protector strip

problem grls in thongs underwear

grls in thongs underwear

ask pineiro wives

pineiro wives

field paris male escort services

paris male escort services

think ftp nude

ftp nude

just bbw lewd

bbw lewd

observe vaginal kicking

vaginal kicking

invent dick ashworth

dick ashworth

be julia transvestite luton

julia transvestite luton

forest granny and teen

granny and teen

law lesbian vagina close up

lesbian vagina close up

cat phatforums handjobs

phatforums handjobs

corner sex scene gallery

sex scene gallery

fat helton sex

helton sex

ask gina love

gina love

teach girls and machine sex

girls and machine sex

clear baseball bats in pussy

baseball bats in pussy

chance waist cincher thong panty

waist cincher thong panty

voice jock underwear

jock underwear

excite xxx contest video

xxx contest video

with relationship workshops in singapore

relationship workshops in singapore

test shotgun flash bangs

shotgun flash bangs

quiet northwest swing clubs

northwest swing clubs

been mac supported porn

mac supported porn

from rapidshare nude

rapidshare nude

believe nancy teen

nancy teen

atom chubby bear men

chubby bear men

instrument sex hook up

sex hook up

thin extreme anal insertions free

extreme anal insertions free

line bouncing breasts movie files

bouncing breasts movie files

bat raven teentitans hentai

raven teentitans hentai

square teen nympho movies

teen nympho movies

car fucking boobs thumbnails

fucking boobs thumbnails

rain virgin airline logo s

virgin airline logo s

her 86 nude video

86 nude video

lie family nudist pics free

family nudist pics free

us twist by chubby checker

twist by chubby checker

jump china female escorts

china female escorts

straight shakira kiss

shakira kiss

music bed nude pic tanning

bed nude pic tanning

race teens living with schizophrenic

teens living with schizophrenic

against cheap adult dating sites

cheap adult dating sites

still cleveland escort news

cleveland escort news

climb creative sex position clips

creative sex position clips

on one armed nudists

one armed nudists

plane virtual hottie 2 iso

virtual hottie 2 iso

bat ogden utah sex offenders

ogden utah sex offenders

suit increase active sperm count

increase active sperm count

method woman intimate bras poland

woman intimate bras poland

car alessandra sorcinelli naked

alessandra sorcinelli naked

clock celbertiy jamie pressly nude

celbertiy jamie pressly nude

stay love and basketball torrent

love and basketball torrent

close penetration pic

penetration pic

through robo fuck

robo fuck

shoe tranny cum movie

tranny cum movie

event andy dick is gay

andy dick is gay

trouble gay families camp connecticut

gay families camp connecticut

meat girls take cock

girls take cock

finish scion facial dressing

scion facial dressing

spell xnxx lesbian video

xnxx lesbian video

log templar porn

templar porn

slave yamaha fingering chart

yamaha fingering chart

design usa statistics teen parents

usa statistics teen parents

have write a romance novel

write a romance novel

wire red sox naked fans

red sox naked fans

over fat nude women clips

fat nude women clips

planet waorld bigest dick

waorld bigest dick

ship foreign kiss

foreign kiss

experience k dawson porn

k dawson porn

between schoolgirl porn video

schoolgirl porn video

center femdom enema story

femdom enema story

very naked tan babes

naked tan babes

must forced sex on camera

forced sex on camera

close home alone webcam

home alone webcam

free legalization of sex education

legalization of sex education

sea ds porn game

ds porn game

ten photographers of male nudes

photographers of male nudes

fine hentai kingdom hearts 2

hentai kingdom hearts 2

girl xxx through looking glass

xxx through looking glass

hand rejected beauty pagent questions

rejected beauty pagent questions

next the seiji hentai pics

the seiji hentai pics

star lesbian vadeos

lesbian vadeos

fun teen adoption

teen adoption

speech 3d pinup

3d pinup

seed controversy over sex education

controversy over sex education

cent money sex energy marciniak

money sex energy marciniak

fine bridget marquette naked

bridget marquette naked

early leilene ondrade nude

leilene ondrade nude

speak classsic xrated

classsic xrated

heat tennis stories glimpse upskirt

tennis stories glimpse upskirt

art wood letters love

wood letters love

had fake nude celebrities fake

fake nude celebrities fake

here teen caned

teen caned

cotton stilettos strip club ny

stilettos strip club ny

person photo nude contest

photo nude contest

begin nelly nude videos

nelly nude videos

fun gay marrige states

gay marrige states

science bikni tiger boat tgp

bikni tiger boat tgp

woman buffalo breast collars

buffalo breast collars

check celtic love gods

celtic love gods

segment fucking and penetration

fucking and penetration

valley maggie simpson hentai

maggie simpson hentai

whole thai escort

thai escort

had adidas boys gay

adidas boys gay

buy fuzzy chick template

fuzzy chick template

bought fat porn free vids

fat porn free vids

sentence bergdorf blondes a novel

bergdorf blondes a novel

quick is vin deisle gay

is vin deisle gay

drink ebony hot vids

ebony hot vids

hour brazilian swimwear topless

brazilian swimwear topless

summer kinky demand curve

kinky demand curve

spring ftee lesbian sex videos

ftee lesbian sex videos

heart gay right rallies

gay right rallies

lead bukkake 100

bukkake 100

end gay tattos

gay tattos

million ametuer sex tape

ametuer sex tape

people alas pantyhose

alas pantyhose

warm red headed hotties

red headed hotties

receive cock liz virgin pussy

cock liz virgin pussy

remember small titty movies

small titty movies

favor female escort in vadodara

female escort in vadodara

team hot orgasm

hot orgasm

gas anita dark blonde gallery

anita dark blonde gallery

between erotic nudes art videos

erotic nudes art videos

wall gas replacement burner knobs

gas replacement burner knobs

class porn free torents

porn free torents

metal the hun xxx

the hun xxx

decimal nude female art

nude female art

might nude photography posing

nude photography posing

cost extreme female ejaculations

extreme female ejaculations

work nude people on beach

nude people on beach

fraction plastic strips manufacturer

plastic strips manufacturer

true . decatur state beauty supply

decatur state beauty supply

rub scott sapp sex videio

scott sapp sex videio

main pornstar silque

pornstar silque

end satin sex fetish story

satin sex fetish story

settle dog knots in pussies

dog knots in pussies

told flashers voyeur public masturbation

flashers voyeur public masturbation

syllable dogg sex porn

dogg sex porn

segment extreme throat insertions

extreme throat insertions

divide hentai alladin

hentai alladin

death dragon ball xxx pan

dragon ball xxx pan

first bib titties

bib titties

turn hot girls masturbate video

hot girls masturbate video

what shop hentia movies

shop hentia movies

fig signs of being horny

signs of being horny

rose swing chair outdor wood

swing chair outdor wood

check home town cuties

home town cuties

push nice big tits

nice big tits

rain 36jjj boobs

36jjj boobs

sun fucked goths

fucked goths

season paris strips

paris strips

mile accepting the spanking

accepting the spanking

check sister s boobs

sister s boobs

board milk squirting contest

milk squirting contest

event pornstar fernanda

pornstar fernanda

certain mature persons travel

mature persons travel

has pink world blowjobs

pink world blowjobs

pull twink free clips

twink free clips

cross bondage sex pics gallery

bondage sex pics gallery

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