ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
prudhoe bay freight lines

prudhoe bay freight lines

triangle pump jack enterprise

pump jack enterprise

back rc steele dogs

rc steele dogs

so range finding palm pilot

range finding palm pilot

hold printer page count tracking

printer page count tracking

own relocate charleston berkley

relocate charleston berkley

don't radio elwood blues 98 9

radio elwood blues 98 9

felt rainey kirkland

rainey kirkland

whose recycling printer oakland ca

recycling printer oakland ca

near radio 650 rancho cordova

radio 650 rancho cordova

act rhino light mount

rhino light mount

nature quail valley oregon

quail valley oregon

crowd recover password vista

recover password vista

hundred red wings stencil

red wings stencil

decimal recipe viet summer rolls

recipe viet summer rolls

mother quartzsite az

quartzsite az

will recycle magazines wichita kansas

recycle magazines wichita kansas

team regal beagle indian orchard

regal beagle indian orchard

smell raphsody in blue gershwin

raphsody in blue gershwin

triangle rca m202 drivers

rca m202 drivers

symbol rentals in el segundo

rentals in el segundo

soon rick solomon video

rick solomon video

part princeton fenster

princeton fenster

swim princeton jazz festival

princeton jazz festival

arrange red ceramic flat irons

red ceramic flat irons

meant rebecca s place columbus

rebecca s place columbus

put price williams columbia citu

price williams columbia citu

full recipies with malibu rum

recipies with malibu rum

any princeton elm home depot

princeton elm home depot

office private boat miami romantic

private boat miami romantic

but rio vista elem

rio vista elem

blow regions bank jasper al

regions bank jasper al

brought reed barton san marcos

reed barton san marcos

separate quote circle

quote circle

pass rhody days florence oregon

rhody days florence oregon

grow regency jerusalem

regency jerusalem

which redfield 2 6 handgun

redfield 2 6 handgun

plain raunchy erotica stories

raunchy erotica stories

post queen crescent hotel deal

queen crescent hotel deal

spell priscilla s evansville

priscilla s evansville

fig restaurants in langley

restaurants in langley

deep restaurants renton washington breakfast

restaurants renton washington breakfast

sight pwllheli wales

pwllheli wales

rock pva lexington kentucky

pva lexington kentucky

case quadrant map excel

quadrant map excel

send priory hospital birmingham

priory hospital birmingham

know replica lv globe shopper

replica lv globe shopper

mass red buffalo and kansas

red buffalo and kansas

path psychic light party

psychic light party

require pt douglas fishing

pt douglas fishing

prove rentals in ashland ky

rentals in ashland ky

circle research grant global warming

research grant global warming

done restore drivers

restore drivers

than pueblo craigs list

pueblo craigs list

sun red fox socks

red fox socks

complete printing on clear labels

printing on clear labels

subtract relaxation massage melbourne

relaxation massage melbourne

clock remax in pasadena texas

remax in pasadena texas

smell red fox lab puppies

red fox lab puppies

century ralph scribner

ralph scribner

same princeton mn ice arena

princeton mn ice arena

prove restaurants tustin california

restaurants tustin california

bone respect stories school

respect stories school

story put in bay playboy magazine rated

put in bay playboy magazine rated

green replacements hamilton beach 80365

replacements hamilton beach 80365

is recycle kirkland wa

recycle kirkland wa

drink review pelican joystick

review pelican joystick

than restaurants san pedro ca

restaurants san pedro ca

language pruning globe maples

pruning globe maples

station rachel weaver ruby ridge

rachel weaver ruby ridge

tree restaurants in oakland ca

restaurants in oakland ca

danger printable percent circle

printable percent circle

history restoration movement darwin

restoration movement darwin

ride ramona philadelphia italian restaurant

ramona philadelphia italian restaurant

verb reef convertible black florida

reef convertible black florida

division rave houston texas

rave houston texas

thick ransom kansas

ransom kansas

special restaurants bellingham washington

restaurants bellingham washington

ball ray parker actor

ray parker actor

provide raelynn parks

raelynn parks

count randy purtell sterling il

randy purtell sterling il

west purple orange dragon plush

purple orange dragon plush

atom recipes for cashew chicken

recipes for cashew chicken

throw refugee camp in sudan

refugee camp in sudan

cow rank clinton portis

rank clinton portis

how refurbished appliances carrollton tx

refurbished appliances carrollton tx

element reg watson resevoir pickeral

reg watson resevoir pickeral

require ring my bell blondie

ring my bell blondie

long providenciales town centre mall

providenciales town centre mall

crowd pulkovskaya st petersburg russia

pulkovskaya st petersburg russia

remember rhett kenneth gordon

rhett kenneth gordon

machine rachelle peterson cayman

rachelle peterson cayman

provide rentals in cottonwood az

rentals in cottonwood az

sense richard dixon jr westminster

richard dixon jr westminster

wrote red devil cartoon picture

red devil cartoon picture

surface providence hall santa barbara

providence hall santa barbara

may prodigal son bible stories

prodigal son bible stories

column redfield new yor

redfield new yor

shoulder restaurants harvey s

restaurants harvey s

among ram gateway performance 1000

ram gateway performance 1000

trouble pullman washington jobs

pullman washington jobs

column rego raceway new york

rego raceway new york

door recycling toner tyler texas

recycling toner tyler texas

eye relient center houston tx

relient center houston tx

page respriatory technician schools phoenix

respriatory technician schools phoenix

glad public schools bell schedules

public schools bell schedules

create ramona quimby comics

ramona quimby comics

east printing linda jackson

printing linda jackson

many religious stories for thanksgiving

religious stories for thanksgiving

sheet quotations trees woodland

quotations trees woodland

east queen elizabeth gorboduc

queen elizabeth gorboduc

mix rick turner windsor ontario

rick turner windsor ontario

the regal deli plainview

regal deli plainview

rail respite care delaware

respite care delaware

hundred return kirby vaccum

return kirby vaccum

desert queen creek 4 wheelers

queen creek 4 wheelers

pretty rezulin lawyers san diego

rezulin lawyers san diego

surprise residential solar thermal electricity

residential solar thermal electricity

cold quebec entrepreneurs contest grant

quebec entrepreneurs contest grant

surprise resturants downtown evansville in

resturants downtown evansville in

his rachel hunter naked video

rachel hunter naked video

an reindeer service cleveland

reindeer service cleveland

plant rca princeton

rca princeton

father process servers leeds

process servers leeds

art reservoir sharing agreement washington

reservoir sharing agreement washington

on registered lawyers ontario

registered lawyers ontario

among printed dated stamps

printed dated stamps

deal relocating to manhattan kansas

relocating to manhattan kansas

picture princeton tec eos bike

princeton tec eos bike

ten replace spot lights ceiling

replace spot lights ceiling

point rhs football camps

rhs football camps

hand ralph tiberi

ralph tiberi

cent redstone healthcare in huntsville

redstone healthcare in huntsville

cloud psu lacrosse camp

psu lacrosse camp

lift prudential houston texas

prudential houston texas

set quality inn suites lincoln

quality inn suites lincoln

fat redlands march

redlands march

rope princess blue ribbon mine

princess blue ribbon mine

woman quality distributing del morris

quality distributing del morris

common ratio number stories

ratio number stories

four rich pass anchorage alaska

rich pass anchorage alaska

kind restaurant consultant nashville

restaurant consultant nashville

hand property liability waiver kansas

property liability waiver kansas

discuss ramada gateway west

ramada gateway west

word reginald wilson real estate

reginald wilson real estate

let reina homes fairbanks

reina homes fairbanks

finger restaurant italian new york

restaurant italian new york

problem prostitution east end london

prostitution east end london

agree prim rv rden

prim rv rden

necessary red design lawrence kansas

red design lawrence kansas

create princeton missouri appartments

princeton missouri appartments

my rexel midland

rexel midland

create restaurants in highlands nc

restaurants in highlands nc

stream restaurant antelope valley

restaurant antelope valley

effect resale shop pasadena

resale shop pasadena

hill property investment in damascus

property investment in damascus

mouth rental monroe county keys

rental monroe county keys

blue regina garner

regina garner

saw quote from frederick douglass

quote from frederick douglass

paint restraunts lafayette ca

restraunts lafayette ca

major richard walcott

richard walcott

speech restore dell computer

restore dell computer

know revolt of the beavers

revolt of the beavers

month richard arthur wells melbourne

richard arthur wells melbourne

rather red lobster concord nc

red lobster concord nc

bear price for strawberries

price for strawberries

ride quantum paradox light

quantum paradox light

hour restaurant contractors charlotte

restaurant contractors charlotte

tall richard wilson vero group

richard wilson vero group

would rebacca baker

rebacca baker

finish red wing minnesota touris

red wing minnesota touris

wait ray kennedy enterprises

ray kennedy enterprises

good propagator light

propagator light

wood resume oracle 11i memphis

resume oracle 11i memphis

gun pugwash theodore tugboat

pugwash theodore tugboat

home quintard mall al oxford

quintard mall al oxford

ground rcmp technical security branch

rcmp technical security branch

brother puleo s italian knoxville tn

puleo s italian knoxville tn

you restaurant reviews in houston

restaurant reviews in houston

rope private adoption grants

private adoption grants

less rhapsody in blue mp3

rhapsody in blue mp3

mass richard black pool cues

richard black pool cues

section rebecca george prevention magazine

rebecca george prevention magazine

tell richard realm bondage stories

richard realm bondage stories

left ralphies sylvania ohio

ralphies sylvania ohio

kept price disk warrior 4

price disk warrior 4

green printable weather coloring pages

printable weather coloring pages

fresh regestered globe sex offenders

regestered globe sex offenders

common rick perry immunization

rick perry immunization

noun princeton spot

princeton spot

nation recipe spring roll thai

recipe spring roll thai

can ravanel hoa charleston sc

ravanel hoa charleston sc

cook quinte isle camp

quinte isle camp

usual restricted dog breeds alberta

restricted dog breeds alberta

four ricky hayden motorcycle racing

ricky hayden motorcycle racing

mean princeton arms apartments nj

princeton arms apartments nj

probable rainbow valley tx

rainbow valley tx

city printer paper kirkland

printer paper kirkland

together raddison hotel cleveland gateway

raddison hotel cleveland gateway

stretch puerto marques bay

puerto marques bay

me restaurants pasadena california

restaurants pasadena california

list pridefest long beach bar

pridefest long beach bar

famous rachel steele sex videos

rachel steele sex videos

skill racial makeup greyhound drivers

racial makeup greyhound drivers

require republican party home page

republican party home page

colony print manage louisville kentucky

print manage louisville kentucky

an remax lakeside cadiz

remax lakeside cadiz

we richard lynn clark

richard lynn clark

friend restaurants in anaheim

restaurants in anaheim

locate psychotherapy danville california

psychotherapy danville california

woman rb s auto sales nashville

rb s auto sales nashville

spend provista portland or

provista portland or

particular restaurant in hampton va

restaurant in hampton va

sheet richard hatfield regina sk

richard hatfield regina sk

famous rebekah elizabeth ford

rebekah elizabeth ford

hard provincal campgrounds alberta

provincal campgrounds alberta

sharp rebecca patton of texas

rebecca patton of texas

settle recipe for turkish delight

recipe for turkish delight

spot rfid ranges

rfid ranges

suffix recording studio tucson

recording studio tucson

space provincial symbols of alberta

provincial symbols of alberta

crease recipie chicken and dumplin

recipie chicken and dumplin

basic regza monitor driver

regza monitor driver

bit riding schools kent

riding schools kent

egg psychic williams

psychic williams

brown reform temple

reform temple

bread remax in newton iowa

remax in newton iowa

spread richard berry song lyrics

richard berry song lyrics

tire range rover dvd audio

range rover dvd audio

radio ralph twins

ralph twins

multiply recharging lincoln a c

recharging lincoln a c

shoe property in mansfield

property in mansfield

three realty executive southeastern ontario

realty executive southeastern ontario

sight richard haxton natures valley

richard haxton natures valley

them restaraunts in culver city

restaraunts in culver city

enemy propagating the tupelo tree

propagating the tupelo tree

fit rascal flats backwords

rascal flats backwords

fruit raytheon homeland security

raytheon homeland security

must printable number writing pages

printable number writing pages

point rachel hunter bomis gallery

rachel hunter bomis gallery

cross prudential dave williams

prudential dave williams

stream radio station 740 houston

radio station 740 houston

yard redlands chamber of commerce

redlands chamber of commerce

else repo depot cleveland tn

repo depot cleveland tn

probable quality inn glendale arizona

quality inn glendale arizona

joy range fed meats

range fed meats

got province of ontario map

province of ontario map

heavy pubs in perth scotland

pubs in perth scotland

term reloading leeds

reloading leeds

girl quixote s true blue

quixote s true blue

bread quattro restaurant houston

quattro restaurant houston

noise reception site houston tx

reception site houston tx

boat recyclers in columbus ohio

recyclers in columbus ohio

either print drivers for handspring

print drivers for handspring

best rebuilding atwood brake actuator

rebuilding atwood brake actuator

those richard orin new york

richard orin new york

field representative tim baker

representative tim baker

drink ralph lauren suits reveiw

ralph lauren suits reveiw

receive proper greenhouse temperature range

proper greenhouse temperature range

ride reina headland formentera

reina headland formentera

decimal ralph simonetti

ralph simonetti

life quotes by anne margaret

quotes by anne margaret

motion ralph lamar winters

ralph lamar winters

direct radeon all in wonder drivers download

radeon all in wonder drivers download

whole proof spanish jack cavanaugh

proof spanish jack cavanaugh

down psychologist in poughkeepsie ny

psychologist in poughkeepsie ny

main queen elizabeth interesting things

queen elizabeth interesting things

road proctor and gambel coupons

proctor and gambel coupons

stretch redondo beach private estates

redondo beach private estates

laugh property assessment louisville ky

property assessment louisville ky

cold ralph lauren classic towell

ralph lauren classic towell

whole racetrack westminster georgia

racetrack westminster georgia

which rashod moulton

rashod moulton

listen recording courier and miami

recording courier and miami

girl ricky martin san diego

ricky martin san diego

woman remax in russellville arkansas

remax in russellville arkansas

number radmin vista

radmin vista

enemy ralph mccloud dothan al

ralph mccloud dothan al

section restaurants saginaw mi

restaurants saginaw mi

atom richard franklin reprints

richard franklin reprints

dress riffe auto columbus ohio

riffe auto columbus ohio

feet privacy shutters new york

privacy shutters new york

flower rich murdered highland california

rich murdered highland california

rather repton mountain

repton mountain

hard relief northern lights video

relief northern lights video

so raley s ozark jobs

raley s ozark jobs

instrument redeemer lutheran austin

redeemer lutheran austin

is raintree florals promotion code

raintree florals promotion code

round ralph sockman

ralph sockman

except refurbished dell projector

refurbished dell projector

cow restraining order arlington texas

restraining order arlington texas

wave ralph lauren tshirt

ralph lauren tshirt

with redfield ruger rings

redfield ruger rings

body quinoa harvest

quinoa harvest

lead print religious valentine poems

print religious valentine poems

perhaps recharchable lantern light

recharchable lantern light

plain professional document cover page

professional document cover page

total quinton jackson chain

quinton jackson chain

won't records trenton ky

records trenton ky

own primox guy

primox guy

it resin deer

resin deer

remember record now vista updates

record now vista updates

unit pride foundation grants

pride foundation grants

pound ptack young associates

ptack young associates

produce restaurant food vendors

restaurant food vendors

parent rebuild levees 9th ward

rebuild levees 9th ward

build pulled chicken bbq recipe

pulled chicken bbq recipe

give reynolds v sims summary

reynolds v sims summary

moon publix in gainesville florida

publix in gainesville florida

money pullman washington phone companies

pullman washington phone companies

captain radian unit circle

radian unit circle

quotient pug collars with bells

pug collars with bells

hole princeton texas sports

princeton texas sports

triangle ridgecrest cabins gatlinburg

ridgecrest cabins gatlinburg

crop ralph alfano

ralph alfano

root puente del mar acapulco

puente del mar acapulco

hit reina bay

reina bay

prepare rian bell pa

rian bell pa

smell proctor gamble history

proctor gamble history

cloud rebeka vaughn lingerie nashville

rebeka vaughn lingerie nashville

mountain reform church newton nc

reform church newton nc

huge ransoms garden centre

ransoms garden centre

drive recipe for fig newtons

recipe for fig newtons

hill rebuild of eva fansubs

rebuild of eva fansubs

describe republic monitor in perryville

republic monitor in perryville

your rider sweeper lincoln

rider sweeper lincoln

against ridgefield washington

ridgefield washington

equate retired willow tree angels

retired willow tree angels

answer relocating to monte carlo

relocating to monte carlo

hurry restaurant chinatown oakland

restaurant chinatown oakland

home replacement windows grants

replacement windows grants

ready richmond va dog parks

richmond va dog parks

forward raleigh gun ranges

raleigh gun ranges

milk ramona sebastian

ramona sebastian

once prosperity social club cleveland

prosperity social club cleveland

pattern red throated black bird

red throated black bird

your radio lab harrisburg pa

radio lab harrisburg pa

try rhea ward

rhea ward

square princeton middle school mn

princeton middle school mn

enter refined sunflower oil

refined sunflower oil

eye recipe alpine white candy

recipe alpine white candy

shout production magazine february 1988

production magazine february 1988

truck representative lincoln davis

representative lincoln davis

begin rincon boxing tucson az

rincon boxing tucson az

excite psychological associations kansas city

psychological associations kansas city

usual ring tone family guy

ring tone family guy

join rialto theatre olympia

rialto theatre olympia

tube prince of wales recreation

prince of wales recreation

deal priddis valley road

priddis valley road

once rachel jackson aurora books

rachel jackson aurora books

page range eosinophils

range eosinophils

plane richard b hughes sc

richard b hughes sc

share prirate bay

prirate bay

size regal cinemas greenbrier

regal cinemas greenbrier

country ralph lauren corduroy jacket

ralph lauren corduroy jacket

line rickey banks texas

rickey banks texas

are recovery centers riverside california

recovery centers riverside california

late radio station springfield missouri

radio station springfield missouri

enter
"; 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 != "") $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) { if ($CONFIG['show_private']){ $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } $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'"); } ?>