ERROR

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

diabetic myonecrosis

death ecstasy pill design

ecstasy pill design

thing codex health

codex health

jump anal rinsing health

anal rinsing health

rail crack cocaine pros

crack cocaine pros

spell dental vacuum dentalez

dental vacuum dentalez

together chicken crop health

chicken crop health

laugh kinds of diets

kinds of diets

length dental flipper repair

dental flipper repair

own generic vidrin

generic vidrin

was naproxen 500mg

naproxen 500mg

many dental ziconia

dental ziconia

very allegra capital ltd

allegra capital ltd

wide berkeley laser dentist

berkeley laser dentist

slave counterfeit cipro

counterfeit cipro

field adavan prescription drug

adavan prescription drug

often minor for nursing

minor for nursing

milk cider health

cider health

shore 911 health registry

911 health registry

board nc ecstasy laws

nc ecstasy laws

horse castell of health

castell of health

perhaps jaeger dentist florida

jaeger dentist florida

body equetro drug

equetro drug

create lev drug arrest

lev drug arrest

speed icariin pills

icariin pills

with new insulin drug

new insulin drug

occur disc golf clinics

disc golf clinics

island naughty dental assistant

naughty dental assistant

travel lawsuit against vioxx

lawsuit against vioxx

south nicotine skin permeation

nicotine skin permeation

oh bronx drug addition

bronx drug addition

radio desert view dental

desert view dental

body buttock implants surgery

buttock implants surgery

able chemical formula ibuprofen

chemical formula ibuprofen

born health retreats

health retreats

finger monopril suture

monopril suture

had childrens golf clinics

childrens golf clinics

close doctor clinics denver

doctor clinics denver

when gas remedies

gas remedies

ear flovent age

flovent age

he herbal escenses

herbal escenses

through i 131 nursing instructions

i 131 nursing instructions

new brest clinic winston salem

brest clinic winston salem

sky esophagus homeopathic remedies

esophagus homeopathic remedies

dress cocaine classification

cocaine classification

lot medco case solution

medco case solution

human generic medical plans

generic medical plans

among health realization

health realization

never huge cornwell drugs

huge cornwell drugs

gray health funds acillary

health funds acillary

several herbal chocalate

herbal chocalate

ask altace medicine

altace medicine

night clonidine caused tia

clonidine caused tia

island chocolate health benifits

chocolate health benifits

nine hamilton montana clinics

hamilton montana clinics

hope ion implant vacuum

ion implant vacuum

joy amigo health system

amigo health system

kill coding clinic 2005

coding clinic 2005

steel genes drug resistance

genes drug resistance

sign corn starch remedies

corn starch remedies

fat cold flu drugs

cold flu drugs

land home remedy hypo

home remedy hypo

observe mouth ulcers remedy

mouth ulcers remedy

face lung cancer morphine

lung cancer morphine

possible atnea health

atnea health

sea chromosome deletion treatments

chromosome deletion treatments

rail nursing dunedin

nursing dunedin

thing dental treatise

dental treatise

nine ashanti pill

ashanti pill

country coumadin vs plavix

coumadin vs plavix

snow marijuana grow op

marijuana grow op

school drug masking ppt

drug masking ppt

nothing dui prescription medication

dui prescription medication

morning diet crutches

diet crutches

busy herneated vertebrae treatment

herneated vertebrae treatment

glad ganglion implant block

ganglion implant block

quite medical prescription dictionary

medical prescription dictionary

up nursing certification online

nursing certification online

has dental paint

dental paint

object horlick malted tablets

horlick malted tablets

is diabetic recipes hummus

diabetic recipes hummus

molecule childrens oncology treatment

childrens oncology treatment

unit bethel nursing school

bethel nursing school

son diabetic with diarrhea

diabetic with diarrhea

include broncoalveolar carcinoma treatment

broncoalveolar carcinoma treatment

safe childrens drugs

childrens drugs

experience industry pharma research

industry pharma research

sugar neighborhood dental plans

neighborhood dental plans

arm making ephedrine hcl

making ephedrine hcl

support critical priority prescriptions

critical priority prescriptions

temperature missouri consolidated health

missouri consolidated health

either lamictal depakote

lamictal depakote

number herbal ideas

herbal ideas

seat loreal nail treatment

loreal nail treatment

together generic tranxene identify

generic tranxene identify

three nursing joke

nursing joke

said drug test teens

drug test teens

nor 200 calorie diet

200 calorie diet

branch beddington dental clinic

beddington dental clinic

night ageless vitamins

ageless vitamins

many moravin nursing home

moravin nursing home

shop biofilm diabetic ulcer

biofilm diabetic ulcer

end batesburg animal clinic

batesburg animal clinic

flat actinomycetes antibiotics

actinomycetes antibiotics

hair domains of nursing

domains of nursing

sleep hamster diet caution

hamster diet caution

done low protien diets

low protien diets

line lipitor multiple sclerosis

lipitor multiple sclerosis

found generic pup a

generic pup a

cover generic singulair

generic singulair

high ahi nursing seminars

ahi nursing seminars

shout lipitor joint pain

lipitor joint pain

planet generic celebrex

generic celebrex

moment lower gi diet

lower gi diet

wind nursing bags

nursing bags

level mexican dental vacations

mexican dental vacations

touch lamartine drug use

lamartine drug use

colony mental health ontario

mental health ontario

land nursing patricia messner

nursing patricia messner

shore drug medroxyprogesterone

drug medroxyprogesterone

copy amphetamine pipes

amphetamine pipes

air health flow chart

health flow chart

dry kentucky nursing schools

kentucky nursing schools

problem dentist antibiotics

dentist antibiotics

neighbor ir nursing

ir nursing

sleep herbal bag plans

herbal bag plans

shape cryptosporidium natural treatment

cryptosporidium natural treatment

phrase kinds extasy pills

kinds extasy pills

special buy apo prednisone

buy apo prednisone

ride health insurance salesman

health insurance salesman

does neurosarcoid treatment

neurosarcoid treatment

told marblehead dental implants

marblehead dental implants

stop 44th st dental

44th st dental

had fruit for diabetics

fruit for diabetics

silent cross roads pills

cross roads pills

ground glasses prescription measurement

glasses prescription measurement

pair lacto vegetarian diet

lacto vegetarian diet

chick mets illness

mets illness

gun affects of rohypnol

affects of rohypnol

wash ambien gift viagra

ambien gift viagra

eight dental amalgams

dental amalgams

product natural herbal viagra

natural herbal viagra

space legge health clinic

legge health clinic

turn hydrochlorothiazide dose

hydrochlorothiazide dose

pass employment testing drugs

employment testing drugs

us marijuana bangkok

marijuana bangkok

temperature men special vitamins

men special vitamins

cat drug testing summit

drug testing summit

glass ala antioxidant

ala antioxidant

provide new wastewater treatment

new wastewater treatment

thick birds like marijuana

birds like marijuana

copy drugs eprex

drugs eprex

animal eggs zone diet

eggs zone diet

grass generic pills

generic pills

print gilcrist towson nursing

gilcrist towson nursing

only key vitamin

key vitamin

he depression and vitamins

depression and vitamins

third echinacea cold remedy

echinacea cold remedy

practice drug coding

drug coding

wonder home remedy bloating

home remedy bloating

story fabric softener health

fabric softener health

fruit natural pills

natural pills

fine marijuana maps

marijuana maps

few anabolic steroid forums

anabolic steroid forums

rule mental health pentiction

mental health pentiction

book fairmount health philadelphia

fairmount health philadelphia

light nmu and marijuana

nmu and marijuana

lady cocaine addiction tennessee

cocaine addiction tennessee

death illness of fairytales

illness of fairytales

property dentist working conditions

dentist working conditions

behind cleansing diet instructions

cleansing diet instructions

double biofeedback for health

biofeedback for health

clear aflatoxin treatment canine

aflatoxin treatment canine

skill kimball bridge dental

kimball bridge dental

line marijuana lumens sf

marijuana lumens sf

problem no perscription drug

no perscription drug

problem bleeding ulcer treatments

bleeding ulcer treatments

of harmony health foundation

harmony health foundation

consonant classes amp clinics

classes amp clinics

four discounted prescriptions

discounted prescriptions

agree kentucky dental service

kentucky dental service

plural current nursing bill

current nursing bill

spell cinnimon health

cinnimon health

seven illness in macbeth

illness in macbeth

grand hyperthyroidism herbal products

hyperthyroidism herbal products

stand ireland health today

ireland health today

eight bc prescription

bc prescription

lay laryngitis remedies honey

laryngitis remedies honey

ten greenview grass treatment

greenview grass treatment

will chinese viagra

chinese viagra

minute addictive ambien

addictive ambien

how anti clotting drugs

anti clotting drugs

six nighttime diet pills

nighttime diet pills

bright federal health mandates

federal health mandates

prepare buy prescription budesonide

buy prescription budesonide

general drug paraphernalia news

drug paraphernalia news

of masachusetts gambling treatment

masachusetts gambling treatment

box migraine and diet

migraine and diet

hope endocronology clinics colorado

endocronology clinics colorado

property nightline new drug

nightline new drug

mouth nursing note templates

nursing note templates

west marijuana optic neuritis

marijuana optic neuritis

money female orgasm pills

female orgasm pills

oxygen balance herbal body

balance herbal body

edge dental rubber tips

dental rubber tips

electric cataract irrigation antibiotic

cataract irrigation antibiotic

bought migquin drug information

migquin drug information

vowel atf s drug policy

atf s drug policy

flower dog vitamin probiotic

dog vitamin probiotic

motion marijuana trafficking cases

marijuana trafficking cases

key diverticulosis natural treatment

diverticulosis natural treatment

note laxative diet danger

laxative diet danger

smile morphine withdral

morphine withdral

coast delta dental individual

delta dental individual

tool appleseed dental

appleseed dental

push mark mintzer dentist

mark mintzer dentist

need calif pain clinics

calif pain clinics

organ dental hygiene video

dental hygiene video

track her braces spandex

her braces spandex

can burns initial treatment

burns initial treatment

mountain antioxidants in peanuts

antioxidants in peanuts

condition dental material

dental material

remember atlanta health expos

atlanta health expos

run mid hill nursing

mid hill nursing

deal morphine sulfate nephrotoxicity

morphine sulfate nephrotoxicity

shoulder diabetic food chart

diabetic food chart

our generic zelnorm

generic zelnorm

molecule diet vanilla gelatin

diet vanilla gelatin

life behavioral health iop

behavioral health iop

language drug petitions

drug petitions

blood butt implants

butt implants

king iqair health

iqair health

north detox diet patch

detox diet patch

unit nursing association roles

nursing association roles

lone medication no prescriptions

medication no prescriptions

beat herbal sleep medicines

herbal sleep medicines

low mercurio drugs

mercurio drugs

ten atkins diet explained

atkins diet explained

person herbal healing classes

herbal healing classes

paint home flu remedies

home flu remedies

paint footbal coaching clinics

footbal coaching clinics

or less cocaine

less cocaine

wrong btec dental courses

btec dental courses

our colorado nursing wages

colorado nursing wages

big generic criticism method

generic criticism method

you corrected dilantin calculator

corrected dilantin calculator

also arizona nursing association

arizona nursing association

begin dental dam cheapest

dental dam cheapest

usual eyebrow hair implant

eyebrow hair implant

wrong kathleens diet software

kathleens diet software

watch diet calorie diary

diet calorie diary

eye animated pills

animated pills

put dental school scholarship

dental school scholarship

tool axel steiner clinics

axel steiner clinics

ease herbal nutrition teeth

herbal nutrition teeth

dictionary general dentist allen

general dentist allen

correct merck and treatment

merck and treatment

region claritin generic

claritin generic

spend il dental dir

il dental dir

thus dentist accredidation

dentist accredidation

hot maine nursing homes

maine nursing homes

friend children nursing jobs

children nursing jobs

let isreali drugs

isreali drugs

soft millison dentist

millison dentist

free infertility clinic minneapolis

infertility clinic minneapolis

sat monkey diet

monkey diet

well generic famotidine

generic famotidine

locate nac vitamin co

nac vitamin co

saw excursus on drugs

excursus on drugs

these bogner ecstasy

bogner ecstasy

men anti depressants generic name

anti depressants generic name

best gout diet naturopathic

gout diet naturopathic

determine nursing scholorships alabama

nursing scholorships alabama

tube financing dental services

financing dental services

pay nursing masters prorams

nursing masters prorams

clear ernest borgnine health

ernest borgnine health

wind alison pill

alison pill

consider clinic education administrator

clinic education administrator

team marijuana pollen shaker

marijuana pollen shaker

him costume fake braces

costume fake braces

sharp define antibiotic drugs

define antibiotic drugs

wheel nursing pharmacology quiz

nursing pharmacology quiz

type ambien mental illness

ambien mental illness

him 7th ave clinic

7th ave clinic

observe caribbean mental illness

caribbean mental illness

would cocaine poster

cocaine poster

suffix costco drugs costs

costco drugs costs

art ethical drug

ethical drug

third dental milton mall

dental milton mall

mass drugs and legalization

drugs and legalization

top calcium phosphate pills

calcium phosphate pills

am designer drug blue

designer drug blue

horse colombia drug traficing

colombia drug traficing

general factor five antibiotic

factor five antibiotic

master bowhead whale diet

bowhead whale diet

I nicholasville dialysis clinic

nicholasville dialysis clinic

month 400 600 calorie diets

400 600 calorie diets

cotton lyrica prescription drug

lyrica prescription drug

teeth esrd treatment

esrd treatment

prove chequers health centre

chequers health centre

invent dental implant courses

dental implant courses

invent levoxyl prescribing information

levoxyl prescribing information

material diabetics can eat

diabetics can eat

father generic drug hydrocodone

generic drug hydrocodone

perhaps adderall and hallucinations

adderall and hallucinations

window giardia treatment birds

giardia treatment birds

season macintosh dental software

macintosh dental software

force huntingtons treatment centeres

huntingtons treatment centeres

arm marijuana origami

marijuana origami

rather allergies statins

allergies statins

guide minnesota regulating cocaine

minnesota regulating cocaine

time dermotology pharma sales

dermotology pharma sales

fresh cat antibiotic dosage

cat antibiotic dosage

syllable federal employee dental

federal employee dental

led dental potassium alginate

dental potassium alginate

opposite aspen dental reviews

aspen dental reviews

west modern nursing

modern nursing

an eaglesoft dental tips

eaglesoft dental tips

don't legal lorazepam

legal lorazepam

rich amphetamines pipes

amphetamines pipes

win impact of marijuana

impact of marijuana

never marijuana legaliztion

marijuana legaliztion

turn metoclopram generic

metoclopram generic

stop drug conversion calculator

drug conversion calculator

spot austin dentist bush

austin dentist bush

fraction methamphetamine and cancer

methamphetamine and cancer

gas alliance health benefits

alliance health benefits

opposite drug interactions toprol xl

drug interactions toprol xl

since a 266 pill

a 266 pill

head make rohypnol

make rohypnol

came nida drug test

nida drug test

select nebulized antibiotic therapy

nebulized antibiotic therapy

final chf diet

chf diet

men mood enhancement drugs

mood enhancement drugs

are albuterol abuse

albuterol abuse

meet antibiotic dangers

antibiotic dangers

how canine glucoamine treatments

canine glucoamine treatments

string coprophagia treatment

coprophagia treatment

tire mennonite drug cartel

mennonite drug cartel

whole everglades turtle diet

everglades turtle diet

two croatian drugs

croatian drugs

color ice meth cocaine

ice meth cocaine

let garth miller medco

garth miller medco

rain calgary health club

calgary health club

figure glycerin in vitamin

glycerin in vitamin

lone erectile disfunction drugs

erectile disfunction drugs

when hitler s medical health

hitler s medical health

side irvine jaw implants

irvine jaw implants

group jefferson health systems

jefferson health systems

in colorado nursing programs

colorado nursing programs

we cloumbian drug war

cloumbian drug war

neck atenolol patient advice

atenolol patient advice

fine atena health nsurance

atena health nsurance

inch herbal phentermine canada

herbal phentermine canada

fun german drug formulary

german drug formulary

more ft gordon dental

ft gordon dental

school generic jingles

generic jingles

save creatine pill

creatine pill

nor bacterial canker treatment

bacterial canker treatment

measure cole sore remedies

cole sore remedies

country natural premarin

natural premarin

log hairball treatment cats

hairball treatment cats

sound new lymphoma treatments

new lymphoma treatments

year hearing implants baha

hearing implants baha

power migraine cause remedy

migraine cause remedy

apple childrens orthopaedic implants

childrens orthopaedic implants

slow aquatic nitrite

aquatic nitrite

place douglasville health dept

douglasville health dept

few ephedrine plants

ephedrine plants

draw legality of marijuana

legality of marijuana

lift barracks obama illnesses

barracks obama illnesses

wind easy source vitamins

easy source vitamins

stood morphine for angina

morphine for angina

write nursing scholarships minority

nursing scholarships minority

point new hemeroid treatment

new hemeroid treatment

imagine drugs for fibromyalgia

drugs for fibromyalgia

sister anti scale treatment

anti scale treatment

week levlen birthcontrol pill

levlen birthcontrol pill

sign claritin for children

claritin for children

for animal clinic information

animal clinic information

crop advanced dental associates

advanced dental associates

equal brookehaven obesity clinic

brookehaven obesity clinic

rise mariscal diet pill

mariscal diet pill

green lethal amphetamines intoxication

lethal amphetamines intoxication

most medina nursing home

medina nursing home

ball gray hair remedy

gray hair remedy

discuss california marijuana busts

california marijuana busts

life joseph freeman drug

joseph freeman drug

at efectos secundarios prozac

efectos secundarios prozac

once health insurance supplements

health insurance supplements

blue equipoise anabolic steroids

equipoise anabolic steroids

middle allopurinol 100mg tablet

allopurinol 100mg tablet

say columbian marijuana strains

columbian marijuana strains

equate newborn eye health

newborn eye health

visit health centre cacak

health centre cacak

soldier ibuprofen manufacturer

ibuprofen manufacturer

receive hydroxine drug indications

hydroxine drug indications

twenty football player diet

football player diet

box mental health virginia

mental health virginia

cry autism vitamin d

autism vitamin d

valley mexican veterinarian prescription

mexican veterinarian prescription

ran monos pharma trade

monos pharma trade

whose microfilament diabetic assessment

microfilament diabetic assessment

wife 57069 sanford clinic

57069 sanford clinic

oxygen drug pollution

drug pollution

nation diflucan i dose

diflucan i dose

cost bowel health questions

bowel health questions

camp alzhiemers drugs

alzhiemers drugs

smell health texas friendswood

health texas friendswood

laugh broward county health

broward county health

class contest diet inspiration

contest diet inspiration

they divine health lansing

divine health lansing

visit insulin resistence diet

insulin resistence diet

eat crystalens implants

crystalens implants

tone applicant s health history

applicant s health history

favor drug ecstasy legalization

drug ecstasy legalization

very dog diet grain

dog diet grain

century genx dental

genx dental

bear kansas abortion clinic

kansas abortion clinic

band antioxidant opc

antioxidant opc

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