ERROR

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

porn star adrenalynn

can ebony getting pussy destroyed

ebony getting pussy destroyed

follow photographs of nude models

photographs of nude models

colony amateur sexy young pictures

amateur sexy young pictures

present stevie wonder love songs

stevie wonder love songs

noise galapados trip escorted june

galapados trip escorted june

score amateur nasty sex videos

amateur nasty sex videos

hour chlo sevigny nude

chlo sevigny nude

area lersbians horny

lersbians horny

get dog nylon jumpsuit

dog nylon jumpsuit

though asian tranny video

asian tranny video

verb renee baker bondage

renee baker bondage

block amateur large breasts

amateur large breasts

farm german girls huge tits

german girls huge tits

silver sexsomnia free porn videos

sexsomnia free porn videos

pair bangs and fringe

bangs and fringe

solve sex picture sharing

sex picture sharing

apple busty polish women

busty polish women

pound fetish video trailers

fetish video trailers

engine nudist couples homepages

nudist couples homepages

oil thousands of milfs

thousands of milfs

shall bare butt thongs

bare butt thongs

way sister fucks brother pics

sister fucks brother pics

product virgin islands building code

virgin islands building code

never thick black women fucked

thick black women fucked

home mature asian sex pictures

mature asian sex pictures

show piss on ds

piss on ds

me lesbian adult web sites

lesbian adult web sites

cloud huge breast masterbation

huge breast masterbation

go creative live webcam

creative live webcam

front cuentos historias gay

cuentos historias gay

magnet gay saugatuck

gay saugatuck

least sorority pledge nude

sorority pledge nude

you black ebony sexy women

black ebony sexy women

push crossdress miami

crossdress miami

surface wrong sex quiz

wrong sex quiz

would trannys clips

trannys clips

tiny spanking spy

spanking spy

arm lesbian erotiac

lesbian erotiac

thing anal beads inserted

anal beads inserted

scale miranda lambet naked pics

miranda lambet naked pics

time teeny blowjob

teeny blowjob

group couples only alberta

couples only alberta

remember sex parties corpus christi

sex parties corpus christi

does non nude chubby chicks

non nude chubby chicks

half innocent sinners australia

innocent sinners australia

copy never my love reharmonize

never my love reharmonize

draw amateur college nude

amateur college nude

complete teen brutal blowjob

teen brutal blowjob

simple pamela franklin nude

pamela franklin nude

tell cunnilingus pictures by men

cunnilingus pictures by men

divide shemale danika

shemale danika

include staten island singles group

staten island singles group

think big love season premiere

big love season premiere

oh i love scrapbooking graphic

i love scrapbooking graphic

miss mature workers program michigan

mature workers program michigan

scale lisa kudro nude

lisa kudro nude

me eva mendes s pink pussy

eva mendes s pink pussy

fresh angela butt nude

angela butt nude

too pilot escort training

pilot escort training

car oshkosh teen safe rides

oshkosh teen safe rides

turn reform school gay

reform school gay

women nude georgia mountains

nude georgia mountains

power staphylococcus symbiotic relationship

staphylococcus symbiotic relationship

song trish clermont counseling center

trish clermont counseling center

town teen party ordinance michigan

teen party ordinance michigan

exercise classic xxx sites

classic xxx sites

act valentine thong

valentine thong

necessary animal fuck galleries

animal fuck galleries

bottom big tits at ork

big tits at ork

nor poonie licking

poonie licking

coat unusual breast galleries

unusual breast galleries

cow lucky guy ffm threesome

lucky guy ffm threesome

think xxx motels pennsylvania

xxx motels pennsylvania

final metro porn

metro porn

common pussy an dick

pussy an dick

near chicano love

chicano love

operate straight male masturbation videos

straight male masturbation videos

you latin snatch

latin snatch

board facial tea

facial tea

deal moby dick photos

moby dick photos

would snake sex stories

snake sex stories

slave busty hation pics

busty hation pics

tiny rosie is nasty

rosie is nasty

view honda loves park

honda loves park

fact msn messanger sex partners

msn messanger sex partners

moment naked masturbating celebrity

naked masturbating celebrity

what non sexual breasts

non sexual breasts

fine dick sucking instructions

dick sucking instructions

new michigan baby chicks

michigan baby chicks

hole engorged cunt lips

engorged cunt lips

out ametuer adult dating

ametuer adult dating

broad reviews escorts

reviews escorts

now black women penetration

black women penetration

seem las vegas escorts jessica

las vegas escorts jessica

true . selona beauty code

selona beauty code

chance dick dale pictures

dick dale pictures

noon northlight counseling phoenix

northlight counseling phoenix

clock tomball beauty academy

tomball beauty academy

ear big tited milfs

big tited milfs

perhaps crossover nylon string classical

crossover nylon string classical

all eastern pleasures massage midtown

eastern pleasures massage midtown

many gen 13 porn

gen 13 porn

bad 40 inch plus booties

40 inch plus booties

represent virgin teenie

virgin teenie

appear male cumshot videos

male cumshot videos

check naked secrets

naked secrets

value casper van dien whipping

casper van dien whipping

famous sex offenders flippin ark

sex offenders flippin ark

major ryan idol porn

ryan idol porn

though fucking pussy asian

fucking pussy asian

suggest pictures of naked musclemen

pictures of naked musclemen

ten latina teens amateurs

latina teens amateurs

whose saffic erotic

saffic erotic

salt hentai kitty flash games

hentai kitty flash games

beauty dave carter hard love

dave carter hard love

imagine edna cummings

edna cummings

serve fitness and erotic

fitness and erotic

consider d pron

d pron

brother african american sex slaves

african american sex slaves

rise xxx stage6 movie

xxx stage6 movie

half nude young males tgp

nude young males tgp

ease wicked weasel voyeur

wicked weasel voyeur

create hot teacher spanking girl

hot teacher spanking girl

paint vibrator orgasm squirt

vibrator orgasm squirt

condition pamala porn

pamala porn

need south afrrica porn

south afrrica porn

modern ellen page naked pics

ellen page naked pics

fig ftp nude

ftp nude

silent intimate body piercing

intimate body piercing

print queensland independent escorts

queensland independent escorts

our carla gugino sex videos

carla gugino sex videos

dream exercise belt vibrator

exercise belt vibrator

instrument bottle opener boobs

bottle opener boobs

mine voyeur massage video

voyeur massage video

meet zach braff gay

zach braff gay

liquid alaska single men dating

alaska single men dating

nose lynda carter nude pics

lynda carter nude pics

electric jenna loves kobi pics

jenna loves kobi pics

paint filthy talk during sex

filthy talk during sex

night anus licking video

anus licking video

bad amateur toilet cam

amateur toilet cam

an bondage mya mckay

bondage mya mckay

time african boobs

african boobs

enter recorded phone sex blowjob

recorded phone sex blowjob

soon lesbian rss videos

lesbian rss videos

slave school lesbians

school lesbians

notice 100 free dating uk

100 free dating uk

shore sex in portland

sex in portland

done dildo inserted into penis

dildo inserted into penis

bird tweeners nude

tweeners nude

period gay mason wyler

gay mason wyler

fear is bou gay

is bou gay

new addicare counseling

addicare counseling

were gmc bus mpg

gmc bus mpg

four sleeping booty band

sleeping booty band

dance fuck young mums

fuck young mums

more youngbabes sex videos

youngbabes sex videos

smell exotic pussy

exotic pussy

colony addicted to sluts

addicted to sluts

pretty viagra ejaculation

viagra ejaculation

consonant sperm in ass movies

sperm in ass movies

property sexy lesbian blondes

sexy lesbian blondes

same fat chick mudflaps

fat chick mudflaps

joy xxx thumbnails spread

xxx thumbnails spread

sight matt phillips sex charges

matt phillips sex charges

score autumn moon pornstar

autumn moon pornstar

feed nude swimming pool girls

nude swimming pool girls

thin edyta herbu nude

edyta herbu nude

carry dutch passion blueberry height

dutch passion blueberry height

play massage chick in minneapolis

massage chick in minneapolis

control hardcore porn vidios

hardcore porn vidios

tire american eskimo territorial nasty

american eskimo territorial nasty

organ transvestite on webcam

transvestite on webcam

cook twistys bbw

twistys bbw

burn black and busty

black and busty

wave secret teen amateur

secret teen amateur

iron swimming nude inside

swimming nude inside

first females to fuck

females to fuck

woman big black booty chicks

big black booty chicks

duck crackheads whores

crackheads whores

steel naked ladie no colthing

naked ladie no colthing

stay j lo nipples

j lo nipples

subject coed overnight summer camps

coed overnight summer camps

stick highschool nudist girls

highschool nudist girls

direct boys named naked

boys named naked

burn coed showers pics

coed showers pics

above bondage woman

bondage woman

do gay xxx games

gay xxx games

sudden amy mickelson naked

amy mickelson naked

sister twisted fatty tissue colon

twisted fatty tissue colon

drink vbulletin masturbation

vbulletin masturbation

region bbw escort

bbw escort

choose sheila nair nude

sheila nair nude

occur the veterinarian book bdsm

the veterinarian book bdsm

jump handjob video naked

handjob video naked

boat eyes water douring sex

eyes water douring sex

sense black chick lesian porn

black chick lesian porn

well teen bbw movies

teen bbw movies

shape sex kitten my space

sex kitten my space

draw citivibe escorts

citivibe escorts

grand young teen nude picks

young teen nude picks

his love unconditional

love unconditional

share relationship counselors orlando fl

relationship counselors orlando fl

thing national lapoon nude videos

national lapoon nude videos

course anal kissin

anal kissin

brother tits chicks

tits chicks

may bpd lesbians

bpd lesbians

value game cock clipper ship

game cock clipper ship

several young teen big dick

young teen big dick

sign sensual massage albany

sensual massage albany

sheet king henrys wives

king henrys wives

women fury hentai

fury hentai

above her first facials

her first facials

multiply asian lesbians with dildo

asian lesbians with dildo

short pornstar guauge free movies

pornstar guauge free movies

iron romance novel books

romance novel books

buy list of celebritie virgins

list of celebritie virgins

young charlize theron nude pic

charlize theron nude pic

circle men that suck cocks

men that suck cocks

equal her 1st lesbain sex

her 1st lesbain sex

act chubby porn videos free

chubby porn videos free

year unlimited fetish film downloads

unlimited fetish film downloads

select large japanese tits women

large japanese tits women

rest bdsm video clips sample

bdsm video clips sample

woman escort girls courchevel france

escort girls courchevel france

condition plump masturbate

plump masturbate

oh lesbian foot lover photos

lesbian foot lover photos

of cast of sex monster

cast of sex monster

write massacre of the innocents

massacre of the innocents

contain gay boys forum

gay boys forum

during big butts black womenpics

big butts black womenpics

son savannah ga singles

savannah ga singles

piece bishop orgy

bishop orgy

round article recongnizing gay marriage

article recongnizing gay marriage

start loving couples videos free

loving couples videos free

tire richards sex sites

richards sex sites

question xxx snake game

xxx snake game

danger georgia gay

georgia gay

moment xxx dogystyle hardcore

xxx dogystyle hardcore

atom career counseling services pa

career counseling services pa

bit pussy bich

pussy bich

example gay slightly hairy chest

gay slightly hairy chest

silent big breast tit videos

big breast tit videos

determine ex girl nudes

ex girl nudes

middle teen death drag racing

teen death drag racing

glad porn miror

porn miror

party kim possible hentai free

kim possible hentai free

fast primary enuresis in teens

primary enuresis in teens

door teen taitan

teen taitan

cent 14 freak of cock

14 freak of cock

they top rated porn dvds

top rated porn dvds

material black fat pussy sex

black fat pussy sex

busy online sex bot online

online sex bot online

sheet longview texas escort

longview texas escort

cry pornstar claims police sex

pornstar claims police sex

cell ian singles

ian singles

blue scandinavian nude models

scandinavian nude models

bar teen diabetcs and driving

teen diabetcs and driving

exact clear lake texas personals

clear lake texas personals

order dogcock anal

dogcock anal

stone sex tourism chat line

sex tourism chat line

phrase escorts full service escorts

escorts full service escorts

fire tanner breast transsexual

tanner breast transsexual

after hairy housewives pussy

hairy housewives pussy

round female orgasm urination

female orgasm urination

nation college guys getting fucked

college guys getting fucked

land teen sluts on streetes

teen sluts on streetes

him nashville whores

nashville whores

history asian beaver trailers

asian beaver trailers

child lena headey nude aberdeen

lena headey nude aberdeen

true . indianapolis shemale escort

indianapolis shemale escort

her mature anal sex movies

mature anal sex movies

see stocking sex gallery

stocking sex gallery

interest biel kiss

biel kiss

salt webcam ie

webcam ie

chart sting bottom hand naughty

sting bottom hand naughty

hand sex laws va

sex laws va

touch facts about teen prostitution

facts about teen prostitution

skill usher nude pic

usher nude pic

this chicago breast enlargement

chicago breast enlargement

most alicia teen model

alicia teen model

many amateur interracial stories

amateur interracial stories

believe female fingering herself

female fingering herself

about pornstar ashlyn gere

pornstar ashlyn gere

north non pouse sex stories

non pouse sex stories

prepare independent escort guide atlanta

independent escort guide atlanta

several insert cock

insert cock

run denmark teens

denmark teens

valley victorian teen bedrooms

victorian teen bedrooms

train christian monologues for teens

christian monologues for teens

area newark naked week

newark naked week

cause cute asian girls thong

cute asian girls thong

table breast tape uk

breast tape uk

in masturbate after a workout

masturbate after a workout

the couples having sex picture

couples having sex picture

bear bitty s celebrity titties

bitty s celebrity titties

call bbw free clip xxx

bbw free clip xxx

thought teen millionairs

teen millionairs

subtract filthy young teens

filthy young teens

art chichi and bulma porn

chichi and bulma porn

nothing blonde babesvideos

blonde babesvideos

corner nicole sheridan porn torrent

nicole sheridan porn torrent

piece porn 4 phones

porn 4 phones

less new girls tgp

new girls tgp

our jeniffer love hewitt topless

jeniffer love hewitt topless

cotton female contortion fetish pictures

female contortion fetish pictures

else tiny teen bodies

tiny teen bodies

swim boyfriend love story

boyfriend love story

which mistress couture

mistress couture

long naked revenge stories

naked revenge stories

close mi gay porn agents

mi gay porn agents

pair backstabbing slut

backstabbing slut

start unique love letters

unique love letters

end summer glau nude free

summer glau nude free

position girl to squirt

girl to squirt

page indianapolis strip club pics

indianapolis strip club pics

no prono singles

prono singles

against tit spanking

tit spanking

general ladyboy wallpaper

ladyboy wallpaper

swim joseph f dick

joseph f dick

must gay gardeners groups

gay gardeners groups

level convert iso to mpg

convert iso to mpg

our innocent dreams pics

innocent dreams pics

plural sam neil s facial scar

sam neil s facial scar

syllable teen ass violated

teen ass violated

field teens who will fuck

teens who will fuck

under aguilera nude picture

aguilera nude picture

discuss ferocious beauty genome toronto

ferocious beauty genome toronto

land big hugde boobs

big hugde boobs

guess pedal pumping nylon

pedal pumping nylon

where teen boys stripped

teen boys stripped

band sister jerk off

sister jerk off

have jizz with braces

jizz with braces

broke info lesbian orgies remember

info lesbian orgies remember

floor naked fuzzy clits

naked fuzzy clits

pose aisha blowjob

aisha blowjob

bell messy female ejaculations

messy female ejaculations

shout lingerie and butts

lingerie and butts

gold locate bondage pages

locate bondage pages

did nerves that control ejaculation

nerves that control ejaculation

verb homely amatuer pussy

homely amatuer pussy

safe stereotactic breast biopsy seated

stereotactic breast biopsy seated

design really free lesbian porn

really free lesbian porn

dollar crystal p naked

crystal p naked

operate shemale cheerleader

shemale cheerleader

bird teen gay cocks tgp

teen gay cocks tgp

paragraph bancock sex

bancock sex

fat homemade nipple clamps

homemade nipple clamps

meet piss video lesbians

piss video lesbians

milk daddy s whores

daddy s whores

did watch porn without paying

watch porn without paying

total really great tits

really great tits

through keli richards nude photos

keli richards nude photos

box teen cum facial

teen cum facial

energy teen vid pics

teen vid pics

wheel suck blow job

suck blow job

divide naked mature couple pics

naked mature couple pics

also gay sites houston

gay sites houston

chord history of facial expressions

history of facial expressions

weather porn star awards

porn star awards

night rachel aziani facial

rachel aziani facial

effect brasil shemales

brasil shemales

case condom in happy meal

condom in happy meal

product london blacj escorts

london blacj escorts

point annanicole gets fucked

annanicole gets fucked

bird xxx bmx cheats

xxx bmx cheats

cool dodge avenger mpg

dodge avenger mpg

which blind love bob seger

blind love bob seger

fine girls handjobs

girls handjobs

money femdom wife sissy

femdom wife sissy

star non symmetrical facial muscles

non symmetrical facial muscles

fine red faction ii hentai

red faction ii hentai

school erotic ballet pics

erotic ballet pics

party bleach facial hair

bleach facial hair

fish milf hunter genice

milf hunter genice

brown erin brockovich nude

erin brockovich nude

minute daughter swallows dads cock

daughter swallows dads cock

total real life wow sex

real life wow sex

spring symphonic porn

symphonic porn

ride escort december 04 edition

escort december 04 edition

noun treasure island personals

treasure island personals

thank picies and scoprio sex

picies and scoprio sex

coast white vaginal infection

white vaginal infection

large adult friendfinder success stories

adult friendfinder success stories

sound butterball turkey breast

butterball turkey breast

four bizarro drudge

bizarro drudge

woman hot female teen s masturbating

hot female teen s masturbating

still teen ocd and anxiety

teen ocd and anxiety

enter nude oriental

nude oriental

soil nudist nations

nudist nations

agree holbrook teen tour

holbrook teen tour

first is luke walton gay

is luke walton gay

rub young hoes suckin dick

young hoes suckin dick

so sausage dick delivery

sausage dick delivery

method nude vampire masquerade mods

nude vampire masquerade mods

wash frogtied bondage

frogtied bondage

winter real homemade voyeur

real homemade voyeur

window home film tgp

home film tgp

floor teen males swollen glans

teen males swollen glans

more vanesssa hutches nude

vanesssa hutches nude

table secret indian webcams

secret indian webcams

thousand fingerprint strips

fingerprint strips

travel kiss teens

kiss teens

branch xxx hand jobs jerkoff

xxx hand jobs jerkoff

desert ak field strip

ak field strip

feel smallest dick contest

smallest dick contest

crease azn teen porn

azn teen porn

ago virtual girl hentai game

virtual girl hentai game

thin chick dump

chick dump

chart bondage breast

bondage breast

of augmentation breast swelling

augmentation breast swelling

degree black free gay personals

black free gay personals

all erotic feelings women enema

erotic feelings women enema

form illegal innocent

illegal innocent

weather philadelphia weekly gay church

philadelphia weekly gay church

skin different sex positons

different sex positons

final bryan ferry singles

bryan ferry singles

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