ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
restrants in arlington tx restrants in arlington tx music restuarants decatur ga restuarants decatur ga crowd regions bank tyler texas regions bank tyler texas serve ralph parker vancouver wa ralph parker vancouver wa foot regional school essex campus regional school essex campus green reed berry actor reed berry actor nor redmond north cameron sandquist redmond north cameron sandquist human retire in san diego retire in san diego oxygen rapid city renee jackson rapid city renee jackson person recipe berry ice cream recipe berry ice cream energy ricky fowler knife maker ricky fowler knife maker century rightfax postscript driver rightfax postscript driver don't red rock opium cocaine red rock opium cocaine enough proctor and gamble recall proctor and gamble recall observe restaurants near lincoln center restaurants near lincoln center talk resale shops in birmingham resale shops in birmingham mine recreation center stapleton denver recreation center stapleton denver again ray s canoeing grayling mich ray s canoeing grayling mich magnet ramada hollywood beach florida ramada hollywood beach florida stream princeton avalon princeton avalon straight red deer apartment rentals red deer apartment rentals season ralphs groceries ralphs groceries hunt range line inn mequon range line inn mequon see ralph bagwell ralph bagwell wear rentals of bellamy nc rentals of bellamy nc iron recipe for fish roe recipe for fish roe fill rick cole ventura california rick cole ventura california ago recycling turner field atlanta recycling turner field atlanta condition raleigh science camps raleigh science camps steam required lights in closets required lights in closets throw queen of england knighted queen of england knighted self reception in johnson city reception in johnson city enemy rehab institute of morristown rehab institute of morristown will queen elizabeth sinking queen elizabeth sinking horse reed wells benson reed wells benson feel rayann fowler rayann fowler star puerto rico s national parks puerto rico s national parks hot rio grand valley library rio grand valley library weather raoul ratcliff raoul ratcliff picture rhia arab rhia arab may resinite clear film resinite clear film this qosmio e10 driver qosmio e10 driver strong richard watson murder richard watson murder whole resale temecula resale temecula correct range rover sport prices range rover sport prices for residence inn wichita kansas residence inn wichita kansas poor raf hereford raf hereford skill red rock canyon grill red rock canyon grill chart rialto joliet il 60432 rialto joliet il 60432 much private catholic school charleston private catholic school charleston doctor retail electronic components charlotte retail electronic components charlotte suit redlands rev redlands rev seat ralph lauren jacket patterns ralph lauren jacket patterns well representative vandewege washington representative vandewege washington sugar range rover nj range rover nj paragraph quality appliacne san diego quality appliacne san diego grand rice university baker institute rice university baker institute wide racism tulare california racism tulare california high ram industries little rock ram industries little rock reason redman s deer hunting redman s deer hunting bank range of medieval trebuche range of medieval trebuche pattern ralphs club card ralphs club card apple rio salado restoration habitat rio salado restoration habitat cross restaurants bisbee restaurants bisbee total resurrection anglican church woodstock resurrection anglican church woodstock slave ricardo pina avondale az ricardo pina avondale az me reynold s museum alberta reynold s museum alberta bread queen elizabeth ii s coronation queen elizabeth ii s coronation problem redfield 75 receiver sight redfield 75 receiver sight coast richview washington richview washington does red rock canyon navada red rock canyon navada this ridgecrest apartments denton ridgecrest apartments denton house reform temple ny reform temple ny mother restaurants in kilmarnock scotland restaurants in kilmarnock scotland final psb platinum t8 tower psb platinum t8 tower tiny refurbished computer sale dell refurbished computer sale dell student radio blue grass music radio blue grass music road prince of wales resort prince of wales resort back radisson kansas city airport radisson kansas city airport house prince john england prince john england sign radio promotions in london radio promotions in london vary red rocks birkdale menu red rocks birkdale menu go prostitution in mesa prostitution in mesa excite red light district newhall red light district newhall animal rc challenge portland rc challenge portland next prospector s restaurant rolls prospector s restaurant rolls skill ramona tang ramona tang learn printable tall tales stories printable tall tales stories call rex parker april crosswords rex parker april crosswords what pt boat kennedy pt boat kennedy plane red moose ogden utah red moose ogden utah have ringtones from sean kingston ringtones from sean kingston hit ralph architect miami ralph architect miami weather radisson inn camp hill radisson inn camp hill an railway ties miami railway ties miami level raisor pontiac lafayette indiana raisor pontiac lafayette indiana war recessed navigational lights recessed navigational lights industry property in greenbrier tennessee property in greenbrier tennessee vary printing companies miami florida printing companies miami florida size property taxes portland maine property taxes portland maine gas rifle range toronto area rifle range toronto area experience privacy fence trellis willow privacy fence trellis willow round product development food magazine product development food magazine metal prim animator for lsl prim animator for lsl fun princeton junction waterfront homes princeton junction waterfront homes collect reflecting light making rainbows reflecting light making rainbows sell ref agent fisher global ref agent fisher global character quality inn elizabeth city quality inn elizabeth city work red fox steakhouse red fox steakhouse by relatos gay stories relatos gay stories art purple mango houston purple mango houston force rebuilt television tucson rebuilt television tucson stood ralph m pearson prints ralph m pearson prints inch range hood duct kit range hood duct kit no replacement patio light bulbs replacement patio light bulbs by richard gould 1958 richard gould 1958 hat pubs in jesmond england pubs in jesmond england home retirement living lincoln nebraska retirement living lincoln nebraska sky raymond benson raymond benson fill restaurant reviews phoenix restaurant reviews phoenix gentle proctologists bridgeport ct proctologists bridgeport ct call rescued dogs san diego rescued dogs san diego flow primax 19200 scanner driver primax 19200 scanner driver also richmond bc yellow pages richmond bc yellow pages build reburbished appliances carrollton texas reburbished appliances carrollton texas wide quallcomm tracking a driver quallcomm tracking a driver usual prince 03 black prince 03 black rain psychics in south jersey psychics in south jersey quiet rejection hotline number anchorage rejection hotline number anchorage second remax gladstone valley house remax gladstone valley house evening red zone athens red zone athens follow rectors scale rectors scale invent repair plumbing leaks london repair plumbing leaks london question reds barbque simi valley reds barbque simi valley under restaurant equipment nashville tn restaurant equipment nashville tn same rhett kenneth gordon rhett kenneth gordon young remax reality superior wisconsin remax reality superior wisconsin wild red lodge park alberta red lodge park alberta inch psychologist james wright psychologist james wright differ rannoch corp houston rannoch corp houston children realworld mtv sidney realworld mtv sidney lift ramona k royce ramona k royce egg ramada down town hollywood ramada down town hollywood slow property grant deed property grant deed north raisor lexington ky raisor lexington ky lead radio in knoxville tennessee radio in knoxville tennessee dear rachael bishop bebo rachael bishop bebo compare reproductive assays tacoma washington reproductive assays tacoma washington populate ralph lauren telluride ralph lauren telluride grew rental houses palmdale ca rental houses palmdale ca agree property search greenville sc property search greenville sc moon raisin orange recipe raisin orange recipe tire restaurant winchester restaurant winchester crop restaurant 75007 paris restaurant 75007 paris fat rally gmc palmdale ca rally gmc palmdale ca floor resorts tempe resorts tempe light princeton meadows nh princeton meadows nh pass relocating to austin tx relocating to austin tx current redwing cherokee redwing cherokee soil rainbow bridge sedona arizona rainbow bridge sedona arizona fraction raymond larry mayer raymond larry mayer arrange recipie chicken and dumplings recipie chicken and dumplings and railroad ties santa maria railroad ties santa maria captain rachel foley mo rachel foley mo wear realtors in empire colorado realtors in empire colorado sugar red cedar trees kansas red cedar trees kansas women princeton in assessor princeton in assessor chart rem irvine rem irvine felt restaurant supplies delaware restaurant supplies delaware equal princeton nj florist princeton nj florist lie providence mobile home providence mobile home element print drivers xp print drivers xp indicate redlands university fruit trees redlands university fruit trees after redflex mobile speed vans redflex mobile speed vans plain recycle center charleston wv recycle center charleston wv center quintuplets fox fansite quintuplets fox fansite grand recognition primed decision making recognition primed decision making depend richard brinsley sheridan richard brinsley sheridan settle ralph beswick wa ralph beswick wa tell realtors athens texas realtors athens texas when richard harvey evangelist richard harvey evangelist planet red devil sauce red devil sauce all pslp le motherboard drivers pslp le motherboard drivers contain rialto body care rialto body care strong recipes sweet rolls recipes sweet rolls thing rebecca bell harpsichord rebecca bell harpsichord street rate case classes houston rate case classes houston valley restaurents lincoln ne restaurents lincoln ne study reba s restaurant newton reba s restaurant newton print regina lawson regina lawson side riparian rights new jersey riparian rights new jersey clock respiratory therapy magazine respiratory therapy magazine north reiki leesburg va reiki leesburg va simple quilt store winchester ky quilt store winchester ky walk price maynard price maynard swim rechargeable bicycle light rechargeable bicycle light certain recipe chicken biryani recipe chicken biryani famous quad cities eagle watch quad cities eagle watch piece red deer yamaha red deer yamaha fruit resorts near columbus oh resorts near columbus oh five red deer dentists red deer dentists radio ralph lauren glamorous ralph lauren glamorous mark res care inc louisville ky res care inc louisville ky condition replica chanel ballet flats replica chanel ballet flats rain rebecca ward ross rebecca ward ross much redskins light redskins light bought racial religious harmony racial religious harmony broad quilt shop hop kansas quilt shop hop kansas cause red deer ireland red deer ireland slave prospector hotel juneau prospector hotel juneau past radilogy jobs jacksonville il radilogy jobs jacksonville il effect rdml williams fired rdml williams fired center ralph lauren monza ralph lauren monza area ralph markson ralph markson behind ralph lauren pearl necklace ralph lauren pearl necklace feed regal movies lancaster regal movies lancaster metal raf valley homepage raf valley homepage death reviews on self tanner reviews on self tanner open red clay goebel red clay goebel master ralph wiggum song lyrics ralph wiggum song lyrics energy recipe chicken egg yolk recipe chicken egg yolk describe ramona ba uelos entrepreneur ramona ba uelos entrepreneur basic regal magnolia place 16 regal magnolia place 16 course remax columbus ohio davis remax columbus ohio davis search psychic jeff baker psychic jeff baker check rick turner bass guitars rick turner bass guitars always rika asian london 07 rika asian london 07 numeral ralph rowe uncg ralph rowe uncg nothing ramer tn apartments ramer tn apartments support resteraunt guide orange conty resteraunt guide orange conty animal replace rover v8 lifters replace rover v8 lifters an quality deer management bayman quality deer management bayman plant refractory portland refractory portland paragraph refurbished kirby vacuum refurbished kirby vacuum begin quartermaster histoy valley forge quartermaster histoy valley forge red rave theatre huntsville alabama rave theatre huntsville alabama add psychiatry austin texas psychiatry austin texas music regulas black regulas black want recipe for jerusalem artichoke recipe for jerusalem artichoke range raffle banks plastic raffle banks plastic arrange quins miami quins miami practice rescue mission of trenton rescue mission of trenton note radeon 9200 driver updates radeon 9200 driver updates poor ralston schools omaha ralston schools omaha necessary printer light flashing printer light flashing busy proctor gamble stores proctor gamble stores doctor procharger dealers kansas city procharger dealers kansas city left putt putt arlington tx putt putt arlington tx winter rep scott sales rep scott sales great pride in columbus ohio pride in columbus ohio woman ramona hotels ramona hotels fair repc section 10 2 repc section 10 2 multiply relocation services birmingham alabama relocation services birmingham alabama quart ravenscar tourist information centre ravenscar tourist information centre course propagating woody cuttings propagating woody cuttings difficult pygmy goat washington pygmy goat washington liquid property tax maricopa county property tax maricopa county hundred region iv workshops houston region iv workshops houston speak richard friedman md chandler richard friedman md chandler sure quality inn stockton california quality inn stockton california column ramona bell death ramona bell death cover providence landscape charlotte nc providence landscape charlotte nc smell property management butler kansas property management butler kansas forest properties for sale gainesville properties for sale gainesville produce redskins youth jersey sale redskins youth jersey sale control rio salado sportsmens club rio salado sportsmens club process rei carlton rei carlton speech ralph loren sheets ralph loren sheets minute prints in portland or prints in portland or shape raven bishop sites raven bishop sites clean richard morris trial richard morris trial band rental simi valley rental simi valley same realty helena montana realty helena montana written republic gazette phoenix az republic gazette phoenix az particular pugs london ontario pugs london ontario danger radiosurgery centre canada radiosurgery centre canada smile raven venice poetry raven venice poetry shore ralph profetta ralph profetta grew redemption ministries petersburg virginia redemption ministries petersburg virginia surprise quinton coples and kinston quinton coples and kinston jump recipe for sticky chicken recipe for sticky chicken discuss rep colin peterson rep colin peterson range ralph s restaurant manhattan ralph s restaurant manhattan thick ramey santa barbara ramey santa barbara shout rage page war queeb rage page war queeb very retirement communities new england retirement communities new england whether rachel agnes scott kent rachel agnes scott kent fly prison conditions victorian england prison conditions victorian england molecule rescue queen creek rescue queen creek duck realtors st armonds circle realtors st armonds circle bad ridge basketball camp ridge basketball camp present residential door bell residential door bell she recovery resources cleveland recovery resources cleveland speak pvt needles pvt needles numeral red deer alberta library red deer alberta library few richie black richie black strange rawson wika gage houston rawson wika gage houston fat ray moulton ray moulton oh restaurants bethel me restaurants bethel me modern richard craig torres richard craig torres note pussy licker stories pussy licker stories fast puddn head wilson book notes puddn head wilson book notes about regan rudy abortion regan rudy abortion time quotes for long friendship quotes for long friendship bed rick springfield and family rick springfield and family spell prince williams prince williams walk princeton law study program princeton law study program enemy ringside caldwell nj ringside caldwell nj map raye fagen kansas raye fagen kansas train restrurants lancaster pa restrurants lancaster pa less riky jackson upper darby riky jackson upper darby key print specialist london print specialist london trade religion paleo indians ohio religion paleo indians ohio or redfield optics thomasville ga redfield optics thomasville ga such princeton british columbia pictures princeton british columbia pictures glass rastafarian long beach rastafarian long beach capital report tower lights out report tower lights out appear providence main huntsville al providence main huntsville al lone restuarants decatur ga restuarants decatur ga insect red cross roseville branch red cross roseville branch gas repair jeep portland oregon repair jeep portland oregon island restaurants bakersfield ca restaurants bakersfield ca event relocate lenox condensor relocate lenox condensor enough remax gateway cameron station remax gateway cameron station score rentals in central florida rentals in central florida of reptile sodium light bulbs reptile sodium light bulbs substance ray foley interviews ray foley interviews bread ridesharing temecula ridesharing temecula allow public swim carlsbad public swim carlsbad carry retirement parks arizona retirement parks arizona safe recreational vehicles lehigh valley recreational vehicles lehigh valley wood regina to flagstaff regina to flagstaff excite restaurants outsource baked rolls restaurants outsource baked rolls son rentalhouses theodore alabama rentalhouses theodore alabama practice ratings for pages rs ratings for pages rs circle rachel sterling videos rachel sterling videos fresh red fox gocart red fox gocart finger raised relief globes raised relief globes six richard johnson photography richard johnson photography say prospective students gateway yale prospective students gateway yale had restaurants in palmetto bay restaurants in palmetto bay course rainbow warrior sinking rainbow warrior sinking type randy williams georgia tanks randy williams georgia tanks clean red fox lounge myspace red fox lounge myspace sound rick stevenson design rick stevenson design heart proctor gamble hall proctor gamble hall steel rentals in omak washington rentals in omak washington walk richard gould redmond richard gould redmond list princeton women s hockey princeton women s hockey pass princeton economic model princeton economic model continent restaurants in columbia missouri restaurants in columbia missouri hear ranges with pop up vents ranges with pop up vents count prosser washington relocation prosser washington relocation drink regency anderson sc regency anderson sc push rieger portland rieger portland atom republican summer camps republican summer camps feet rialto noce rialto noce enter rapidshare wyatt earp trailer rapidshare wyatt earp trailer consider retirement living columbus ohio retirement living columbus ohio board pulmonology jobs mesa pulmonology jobs mesa get printer driver survalience printer driver survalience race pulte and cleveland pulte and cleveland those quinton morrow quinton morrow town prosthodontists in temecula ca prosthodontists in temecula ca go rental rockford mn rental rockford mn show raymond johnson bellfountaine iowa raymond johnson bellfountaine iowa white rickey perry rickey perry divide purple valentine hearts purple valentine hearts decide repoll mobile al repoll mobile al young rainfall data arlington texas rainfall data arlington texas claim remax calgary dan hope remax calgary dan hope job restaurant guide clayton restaurant guide clayton sat price crossville character tile price crossville character tile seat recessed light can converters recessed light can converters solution richard williams fishing guide richard williams fishing guide poor redlands internet advertising redlands internet advertising sleep range rover wayne pa range rover wayne pa song rehoboth bay realty rehoboth bay realty method randy kathy marshall randy kathy marshall liquid ralph lauren courduroy coat ralph lauren courduroy coat tree ralph lauren romance colone ralph lauren romance colone original relinquishment lynn hampton relinquishment lynn hampton nothing richmoor three berry cobbler richmoor three berry cobbler grass prof jerome rossert prof jerome rossert sit restaruants burbank california restaruants burbank california value rice lights uk rice lights uk century product management mooresville nc product management mooresville nc temperature redwood lumber carrollton texas redwood lumber carrollton texas same raymond napa valley raymond napa valley yellow richard capshaw attorney dallas richard capshaw attorney dallas separate prevost marshall prevost marshall hurry raymond lee williams raymond lee williams morning procare austin texas procare austin texas hard ray berry fresh market ray berry fresh market child quality bumpers theodore alabama quality bumpers theodore alabama beauty promotion of reform movements promotion of reform movements you rbc bank seminole florida rbc bank seminole florida over residence inn new york residence inn new york reach princeton american heritage dictionary princeton american heritage dictionary eat ralph sonny barger born ralph sonny barger born wear richard morris hunt statue richard morris hunt statue soldier repulse bay club repulse bay club side regal cinemas parkside knoxville regal cinemas parkside knoxville ball richard bingham salem oregon richard bingham salem oregon moon richard earle 2009 camaro richard earle 2009 camaro said richard dunlap pa richard dunlap pa said quadzilla bicycle new york quadzilla bicycle new york special queen elizabeth stables queen elizabeth stables step rae jackson rae jackson sing renton washington boeing outsourcing renton washington boeing outsourcing company rick solomon tape rick solomon tape don't radiata stories cheats radiata stories cheats those prim candle home businesses prim candle home businesses low restaurant salem children restaurant salem children first
"; 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'"); } ?>