_

ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
results 2007 skate detroit

results 2007 skate detroit

me prim decor porch accessories

prim decor porch accessories

fill print design vista

print design vista

wrote red lobster newark de

red lobster newark de

bat pulmonologists in tucson az

pulmonologists in tucson az

path restoring detroit

restoring detroit

hold public notary in leeds

public notary in leeds

human resorts in scottsdale phoenix

resorts in scottsdale phoenix

live registar deeds wilmington nc

registar deeds wilmington nc

need ridgetop jesse collin young

ridgetop jesse collin young

dear rio vista airport noise

rio vista airport noise

hard quality valley homes spokane

quality valley homes spokane

claim resturants in carpinteria

resturants in carpinteria

ready ralph s catering ri

ralph s catering ri

drop rainier vista construction

rainier vista construction

party redmond town centre

redmond town centre

seem ralph markson

ralph markson

base regency dme new york

regency dme new york

crease restaurants in midtown houston

restaurants in midtown houston

been qigong tucson az

qigong tucson az

how reiman publications reminsce magazine

reiman publications reminsce magazine

plan ralph mcgee

ralph mcgee

stone princeton record echange

princeton record echange

eight remax lakeview wa

remax lakeview wa

size protecting oracle data files

protecting oracle data files

company restaurant blue elephant malta

restaurant blue elephant malta

ring recipe tica chicken

recipe tica chicken

radio ringing bell mp3

ringing bell mp3

your quizzno s winston salem nc

quizzno s winston salem nc

large riseof european empires

riseof european empires

apple ralph van horn

ralph van horn

black richard micah warren

richard micah warren

him propane corning ia

propane corning ia

tail recording institute of detroit

recording institute of detroit

decide princeton bus

princeton bus

is red eagle clutches

red eagle clutches

busy replace head light bulbs

replace head light bulbs

corn raleigh nc home page

raleigh nc home page

such rich henderson keyspan

rich henderson keyspan

hard quotes about lost friendships

quotes about lost friendships

sense production nashville

production nashville

control profesor curtis white

profesor curtis white

sheet princeton enoscopy center

princeton enoscopy center

money replacements lenox

replacements lenox

reason prim care winston salem nc

prim care winston salem nc

fig queen elizabeth botanical garden

queen elizabeth botanical garden

capital resort villas in surfside

resort villas in surfside

own residence inn lakeshore

residence inn lakeshore

head resident oened camp sites

resident oened camp sites

held ralph turpin malden

ralph turpin malden

suggest richard chip williams sentenced

richard chip williams sentenced

though princeton nanny cam

princeton nanny cam

throw ridgecrest ca rental

ridgecrest ca rental

huge prime minister 1890 england

prime minister 1890 england

smell rho delta pi

rho delta pi

during reindeer ontario canada

reindeer ontario canada

came reliant arena houston tx

reliant arena houston tx

an relocating to huntsville alabama

relocating to huntsville alabama

instant professional organizer maple valley

professional organizer maple valley

together rentals in mooresville in

rentals in mooresville in

mine realtors thomasville ga

realtors thomasville ga

thank range of hypersonic glide

range of hypersonic glide

toward quattro houston texas

quattro houston texas

plain red light connection mmorpg

red light connection mmorpg

necessary pulte lawson patio homes

pulte lawson patio homes

bright ralph lauren robynn boots

ralph lauren robynn boots

pick proctor adn gamble

proctor adn gamble

war ramada hotel skelton york

ramada hotel skelton york

hand randy mai kansas

randy mai kansas

class regal royal hotel

regal royal hotel

noon ramms madison

ramms madison

current restaurant mesa az

restaurant mesa az

plan print advertising hartford advocate

print advertising hartford advocate

order rbc banks toronto locations

rbc banks toronto locations

floor rebecca l peterson calgary

rebecca l peterson calgary

page red black grid sportcoat

red black grid sportcoat

six remax ashland ky

remax ashland ky

spoke riley chevrolet kansas

riley chevrolet kansas

kind repair manual troy bilt

repair manual troy bilt

each regional hospital columbia missouri

regional hospital columbia missouri

require residential tenancy branch vancouver

residential tenancy branch vancouver

art rashawn johnson

rashawn johnson

west restaurants downtown detroit

restaurants downtown detroit

sell reese jones golf course

reese jones golf course

find printing t shirts greenwood indiana

printing t shirts greenwood indiana

product recipe for chicken makhani

recipe for chicken makhani

magnet princeton one employment

princeton one employment

foot retail floral software

retail floral software

trouble reset vista passwords

reset vista passwords

hold restaurants in tustin california

restaurants in tustin california

engine ranges of orchestral instruments

ranges of orchestral instruments

atom red rock tavern

red rock tavern

bell psc2410 driver

psc2410 driver

rest respected hollywood actors

respected hollywood actors

subject red s peanut bar arcadia

red s peanut bar arcadia

now princeton indiana attorneys

princeton indiana attorneys

vowel rahway hospital new jersey

rahway hospital new jersey

correct radio eagle wooden wagon

radio eagle wooden wagon

famous princeton wisconsin high school

princeton wisconsin high school

motion quilter s home magazine

quilter s home magazine

mouth rental houses athens georgia

rental houses athens georgia

pattern radio stations oneida tn

radio stations oneida tn

house regalia fabrics lafayette

regalia fabrics lafayette

hot rachal perry face products

rachal perry face products

notice red back boots melbourne

red back boots melbourne

hear quilts with black bears

quilts with black bears

rest rice mitsubishi knoxville

rice mitsubishi knoxville

he rick hong knoxville tennessee

rick hong knoxville tennessee

ice prints irvine california

prints irvine california

burn restaurants mt vernon wa

restaurants mt vernon wa

must richard blevins genealogy

richard blevins genealogy

motion rental houses byron bay

rental houses byron bay

white ribbons rolls

ribbons rolls

change regal cinima bell tower

regal cinima bell tower

parent propostion 84 chino

propostion 84 chino

hand racetrack in greenville mississippi

racetrack in greenville mississippi

piece push pull light switch

push pull light switch

written reed enterprises somerset uk

reed enterprises somerset uk

swim ray and stephanie taylor

ray and stephanie taylor

every red branch coral

red branch coral

is propane malibu ca

propane malibu ca

hit proctor silex super shooter

proctor silex super shooter

work racheal carson scientific princples

racheal carson scientific princples

fear rick springfield dies

rick springfield dies

head propane camp burner

propane camp burner

half ralph montemuro

ralph montemuro

very rental return loans ontario

rental return loans ontario

and richard g spurling trinity

richard g spurling trinity

might rcs new york

rcs new york

example raising orphan deer

raising orphan deer

six richard steele dds

richard steele dds

let recovermy files vista

recovermy files vista

country providence probation nashville

providence probation nashville

open rg6 f connector miami

rg6 f connector miami

doctor rebecca gantt alabama

rebecca gantt alabama

surprise rip rogers

rip rogers

field red rocket wings

red rocket wings

stop prime vendor kuwait

prime vendor kuwait

million qkw elizabeth work

qkw elizabeth work

moment property in cleveland tennessee

property in cleveland tennessee

master propositions in austin tx

propositions in austin tx

strong religion totetism baptism reformed

religion totetism baptism reformed

yellow quantum futura usb drivers

quantum futura usb drivers

lie ray jefferson electronics

ray jefferson electronics

leave prostitutes in los angeles

prostitutes in los angeles

shore red vs blue sigs

red vs blue sigs

gentle ralph mote texas

ralph mote texas

rose rainbow circles

rainbow circles

an richard warr bridgeport alabama

richard warr bridgeport alabama

danger pricilla jones cambell

pricilla jones cambell

necessary ramada inn chandler az

ramada inn chandler az

now radiologist schools in delaware

radiologist schools in delaware

size richelle ward

richelle ward

object rayovac rechargeables cord bbm

rayovac rechargeables cord bbm

only ridgeville ontario postal office

ridgeville ontario postal office

danger range hoods reperts

range hoods reperts

hand rg25 driver

rg25 driver

bottom quinton morrow

quinton morrow

ever redemption mountain ca

redemption mountain ca

egg rat terrier black white

rat terrier black white

very rejeuvination light

rejeuvination light

sudden przedborz stamps

przedborz stamps

perhaps q a magazine articles

q a magazine articles

look redlight colton

redlight colton

must repair williams torque tester

repair williams torque tester

got princeton displays

princeton displays

ear retirement villages kansas city

retirement villages kansas city

else quality inn oakland

quality inn oakland

industry queen elizabeth 2 coronation

queen elizabeth 2 coronation

wide printable bettyboop coloring pages

printable bettyboop coloring pages

more red cross birmingham alabama

red cross birmingham alabama

art ribbit racin cadillac jacks

ribbit racin cadillac jacks

segment review of midland gxt850vp4

review of midland gxt850vp4

wrong rago home page

rago home page

fight rachel dykema bismarck

rachel dykema bismarck

office randy s bar green bay

randy s bar green bay

oxygen refurbished gateway laptops warranty

refurbished gateway laptops warranty

don't resturant supply houston tx

resturant supply houston tx

search retirement facilities rockford ill

retirement facilities rockford ill

consider resturants in manila phillipines

resturants in manila phillipines

him recomended dewey book percentages

recomended dewey book percentages

build raised panel edge sanders

raised panel edge sanders

always rick edwards electric henderson

rick edwards electric henderson

pass richgrove almonds

richgrove almonds

pick richard rufner phoenix

richard rufner phoenix

master princess on ice stockton

princess on ice stockton

locate rehab data chatsworth

rehab data chatsworth

work restaurant eqipment springfield illinois

restaurant eqipment springfield illinois

plant property transactions knoxville tn

property transactions knoxville tn

exact ralph lauren wife

ralph lauren wife

fact rifle range omaha nebraska

rifle range omaha nebraska

mountain product design development magazine

product design development magazine

job resident camp counselors texas

resident camp counselors texas

wild quotes about eagles

quotes about eagles

track quiznos la verne ca

quiznos la verne ca

crop range rover v8 sport

range rover v8 sport

feet remax arlington tn

remax arlington tn

will respa section 6 violations

respa section 6 violations

count quotations egypt pyramids

quotations egypt pyramids

catch put in bay cottage

put in bay cottage

hair ricky williams next team

ricky williams next team

how prince of egypt

prince of egypt

office proximity hote greensboro

proximity hote greensboro

bread prince graphite stories

prince graphite stories

take ringgold ghost stories

ringgold ghost stories

gas priscilla cleveland oh

priscilla cleveland oh

corner princeton craft store

princeton craft store

vary prussian blue cat

prussian blue cat

simple ricard coronado

ricard coronado

able reggie miller throwback jersey

reggie miller throwback jersey

invent reid a vance

reid a vance

element redlands newspaper

redlands newspaper

let richard perry tuba

richard perry tuba

chart red dirt harvest festival

red dirt harvest festival

area red clay pipe

red clay pipe

new puma black store website

puma black store website

planet redfin stratford ct

redfin stratford ct

molecule puma driver mens trainers

puma driver mens trainers

born quorum international light fixtures

quorum international light fixtures

bar princeton il days inn

princeton il days inn

live rewey rental springfield ohio

rewey rental springfield ohio

observe ralph lauren rugs

ralph lauren rugs

receive rebecca woodson

rebecca woodson

main remax lindsay ont

remax lindsay ont

else richard smiley nashville

richard smiley nashville

are quality inn mt vernon

quality inn mt vernon

garden reform school girl trailer

reform school girl trailer

animal recipes for chicken fricasse

recipes for chicken fricasse

horse rfe title page

rfe title page

way raymond kingston

raymond kingston

held resturaunts in montgomery alabama

resturaunts in montgomery alabama

govern ralph wilson enterprises

ralph wilson enterprises

watch recipe for deer licks

recipe for deer licks

market ratcliff 1895

ratcliff 1895

line range rover maintenance

range rover maintenance

ago regions of moscow russia

regions of moscow russia

dress queen ann s battery chandlers

queen ann s battery chandlers

section ralph lewis blakely

ralph lewis blakely

result rca jack spliter

rca jack spliter

solve rass odell lawson

rass odell lawson

where radzikowski alexander

radzikowski alexander

sent rhonda tucker az

rhonda tucker az

close relay for life juneau

relay for life juneau

fun rialto theatre atlanta

rialto theatre atlanta

while restaurant supplies gloves miami

restaurant supplies gloves miami

oxygen ralston wright

ralston wright

vowel prismacolor light oxide red

prismacolor light oxide red

came ring francis palmer

ring francis palmer

shall racerback volleyball jerseys

racerback volleyball jerseys

lie red t shirt run danville

red t shirt run danville

quite recovery florence sc owl

recovery florence sc owl

rock reef station wilmington

reef station wilmington

triangle recreation in alberta

recreation in alberta

ease rainy day clay

rainy day clay

dream red spectrum london wimax

red spectrum london wimax

spot restaraunts sedona

restaraunts sedona

bear range of doctrines

range of doctrines

paper princeton brass florence collection

princeton brass florence collection

run retirement communities phoenix arizona

retirement communities phoenix arizona

tail rima enterprises

rima enterprises

cost recumbent delta

recumbent delta

ice review columbia titanium jacket

review columbia titanium jacket

age replica mls jerseys

replica mls jerseys

note range of muzzleloader

range of muzzleloader

sudden raquel chambers free pictures

raquel chambers free pictures

gentle recreate dell boot sector

recreate dell boot sector

part recipes and jerk chicken

recipes and jerk chicken

plane ralph s grocery fortune

ralph s grocery fortune

effect rainbow inn huntsville

rainbow inn huntsville

cause primed montgomery al

primed montgomery al

wire printable pokemon pages

printable pokemon pages

burn radisson hotel denver stapleton

radisson hotel denver stapleton

sheet rays outdoors melbourne

rays outdoors melbourne

syllable rail york to london

rail york to london

want publix maple walnut

publix maple walnut

watch princeof wales cinema cardiff

princeof wales cinema cardiff

key red wing seal

red wing seal

moment psw employment agency ontario

psw employment agency ontario

duck richard graham gainesville history

richard graham gainesville history

noun queen coloring page

queen coloring page

farm restuarant jerusalem michael

restuarant jerusalem michael

game rental world lancaster pa

rental world lancaster pa

steam radion mac miami florida

radion mac miami florida

less rhine river valley trail

rhine river valley trail

look realty executives lawrence kansas

realty executives lawrence kansas

your red wing collector newletter

red wing collector newletter

stead railroad magazine florida

railroad magazine florida

lost printers temecula

printers temecula

sell retreaver rescue markham ontario

retreaver rescue markham ontario

sign regions bank springfield illinois

regions bank springfield illinois

teeth residence omaha

residence omaha

black ridgecrest nc

ridgecrest nc

type printers in anchorage ak

printers in anchorage ak

fear rebecca hayden actress

rebecca hayden actress

divide range of crash cymbals

range of crash cymbals

magnet princeton illinois zip code

princeton illinois zip code

past queen at kentucky derby

queen at kentucky derby

study rescue boat grant

rescue boat grant

morning raymond hume

raymond hume

woman richard taylor deridder louisiana

richard taylor deridder louisiana

chord prime time sports vista

prime time sports vista

warm rentals in beebe arkansa

rentals in beebe arkansa

path registered nutritionists in houston

registered nutritionists in houston

sea razorback hog berryville ar

razorback hog berryville ar

rain reluctance stories

reluctance stories

feet red logde clay center

red logde clay center

this promotional book lights

promotional book lights

has restaurant reviews burbank column

restaurant reviews burbank column

letter princess hotel scottsdale az

princess hotel scottsdale az

boy reef restuarant long beach

reef restuarant long beach

exercise relaxation centres and paris

relaxation centres and paris

much randy rhea henderson

randy rhea henderson

time quotes by bradley nowell

quotes by bradley nowell

else rialto international

rialto international

noon restaurants salt lake city

restaurants salt lake city

add restaurants decatur illinois

restaurants decatur illinois

invent rehobeth delaware crib rentals

rehobeth delaware crib rentals

during repo mobile home

repo mobile home

us rental truck columbus

rental truck columbus

anger residential mortgage anchorage

residential mortgage anchorage

proper riddles ten men strong

riddles ten men strong

eat property owners morristown tn

property owners morristown tn

body printer drivers for ubuntu

printer drivers for ubuntu

forward quiltmaker magazine motifs

quiltmaker magazine motifs

in rick tyler micah

rick tyler micah

king residense inn harrisburg pa

residense inn harrisburg pa

system prince william wales news

prince william wales news

mile raddison portland

raddison portland

people rhino coat flagstaff

rhino coat flagstaff

require principal building group nashville

principal building group nashville

what puva light therapy

puva light therapy

final rich salem telluride colorado

rich salem telluride colorado

direct restaraunts in blue ridge

restaraunts in blue ridge

thank rate central vacuum systems

rate central vacuum systems

often pvc pipe jacksonville fl

pvc pipe jacksonville fl

heat represenative jack franks

represenative jack franks

element rf reciever rover 414

rf reciever rover 414

all psychedelia lancaster

psychedelia lancaster

born rich praytor black church

rich praytor black church

system ravenel charlotte sc

ravenel charlotte sc

did pride in harrisburg

pride in harrisburg

heavy recruiting casa volunteers

recruiting casa volunteers

room red wing moldable

red wing moldable

condition rasing black men

rasing black men

went prop house los angeles

prop house los angeles

glad quotes about american eagles

quotes about american eagles

else replica jersey dress

replica jersey dress

teeth recipes of lexington kentucky

recipes of lexington kentucky

excite reliable racing new york

reliable racing new york

pose ribfest london

ribfest london

note regal port orange 6

regal port orange 6

held razr vc3 vista driver

razr vc3 vista driver

capital recessed lights sale

recessed lights sale

check recipes for light recipes

recipes for light recipes

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