ERROR

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

restaurant avila beach

roll regis edward jackson

regis edward jackson

double rental outer banks rodanthe

rental outer banks rodanthe

doctor rentals in pomona

rentals in pomona

love rebellion themed short story

rebellion themed short story

street prince kent georgia football

prince kent georgia football

such ralph p damico

ralph p damico

off restaurants in livingston nj

restaurants in livingston nj

gold pvp green light

pvp green light

his printer operator cleveland tn

printer operator cleveland tn

care rich valley country club

rich valley country club

yellow rainbow mobile chime

rainbow mobile chime

main rachel ward singer

rachel ward singer

certain raissa wilson

raissa wilson

them ralph wilkerson melodyland

ralph wilkerson melodyland

particular raising chickens from eggs

raising chickens from eggs

exercise reg lewis kingston on

reg lewis kingston on

column priinceton dive light

priinceton dive light

come raintree haynes bridge

raintree haynes bridge

held quotations about woodstock

quotations about woodstock

success ralph s byram artist

ralph s byram artist

me range rod diameter

range rod diameter

map recycling plant san diego

recycling plant san diego

path ratan fountain valley

ratan fountain valley

planet princeton andy bryant

princeton andy bryant

room propane conversion portland or

propane conversion portland or

rain reviews on douglas tires

reviews on douglas tires

slip pvc bell reducers

pvc bell reducers

solution resource mfg kansas city

resource mfg kansas city

horse range rover temperature sender

range rover temperature sender

see resorvoir for grand cherokee

resorvoir for grand cherokee

ball ralph lauren loura

ralph lauren loura

soil risk factors huntington s disease

risk factors huntington s disease

experiment raf sweatheart wings

raf sweatheart wings

mind reptiles oceanside california

reptiles oceanside california

then richard l kent timber

richard l kent timber

would range rover blend motors

range rover blend motors

please recompression chambers phoenix az

recompression chambers phoenix az

her quad plow washington

quad plow washington

differ red yucca dwarf

red yucca dwarf

while raeding eagle theatre

raeding eagle theatre

dollar rc batteries bellingham washington

rc batteries bellingham washington

collect psychic warrior

psychic warrior

one rebekah lynne benson

rebekah lynne benson

way psyco ballistics delta 68

psyco ballistics delta 68

sun rinehart and carroll miami

rinehart and carroll miami

lost python range pep

python range pep

wave review vista solar films

review vista solar films

led rep sanford bishop

rep sanford bishop

result ripening orange peppers

ripening orange peppers

sure regal cinemas hollywood 12

regal cinemas hollywood 12

far ralph bethea scam

ralph bethea scam

say ralph lauren womens swimwear

ralph lauren womens swimwear

nothing ringtones comedy central

ringtones comedy central

symbol ralph lauren double black

ralph lauren double black

winter reform siddur text

reform siddur text

slip rillito park

rillito park

trip restaraunt charleston wv

restaraunt charleston wv

fill restaurants fairbanks ak

restaurants fairbanks ak

began pvc clear hose

pvc clear hose

at ralph allmon

ralph allmon

written raechel sims

raechel sims

write relatives sex erotic stories

relatives sex erotic stories

took ralph turner and huntington

ralph turner and huntington

famous rifle ranges near 15646

rifle ranges near 15646

captain red wing 4414

red wing 4414

sudden quality inn beltline addison

quality inn beltline addison

they rachel lynn adult model

rachel lynn adult model

does princeton university coeducation

princeton university coeducation

large princeton packet newspaper

princeton packet newspaper

glass raptist stories

raptist stories

wind property network miami

property network miami

danger ralph lauren adriana shoe

ralph lauren adriana shoe

fish qualifying charlotte

qualifying charlotte

power prime number and excel

prime number and excel

new propaganda salem witchtrials

propaganda salem witchtrials

shall reba neal mcintire

reba neal mcintire

molecule pta reflections washington state

pta reflections washington state

back richard hollis bakersfield

richard hollis bakersfield

only rashae taylor

rashae taylor

tone quinlan hunter ca

quinlan hunter ca

raise railway signal light towers

railway signal light towers

led risa siegel new jersey

risa siegel new jersey

turn rebecca fowler brentwood realtor

rebecca fowler brentwood realtor

quotient reseda dodge

reseda dodge

speed quartzsite campgrounds

quartzsite campgrounds

remember rafael house portland

rafael house portland

no redia mae williams

redia mae williams

protect redhat enterprise rpm packages

redhat enterprise rpm packages

over rat russell

rat russell

mix ragdoll rescue new york

ragdoll rescue new york

mind representative bill posey florida

representative bill posey florida

metal rental in venice italy

rental in venice italy

experiment rental rockaway new jersey

rental rockaway new jersey

equate rieti hermitage

rieti hermitage

subject proctor and gamble lima

proctor and gamble lima

laugh restoring greensburg kansas

restoring greensburg kansas

bottom protools mackie onyx firewire

protools mackie onyx firewire

world radar ind warren mi

radar ind warren mi

keep qualified designer building ontario

qualified designer building ontario

colony range rover dealer dallas

range rover dealer dallas

self range rover suv price

range rover suv price

gold raptor pod sensor range

raptor pod sensor range

evening reese s rogers

reese s rogers

seat record breaking salmon

record breaking salmon

name recyling centers in concord

recyling centers in concord

children relish magazine

relish magazine

son psychics in delaware

psychics in delaware

mile residents san miguel philippines

residents san miguel philippines

broke quote christopher columbus

quote christopher columbus

begin racquet club palm springs

racquet club palm springs

knew rimage new jersey

rimage new jersey

spread ramada inn columbus ms

ramada inn columbus ms

group rick perry stories

rick perry stories

spend rick chrysler ontario

rick chrysler ontario

she red deer rebels hockey

red deer rebels hockey

need reception urbana il

reception urbana il

please regal carlisle commons

regal carlisle commons

act red arrow alberta

red arrow alberta

wish provident bookstore lancaster pa

provident bookstore lancaster pa

many professional hair new jersey

professional hair new jersey

me rick warren massage theropist

rick warren massage theropist

represent regency monroe nj

regency monroe nj

art property in stockton

property in stockton

who product keys for vista

product keys for vista

flat printer driver installer

printer driver installer

winter recipe chicken carrots

recipe chicken carrots

throw restaurant voltaire paris

restaurant voltaire paris

happy restricted socket range sftp

restricted socket range sftp

top resorts in sonoita az

resorts in sonoita az

slave ralph s mission valley

ralph s mission valley

thousand reciever brake light

reciever brake light

bought rae lynn gandy

rae lynn gandy

gave redfish in apalachee bay

redfish in apalachee bay

create richmond va downtown lights

richmond va downtown lights

condition q13 news stories

q13 news stories

meat rhonda k berry

rhonda k berry

now pull cords

pull cords

led ralph lauren riding shirt

ralph lauren riding shirt

supply residents inn portland oregon

residents inn portland oregon

like red deer college daycare

red deer college daycare

fear psychiatry stories in 2006 2007

psychiatry stories in 2006 2007

produce refugees houston tx

refugees houston tx

law property in franklin tn

property in franklin tn

nor rector hayden kentucky

rector hayden kentucky

sentence provincial flower for alberta

provincial flower for alberta

most red convertible drivers

red convertible drivers

character rimmel london cosmetics

rimmel london cosmetics

among pyramid plastic rockford

pyramid plastic rockford

does remax phoenix brian nix

remax phoenix brian nix

neighbor rep jack kingston

rep jack kingston

left printer driver packard bell

printer driver packard bell

believe printable bichon frise valentines

printable bichon frise valentines

tree q switched ruby laser

q switched ruby laser

to rental properties portland me

rental properties portland me

near quatro casas spain

quatro casas spain

side richard lawson jr

richard lawson jr

this repo in london

repo in london

arm princess warrior

princess warrior

right rexburg soccer camp idaho

rexburg soccer camp idaho

after ralph lanning garden

ralph lanning garden

second rick hendrick chevy charleston

rick hendrick chevy charleston

print reindeer yard lighted christmas

reindeer yard lighted christmas

stop restaurante barato paris

restaurante barato paris

hard protection black bass

protection black bass

mouth red rockford michigan

red rockford michigan

front risk enterprise management brea

risk enterprise management brea

blood rca stores in phoenix

rca stores in phoenix

me reelfoot lake hamiltons resort

reelfoot lake hamiltons resort

a realty gainesville missouri

realty gainesville missouri

question review dell 3000cn

review dell 3000cn

few proton servicing centre singapore

proton servicing centre singapore

mind ramona lara

ramona lara

produce promotion job little rock

promotion job little rock

section printable paul bunyon stories

printable paul bunyon stories

opposite redwood valley lake retreet

redwood valley lake retreet

seven ralph lauren women s pajama

ralph lauren women s pajama

thick reenactment lexington and concord

reenactment lexington and concord

whose research centre literature india

research centre literature india

slip ranger rick s nature magazine

ranger rick s nature magazine

soil printable frog prince valentine

printable frog prince valentine

about price horse carriage melbourne

price horse carriage melbourne

grow proctor silex contact grill

proctor silex contact grill

soil quinton stairmaster

quinton stairmaster

chair restricted stories

restricted stories

number psychologist england borderline

psychologist england borderline

rub restaurants near lexington virginia

restaurants near lexington virginia

gather rhodesian ridgeback perris ca

rhodesian ridgeback perris ca

should religion in paris france

religion in paris france

metal prime cut steak nashville

prime cut steak nashville

with randy needham redby mn

randy needham redby mn

fall reformed dispensationalism

reformed dispensationalism

region richard friedman charleston sc

richard friedman charleston sc

miss rainsville nazereth baptist church

rainsville nazereth baptist church

glass reed barton christmas bells

reed barton christmas bells

past ralph l snider

ralph l snider

segment redding troy insurance

redding troy insurance

add rexall port hardy

rexall port hardy

either richard weiner md

richard weiner md

person results of cherokee election

results of cherokee election

rail reviews merchant of venice

reviews merchant of venice

problem red light district ensanada

red light district ensanada

they prostar phone jack

prostar phone jack

cook richard patrice moody

richard patrice moody

river pump jack vancouver

pump jack vancouver

paint racecar driver home depot

racecar driver home depot

remember prophecy with perry stone

prophecy with perry stone

half queen headboard black square

queen headboard black square

moon princess target range

princess target range

part renton washington papa murphys

renton washington papa murphys

then rialto beach olympic peninsula

rialto beach olympic peninsula

blue queen esther ashdown arkansas

queen esther ashdown arkansas

common recipes for chicken marinade

recipes for chicken marinade

prepare ralph bischof

ralph bischof

ice reeds bay beach park

reeds bay beach park

broke printable valentine games

printable valentine games

weather quilt stores tucson

quilt stores tucson

use rick kirby concert band

rick kirby concert band

tell princeton tales

princeton tales

beauty ridick pitch black

ridick pitch black

soon respect by aritha franklin

respect by aritha franklin

shout purse shops los angeles

purse shops los angeles

dog red wings playoff lines

red wings playoff lines

drop rafting jackson wyoming

rafting jackson wyoming

picture puerto nuevo newport or

puerto nuevo newport or

gentle recreational girls softball tucson

recreational girls softball tucson

world ralph the motorcycle mouse

ralph the motorcycle mouse

hour rhode island ghost stories

rhode island ghost stories

from ray smith cpa houston

ray smith cpa houston

join rick reed houston hotel

rick reed houston hotel

hear renting property aventura miami

renting property aventura miami

show propaganda magazines

propaganda magazines

car redheaded black

redheaded black

help regulate england investments

regulate england investments

exact propane light fixture

propane light fixture

mine primed peidmont tech college

primed peidmont tech college

roll ralph walo emerson

ralph walo emerson

have ralph wilson seat view

ralph wilson seat view

agree rentals in troy il

rentals in troy il

island resale shops houston texas

resale shops houston texas

element restaurants spring st melbourne

restaurants spring st melbourne

why republic services onyx

republic services onyx

guess ps2 family guy

ps2 family guy

discuss rachel arlington

rachel arlington

mark rhodium platinum

rhodium platinum

leave pueblo school pomona ca

pueblo school pomona ca

practice prices for thomasville cabinets

prices for thomasville cabinets

seat red top mountain acworth

red top mountain acworth

person provincial nomination program alberta

provincial nomination program alberta

this rc batteries phoenix

rc batteries phoenix

huge reynolds in norman ok

reynolds in norman ok

science rentals in florence sc

rentals in florence sc

there red devil vac

red devil vac

we reishi of light

reishi of light

big qb san diego chargers

qb san diego chargers

kept rebel xt vista driver

rebel xt vista driver

am represent cuba orishas lyrics

represent cuba orishas lyrics

post recycle television portland oregon

recycle television portland oregon

magnet qkw nate stevenson

qkw nate stevenson

sky publix bakery jacksonville fl

publix bakery jacksonville fl

letter raintree systems temecula

raintree systems temecula

friend puget sound fires auburn

puget sound fires auburn

plain recodo san diego

recodo san diego

carry rachel gordon neighbours

rachel gordon neighbours

act ralph lauren boys tuxedo

ralph lauren boys tuxedo

force reformed church boulder

reformed church boulder

oh rialto shoes

rialto shoes

brown rheta grimsley johnson

rheta grimsley johnson

chick restraunts in louisville kentucky

restraunts in louisville kentucky

danger reduced vltage solenoid driver

reduced vltage solenoid driver

rich raf eagles squadron

raf eagles squadron

indicate resturants salt lake city

resturants salt lake city

held racisim schools england

racisim schools england

flow pse g new jersey

pse g new jersey

force red wing train schedule

red wing train schedule

fight restaurant in prescott az

restaurant in prescott az

since recipe box blue

recipe box blue

plan retire young

retire young

clock remax and patti jackson

remax and patti jackson

eat regina wittmann md california

regina wittmann md california

mother restore vista recycle bin

restore vista recycle bin

those princeton lcd ac adapter

princeton lcd ac adapter

occur red wings stencil

red wings stencil

glad restaurants in tri cities washington

restaurants in tri cities washington

lot rh negative blood royal blood

rh negative blood royal blood

reason recent mike patton news

recent mike patton news

song prostate psa normal range

prostate psa normal range

after reformed baptist aurora illinois

reformed baptist aurora illinois

know prudhomme bay

prudhomme bay

were red deer coop

red deer coop

under rierdan hall bella vista

rierdan hall bella vista

shore rc williams sons pianos

rc williams sons pianos

dictionary rexhall industries lancaster ca

rexhall industries lancaster ca

miss ribfest columbus

ribfest columbus

interest realty usa saratoga

realty usa saratoga

baby rear fog light corolla

rear fog light corolla

sky rehobeth delaware summer place

rehobeth delaware summer place

back ralph tyler smith said

ralph tyler smith said

season recipe chicken asparagus soup

recipe chicken asparagus soup

could rimel london

rimel london

but referee oxford faq

referee oxford faq

band revived it cleveland home

revived it cleveland home

form rehabilitation and oak grove

rehabilitation and oak grove

type quality in anderson sc

quality in anderson sc

bat reginald sherrill

reginald sherrill

few rachel capote houston

rachel capote houston

interest racheal taylor

racheal taylor

neighbor reformed presbyterian theogical seminary

reformed presbyterian theogical seminary

climb raku clay

raku clay

drive psychologists phoenix az

psychologists phoenix az

ball puebla casa de cambio

puebla casa de cambio

four primer cord connectors

primer cord connectors

stead purple sage realty tucson

purple sage realty tucson

forest rei nashville tn

rei nashville tn

locate radio shack warren mi

radio shack warren mi

learn property appraiser marion county

property appraiser marion county

fish resume yellow page rep

resume yellow page rep

ball prisons in leavenworth kansas

prisons in leavenworth kansas

experience qlogic qla2460 drivers

qlogic qla2460 drivers

out recurting softball camps georgia

recurting softball camps georgia

hit queen elizabeth in richmond

queen elizabeth in richmond

continent remax in oxford

remax in oxford

station regear new york toyota

regear new york toyota

first rinaldo enterprise

rinaldo enterprise

divide raymond wayne moulton jr

raymond wayne moulton jr

set rainforest england

rainforest england

would richard lyman bushman columbia

richard lyman bushman columbia

we rfp essex

rfp essex

flower red roof inn england

red roof inn england

speech residence malsherbes hotel paris

residence malsherbes hotel paris

wonder rehoboth beach delaware hotels

rehoboth beach delaware hotels

inch puce creek central hobby

puce creek central hobby

most reichhold vinyl chloride

reichhold vinyl chloride

which rama thai royal family

rama thai royal family

go rainey austin

rainey austin

dog retrieve overwrite excel file

retrieve overwrite excel file

short range oven spare parts

range oven spare parts

eat red wing boot warrenty

red wing boot warrenty

hole restraints columbus ms

restraints columbus ms

right psych lawson

psych lawson

division ring central fax software

ring central fax software

quiet richards of tenby wales

richards of tenby wales

written rebbeca littlefield

rebbeca littlefield

equal redfish bay terminal

redfish bay terminal

sign ralph miller 1908

ralph miller 1908

better range murata photo

range murata photo

receive princeton review sweet briar

princeton review sweet briar

hour restaraunts in kingston nj

restaraunts in kingston nj

plant richard johnson tower

richard johnson tower

since red rose soccer lancaster

red rose soccer lancaster

test ray winn wright

ray winn wright

soon ramada geneva

ramada geneva

box remax realesatate washington state

remax realesatate washington state

track ring of fire norman

ring of fire norman

block quapaw indian

quapaw indian

top richard chip campbell

richard chip campbell

behind red root sage

red root sage

change rasheed tucker

rasheed tucker

behind reptile basking lights

reptile basking lights

fell residential real estate omaha

residential real estate omaha

print repair 1989 jeep cherokee

repair 1989 jeep cherokee

seven restaurants sodus new york

restaurants sodus new york

red proctor and gambling

proctor and gambling

exact psychics columbus ohio

psychics columbus ohio

these rail road west somerville

rail road west somerville

problem radeon 9200 driver download

radeon 9200 driver download

rich rei store greensboro

rei store greensboro

bone revival in phoenix 2008

revival in phoenix 2008

include rating graham greene

rating graham greene

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