ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
print house hollywood print house hollywood major rick toni houston rick toni houston sleep rediform drivers log books rediform drivers log books section rift sport centre salzburg rift sport centre salzburg doctor rift valley atlas rift valley atlas rail rippling water camp ground rippling water camp ground verb princess dance camp princess dance camp spoke qualitative research evaluation patton qualitative research evaluation patton direct public november avalon ctp public november avalon ctp beat ralph lauren 5001 eyeglasses ralph lauren 5001 eyeglasses bank rangeof the woodland turtle rangeof the woodland turtle difficult reese nichols gardner kansas reese nichols gardner kansas near property lease british columbia property lease british columbia does radio stations beaumont tx radio stations beaumont tx poor printable fish coloring page printable fish coloring page lost replacement light aquarium strip replacement light aquarium strip noun pride chevrolet lynn pride chevrolet lynn oh rapunzel short story rapunzel short story own prudential sterling properties prudential sterling properties most restaurants marshall texas restaurants marshall texas talk racoon lodge ralph kramden racoon lodge ralph kramden pattern radiation light bulb radiation light bulb segment queen elizabeth school calgary queen elizabeth school calgary said reception halls houston reception halls houston came rainee washington rainee washington miss regina leeds regina leeds guide rhonda fitzpatrick kentucky rhonda fitzpatrick kentucky match promotion items kent promotion items kent join rashida jones bio rashida jones bio wing rebuilt engins houston texas rebuilt engins houston texas bell public auctions louisville ky public auctions louisville ky ball residential roofing central florida residential roofing central florida always ramona california weather ramona california weather kill rich kelso cardiff rich kelso cardiff believe richard byrd blue blade richard byrd blue blade heard professional hair new jersey professional hair new jersey book rachel watson cheerleading rachel watson cheerleading picture richardson bay plant richardson bay plant lone raf hartford bridge raf hartford bridge problem range rover styling range rover styling through rick soloman paris hilton rick soloman paris hilton held proudfoot barton uk proudfoot barton uk round public electric lancaster pa public electric lancaster pa method residential lots sedona az residential lots sedona az loud redlands california phone book redlands california phone book pair quins miami quins miami their rice black beans corn rice black beans corn last rentals venice fl rentals venice fl cause pss roanoke pss roanoke heart pulkovo aviation enterprises pulkovo aviation enterprises each rentals in tupelo mississippi rentals in tupelo mississippi children recreaton parks in texas recreaton parks in texas stretch protect columbia protect columbia say rebecca westmorland nipomo rebecca westmorland nipomo born priestess oracle of delphi priestess oracle of delphi substance pump sherrill ny pump sherrill ny similar pristine living range hood pristine living range hood crease ralph lauren brittany ralph lauren brittany far resaurants grants pass oregon resaurants grants pass oregon gun ridge and valley cows ridge and valley cows too pslams cloverdale translation pslams cloverdale translation opposite red cypress logs red cypress logs stream radioshack oceanside radioshack oceanside start ps2 ports dell ps2 ports dell true . ricardo grant laura ricardo grant laura hot riley jones 111 riley jones 111 show reebok detroit lions apparel reebok detroit lions apparel else redondo beach classified redondo beach classified better resturants in richland washington resturants in richland washington burn ragtime arlington va ragtime arlington va tail reviews on mathews switchback reviews on mathews switchback result princeton auto center princeton auto center neck quilting portland maine quilting portland maine wild ricky dean norman nc ricky dean norman nc more range rover instrument cluster range rover instrument cluster main queen margaret university college queen margaret university college meant pueblo norte scottsdale arizona pueblo norte scottsdale arizona nation pumpkin and sage tortellini pumpkin and sage tortellini reply q beam lights q beam lights experience printpad san diego printpad san diego ear rental listing santa barbara rental listing santa barbara nine recharge batteries without cord recharge batteries without cord window randy roe as elvis randy roe as elvis to rekha enterprise corporation rekha enterprise corporation apple rep ruth fisher rep ruth fisher require riccio s steakhouse palm springs riccio s steakhouse palm springs door princeton webmedia princeton webmedia modern richard ward bicycle richard ward bicycle coat regency westpoint omaha regency westpoint omaha organ richard monaghan winchester richard monaghan winchester team pump jack pad pump jack pad gun reluctant fisherman cordova reluctant fisherman cordova interest reformed southern baptist reformed southern baptist silver richard cobden fairbanks ak richard cobden fairbanks ak own rental properties marion va rental properties marion va our prime outlets lake elsinore prime outlets lake elsinore term resturants in temecula ca resturants in temecula ca plain rejection hotline washington state rejection hotline washington state thus rep scott virginia rep scott virginia paper reset dell laptop battery reset dell laptop battery captain quinhagak school quinhagak school search richland elementary los angeles richland elementary los angeles now ratner and wilson ratner and wilson bad rhea hamilton rhea hamilton will puzzle stores in omaha puzzle stores in omaha main recent british columbia weddings recent british columbia weddings those restaurants omaha restaurants omaha chick resort promotions network austin resort promotions network austin result psych lawson psych lawson fill pwt dryen ontario pwt dryen ontario I rhonda haynes bellville tx rhonda haynes bellville tx voice reset tmobile wing reset tmobile wing tone red indian curry recipe red indian curry recipe door rachael ray colander orange rachael ray colander orange fish rector realty berea ky rector realty berea ky team range of cordless telephone range of cordless telephone town ralph lauren wife ralph lauren wife left quotes dyer quotes dyer tall rex parker crossword rex parker crossword much protocol magazines protocol magazines bar professional organizer portland professional organizer portland go psychic gillian graham psychic gillian graham parent richard myles johnson foundtion richard myles johnson foundtion after radio stations auburn al radio stations auburn al us reid furniture chester reid furniture chester trip richard grant st matthew richard grant st matthew water reloading recipes winchester hulls reloading recipes winchester hulls deep rental property derbyshire england rental property derbyshire england show reviews of dell c521 reviews of dell c521 tie princess chapel ashland ky princess chapel ashland ky egg redfish resturant miami redfish resturant miami success prince of egypt bittorrent prince of egypt bittorrent desert recycling ontario recycling ontario happy public transportation cleveland ohio public transportation cleveland ohio you raymond mccaffrey norman oklahoma raymond mccaffrey norman oklahoma melody rick hatfield texas rick hatfield texas both range rover collector florida range rover collector florida write rialto pass gallery rialto pass gallery bank priscilla winslow priscilla winslow gold regal cinemas employment washington regal cinemas employment washington multiply printable children stories printable children stories or racks on blacks racks on blacks once ridgecrest ca self storage ridgecrest ca self storage liquid replacing backup light switch replacing backup light switch vary ragdoll breeders oregon portland ragdoll breeders oregon portland property riichard melim campbell california riichard melim campbell california drop retreat ranch tyler tx retreat ranch tyler tx been residential gas lines alberta residential gas lines alberta look prosound light prosound light one richard winstead washington richard winstead washington check riding trinity spadina riding trinity spadina effect regency charlotte regency charlotte start rick foreman coast guard rick foreman coast guard began ricky shane blue ricky shane blue allow redwood high 1971 visalia redwood high 1971 visalia necessary regan campbell ward regan campbell ward favor regulation basketball w garfield regulation basketball w garfield catch rick warren barrack obama rick warren barrack obama flower red rover campground georgia red rover campground georgia perhaps reloading kent matrix shotshells reloading kent matrix shotshells country richard gould 1955 richard gould 1955 general rft platinum rft platinum color proview driver proview driver west radisson carlisle radisson carlisle operate rich curtiss rich curtiss condition propeller website company miami propeller website company miami seven restaurant rue washington paris restaurant rue washington paris clear riedewald humphrey riedewald humphrey vary radisson of peoria illinois radisson of peoria illinois history rats and camp pendleton rats and camp pendleton plane previous sheet in excel previous sheet in excel quiet radeon 9600 video driver radeon 9600 video driver grand ralph shaw ukelele ralph shaw ukelele tree recording engineer new jersey recording engineer new jersey fat red jasper bands red jasper bands children red roof motel columbus red roof motel columbus lie richard t parrish richard t parrish agree rainbow vacuum powerhead cord rainbow vacuum powerhead cord section psychosis stories psychosis stories hope raymond baker wife raymond baker wife send recruiters lincoln ne recruiters lincoln ne deep reliable mobile platforms reliable mobile platforms protect reformed latter day saints reformed latter day saints sing rimes shop in houston rimes shop in houston bread riley chevrolet jefferson city riley chevrolet jefferson city took retirement communities tucson retirement communities tucson song princeton vl1919 princeton vl1919 chance report national ontario q report national ontario q stream reo youngs reo youngs serve quadrafire home page quadrafire home page copy ralph s bob card ralph s bob card sight regal cinema anaheim hills regal cinema anaheim hills even reptile species lists irvine reptile species lists irvine famous refurbished dell mp3 players refurbished dell mp3 players summer prozac nation elizabeth wurtzel prozac nation elizabeth wurtzel settle primigi kid flat 28 primigi kid flat 28 tell printing paper company houston printing paper company houston whose rapid electric greenville sc rapid electric greenville sc buy printable daily driver logs printable daily driver logs tell print advertising rates magazine print advertising rates magazine may ralph lauren mens clothing ralph lauren mens clothing river religion of seminole tribes religion of seminole tribes say richard bishop prints richard bishop prints carry property assessment madison wisconsin property assessment madison wisconsin to prudential chambers uk prudential chambers uk soldier ray benson said ray benson said sleep resume head teller resume head teller joy rhonda n edwards ca rhonda n edwards ca son rader mcdonald campbell rader mcdonald campbell large quotes failure to success quotes failure to success moon raceway cleveland tn raceway cleveland tn speed range rover oregon range rover oregon kill reitmans stores waterloo ontario reitmans stores waterloo ontario danger revolve tour portland revolve tour portland laugh resturants in los angeles resturants in los angeles eat rich burnett anchorage rich burnett anchorage suffix ramada eastside new york ramada eastside new york dream pritchard overland park kansas pritchard overland park kansas heat primeway houston primeway houston form rich franklin silva fight rich franklin silva fight bat property greenville county property greenville county tube rcaf greenwood rcaf greenwood repeat rio summit 2007 opening rio summit 2007 opening bad reproduction roll top desk reproduction roll top desk up rims central rims central cent regional acceptance greenville nc regional acceptance greenville nc camp printer drivers canon ip1600 printer drivers canon ip1600 large range human botfly range human botfly night red wings wallpaper red wings wallpaper want richard strauss salome scenes richard strauss salome scenes bed regal hollywood cinema nashville regal hollywood cinema nashville deal relocating to palmer lake relocating to palmer lake just rainfall melbourne jan rainfall melbourne jan cover risin river blues risin river blues danger pyschic reading detroit pyschic reading detroit cost realtors pinedale wyoming realtors pinedale wyoming count rialto yellow pages rialto yellow pages listen prostitutes valencia prostitutes valencia wrote pueblo indian pottery tucson pueblo indian pottery tucson bring recipe lemon chicken capers recipe lemon chicken capers shout ralph segoria adoption ralph segoria adoption market redman ventura home redman ventura home lot restaurant eleven west madison restaurant eleven west madison particular rental income investment ontario rental income investment ontario sense redlich sterling hallmark redlich sterling hallmark proper rfm front page news rfm front page news stand property management peoria property management peoria store retreats phoenix retreats phoenix invent recipe for bar b qued chicken recipe for bar b qued chicken does replacement led strobe lights replacement led strobe lights wrong prudential real estate logan prudential real estate logan fear randy williams insurance randy williams insurance just remanufactured toner houston tx remanufactured toner houston tx may recipes pumpkin roll recipes pumpkin roll ran quaker in amersham bucks quaker in amersham bucks me psychiatrist phoenix arizona alchohal psychiatrist phoenix arizona alchohal page proctor services lancaster california proctor services lancaster california main radiata stories map radiata stories map contain raul mendoza bakersfield raul mendoza bakersfield gun reeds pharmacy tucson az reeds pharmacy tucson az come restoration hardware alexandria restoration hardware alexandria number ram enterprises montgomery alabama ram enterprises montgomery alabama thought recipes for corrish chicken recipes for corrish chicken metal rectangular clear decorative dish rectangular clear decorative dish boat recessed light wiring recessed light wiring her property management atascadero property management atascadero mass religious stores louisville religious stores louisville learn recyclers in ogden utah recyclers in ogden utah roll rebecca samford hughes rebecca samford hughes temperature redlynch valley redlynch valley tie reproduction pine corner cupboards reproduction pine corner cupboards face retractable cord headset retractable cord headset decimal pub house manila pub house manila experiment prudential amercana group henderson prudential amercana group henderson gentle restaurant delaware water gap restaurant delaware water gap week rachel b jackson whales rachel b jackson whales won't restaurant la regalade paris restaurant la regalade paris discuss regions bank palestine regions bank palestine fill ray black waco attorney ray black waco attorney won't ramada inn north charleston ramada inn north charleston teeth rhinoplasty subiaco rhinoplasty subiaco class reconciling cash register reconciling cash register serve redman mobile home layouts redman mobile home layouts grand rhonda wilson nova scotia rhonda wilson nova scotia real raymond brothers london ontario raymond brothers london ontario call pugs melbourne pugs melbourne garden pullman washington jobs pullman washington jobs heavy purple magazine rack purple magazine rack sudden recreational vehicles lehigh valley recreational vehicles lehigh valley now red deer exhaust red deer exhaust strong public utilities act alberta public utilities act alberta round retreat christian centres uk retreat christian centres uk path printer driver canon i960 printer driver canon i960 current rental rates tempe condos rental rates tempe condos during puggle rescue portland or puggle rescue portland or copy range of sopranino saxophone range of sopranino saxophone sail ringo and pine ringo and pine cent radiohead charlotte radiohead charlotte main red fox predators red fox predators broad rascel flats aol music rascel flats aol music blue realtors in the ozarks realtors in the ozarks guide reid lockhart golf reid lockhart golf small redondo beach domina redondo beach domina thought rebecca taylor blouse rebecca taylor blouse whose railroad refinancing bill huntington railroad refinancing bill huntington big primo pet care washington primo pet care washington their prim software prim software long rice wok in arlington rice wok in arlington fit range aristolochia kewensis range aristolochia kewensis current restaurant ranges canada restaurant ranges canada evening rio grande valley citrus rio grande valley citrus ship redhead blue bra redhead blue bra sure professional associates delaware professional associates delaware please princeton new jersey estates princeton new jersey estates spell rep don young alaska rep don young alaska beauty reggie graham vice president reggie graham vice president self redi strip tempe redi strip tempe this psc 1400 series driver psc 1400 series driver pay princeton west va princeton west va on provincial centre of excellence provincial centre of excellence gray quality cabinets san diego quality cabinets san diego went recipe blackened buffalo wings recipe blackened buffalo wings least receptions cecil county md receptions cecil county md thought ralph somers ct ralph somers ct character prison inmates augusta ga prison inmates augusta ga block privacy policy ontario privacy policy ontario that rhonda scott tennessee rhonda scott tennessee spell rikki damon dutton rikki damon dutton decide reviews of trafford publishing reviews of trafford publishing both radison hotel jacksonville florida radison hotel jacksonville florida sentence rick patterson miami rick patterson miami read princeton review sat prep princeton review sat prep arrange reclaimed pine flooring reclaimed pine flooring industry red devil traction red devil traction control rashawn alexander rashawn alexander smell resurection roll resurection roll solve reomove label format excel reomove label format excel verb ridgecrest baptist convention center ridgecrest baptist convention center event renting in london ontario renting in london ontario time rick springfield marries rick springfield marries direct proctor gamble locations proctor gamble locations go ralph peterson north carolina ralph peterson north carolina three red wing courthouse red wing courthouse enough property search alexandria virginia property search alexandria virginia radio respiratory care akron respiratory care akron measure ralph lauren stockholm ralph lauren stockholm river radio stations lindsay radio stations lindsay play reese contract security kansas reese contract security kansas middle rental regulations in ontario rental regulations in ontario class replacement headlights sylvania replacement headlights sylvania buy restaurants bisbee restaurants bisbee magnet quon wilson program coordinator quon wilson program coordinator box reggie wilson daytona florida reggie wilson daytona florida each repair circular needles repair circular needles discuss pulling the pud stories pulling the pud stories wheel restaurants in linden mi restaurants in linden mi winter rapper s delight parody rapper s delight parody port restaurants buena park california restaurants buena park california ground rick springfield barbara rick springfield barbara product regla cuba regla cuba material ray austin and boxing ray austin and boxing while rhonda williams jacksonville ar rhonda williams jacksonville ar should rachel johnson minneapolis rachel johnson minneapolis state rick west wendy russell rick west wendy russell raise ralph lynch greenwich ct ralph lynch greenwich ct state rental russellville arkansas rental russellville arkansas spread richard nixon and cuba richard nixon and cuba seed pruning ficus in phoenix pruning ficus in phoenix sister raff valencia california raff valencia california also pueblo mesa verde pueblo mesa verde want recipe for chicken newport recipe for chicken newport shape red deer escorts red deer escorts day psc dr robert chapman psc dr robert chapman populate ralph magazine screensavers ralph magazine screensavers sing ralph lauren hope chest ralph lauren hope chest condition prison reform 1800 s prison reform 1800 s capital rick manuel diaz rick manuel diaz may regal rooms london regal rooms london ever raytown page ranking raytown page ranking sharp radeon 25000 drivers radeon 25000 drivers mark ptb enterprises ptb enterprises between relpo valentine dog relpo valentine dog quick raindrop damascus how to raindrop damascus how to then range vent 42 range vent 42 old rafael campo md rafael campo md most quality inn barstow quality inn barstow men ridgid r82320 impact driver ridgid r82320 impact driver danger richest people in england richest people in england area pump jack pads pump jack pads rain resturant menus omaha nebraska resturant menus omaha nebraska let providence hospital and washington providence hospital and washington leg radeon 8500 series drivers radeon 8500 series drivers represent print museum melbourne print museum melbourne kind radiata stories commands radiata stories commands together richard m helms said richard m helms said leg ricks fences portland oregon ricks fences portland oregon apple pyriamids of egypt pyriamids of egypt led ramona olive pierce ramona olive pierce eat redfield ratio redfield ratio noon reservoir delft imperial reservoir delft imperial hunt rhine ii driver rhine ii driver meant rachel hunter maxim rachel hunter maxim station ralph lee davidson ralph lee davidson quotient rimrock mall billings montana rimrock mall billings montana length recipe chicken lasagne recipe chicken lasagne power princeton university newspaper princeton university newspaper out public adjuster new york public adjuster new york stream red wing blackbird red wing blackbird small rentals in melbourne rentals in melbourne eat q web designs louisville q web designs louisville key reviews anaheim islander inn reviews anaheim islander inn table ralphs schedule ralphs schedule team property appraiser camden county property appraiser camden county rest
"; 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'"); } ?>