ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
ratcliff violin ratcliff violin current ricky williams cfl ricky williams cfl before range rover wallpapers range rover wallpapers tube residents of viola tennessee residents of viola tennessee friend range downdraft vent range downdraft vent market property search vincent belanger property search vincent belanger close ricci williams byron mi ricci williams byron mi instrument rc flying club geneva rc flying club geneva stood pulaski brookside latte finish pulaski brookside latte finish subtract prot warrior prot warrior happy repetto paris repetto paris lady range of accommodation range of accommodation sand recipes sunflower seeds recipes sunflower seeds kind resmae mortgage corp brea resmae mortgage corp brea dark pubs hamilton on pubs hamilton on several property andalusia property andalusia band priscilla campbell priscilla campbell see raleigh settles roanoke raleigh settles roanoke paper queen creek fire department queen creek fire department card richard blumberg san diego richard blumberg san diego voice ram enterprises prescott arizona ram enterprises prescott arizona coast reproduction edison doll reproduction edison doll favor ralph bellamy william shatner ralph bellamy william shatner property remax central roselle remax central roselle key richard fitzgerald and nashville richard fitzgerald and nashville silent raves san diego raves san diego party proctor ranch paris texas proctor ranch paris texas certain push pull jack push pull jack region professional temp cleveland professional temp cleveland sudden prince of wales 1920 prince of wales 1920 weather rinker houston tx rinker houston tx liquid rhinoplasty patient recovery stories rhinoplasty patient recovery stories school princess margaret winners princess margaret winners eight resale children los angeles resale children los angeles throw ralph terrile ralph terrile try ralph mudd moberly ralph mudd moberly I residence inn west springfield residence inn west springfield world rave theaters is birmingham rave theaters is birmingham might quebec declaration of independence quebec declaration of independence shall raveis realty norwalk ct raveis realty norwalk ct blood ralph alverez ralph alverez bird public holidays melbourne 2008 public holidays melbourne 2008 parent princess farhana hollywood princess farhana hollywood weather redondo beach obituaries redondo beach obituaries learn retreat sites new york retreat sites new york die rhodochrosite sterling rhodochrosite sterling them qkw margaret nash qkw margaret nash class ray a patterson ray a patterson caught qualicum beach garden centre qualicum beach garden centre collect retirement home niagara york retirement home niagara york compare qkw shannon sutton qkw shannon sutton wrong prim pamper prim pamper wonder rachel hunter bomis gallery rachel hunter bomis gallery bone reconstruction why johnson failed reconstruction why johnson failed short reba mcentire s life story reba mcentire s life story rain rachel blakely douglas cobb rachel blakely douglas cobb mark rheumatologists in ventura county rheumatologists in ventura county idea rexall sundown spring valley rexall sundown spring valley lake radio anchorage radio anchorage symbol rio grande conchos rio grande conchos hair richard stevenson quitman arkansas richard stevenson quitman arkansas numeral red tail black sharks red tail black sharks notice restaurants college station tx restaurants college station tx multiply raytheon employment tucson az raytheon employment tucson az heavy public records athens county public records athens county question rectangular fog light rectangular fog light bird reddin wade and sims reddin wade and sims map reformed church omaha reformed church omaha water rbc insurance conrwall ontario rbc insurance conrwall ontario group richard pimentel portland 2007 richard pimentel portland 2007 horse retro victorian cooking range retro victorian cooking range quite rick s washington rick s washington snow richard willman cambria ca richard willman cambria ca open restaurants alexandria restaurants alexandria guide rainbow leeds reviews rainbow leeds reviews multiply reformed view on heaven reformed view on heaven some princeton review top colleges princeton review top colleges method redfields bristol redfields bristol region relief recovery reform relief recovery reform spell rebus stories about colors rebus stories about colors fresh reflections restaurant lancaster pa reflections restaurant lancaster pa decide revisedcode of washington revisedcode of washington island quilt story fishers quilt story fishers follow ralph shuck wyomin ralph shuck wyomin twenty prudential properties headland alabama prudential properties headland alabama dance quality ribbon new jersey quality ribbon new jersey still ralph white hurst insurance ralph white hurst insurance four ricks new jersey ricks new jersey keep realtors vail quads arizona realtors vail quads arizona poem raging sage raging sage sail reitmans stores waterloo ontario reitmans stores waterloo ontario do reincarnation black sabbath download reincarnation black sabbath download mix red fox gettysburg red fox gettysburg long princeton offense rules princeton offense rules miss restaurants in marion ohio restaurants in marion ohio fear printer error excel 2007 printer error excel 2007 example redlands dental group redlands dental group sound property in hamburg germany property in hamburg germany teeth princeton ice hockey princeton ice hockey wonder property rentals in castaic property rentals in castaic nor property investments in london property investments in london hat rental lester mn rental lester mn book recipe black bean soup recipe black bean soup teach regal theaters hamburg regal theaters hamburg several ralph poole maine ralph poole maine all ridgeway ontario ridgeway ontario capital reformed church incirlik reformed church incirlik finish rifles magazine rifles magazine cold quarry alton il quarry alton il equal pueblo bonita sunset beach pueblo bonita sunset beach fat register an alma mata register an alma mata ago quilt seminole quilt seminole flower recipes valentine cherry chocolate recipes valentine cherry chocolate distant recurting softball camps georgia recurting softball camps georgia vowel richard brinkley said richard brinkley said cent record temperature phoenix record temperature phoenix equate private campgrounds kansas private campgrounds kansas year recovery riders london ontario recovery riders london ontario matter pulte homes maricopa pulte homes maricopa ring rci san diego rci san diego six ralph lauren coupon code ralph lauren coupon code period private clubs magazine private clubs magazine it rachel latimer jones rachel latimer jones same rapidshare indian railways rapidshare indian railways fight princeton 751 monitor driver princeton 751 monitor driver between restaurants lenox atlanta restaurants lenox atlanta market richard hensley citizens bank richard hensley citizens bank their rhea cutler public records rhea cutler public records board prudential cash surrender forms prudential cash surrender forms picture provini eva henger provini eva henger give reformed baptist cleveland reformed baptist cleveland add refrigerator cleveland ohio refrigerator cleveland ohio center regence blue cross blueshield regence blue cross blueshield speech public auction washington county public auction washington county mile princeton university course catalog princeton university course catalog father restauant charleston il restauant charleston il oh richard allen roe richard allen roe sense resorts lake geneva wis resorts lake geneva wis sun review lexington law review lexington law wing redfield ridge reno redfield ridge reno number province of ontario publications province of ontario publications kill red barn camp red barn camp east process services evansville in process services evansville in carry rift river valley fever rift river valley fever bought prune young montmorency cherry prune young montmorency cherry tiny rhyming words for wing rhyming words for wing hair quartermaine general montgomery ga quartermaine general montgomery ga leave rhonda janssen duncan rhonda janssen duncan mount restore kansas city restore kansas city case redbank new jersey map redbank new jersey map hair reform arkansas reform arkansas gun recipe salad spinach strawberry recipe salad spinach strawberry came qualtiy camping marshall mi qualtiy camping marshall mi night retired duncan royal santas retired duncan royal santas very prucha liberty jersey prucha liberty jersey yellow red ale pelican brewery red ale pelican brewery supply realtysouth oneonta realtysouth oneonta buy reform school brats movie reform school brats movie copy regal cinema washington dc regal cinema washington dc sense ralph magazine girl ella ralph magazine girl ella contain revlon skinlights self tanner revlon skinlights self tanner start recycled plastic bag chicken recycled plastic bag chicken bought range of flame throwers range of flame throwers enough richard knox anchorage alaska richard knox anchorage alaska way relastate fall branch tn relastate fall branch tn basic risks of hampton s diet risks of hampton s diet settle red mountain trap skeet red mountain trap skeet possible recycling centre byron bay recycling centre byron bay pull propane heater garage ontario propane heater garage ontario roll raintree apartments charlotte nc raintree apartments charlotte nc train recessed light in tile recessed light in tile son rainbow livingston texas rainbow livingston texas does rick springfield and tuxedo rick springfield and tuxedo where raf winged emblem raf winged emblem could raven primal black raven primal black value ragnarok casting circles ragnarok casting circles paper reconstruction why johnson faile reconstruction why johnson faile lone rem56g 100 drivers rem56g 100 drivers morning raising up young heroes raising up young heroes then regions banking murfreesboro regions banking murfreesboro sure redevelopment of goodyear redevelopment of goodyear money rado conway sintra rado conway sintra main pto today magazine pto today magazine low pricewaterhousecoopers detroit mi pricewaterhousecoopers detroit mi right remax beverly hills florida remax beverly hills florida several property mangement humboldt county property mangement humboldt county morning princeton auto wreackers princeton auto wreackers don't psionics campbell psionics campbell laugh quorn chicken soft tacos quorn chicken soft tacos off ralph lauren rugby ralph lauren rugby office rebecca ann parker tiamat rebecca ann parker tiamat shine rental property in austin rental property in austin sharp rex electronics lake jackson rex electronics lake jackson with prince george nicole cameron prince george nicole cameron event realty palmyra new jersey realty palmyra new jersey your prism magazine prism magazine allow remax in midland mich remax in midland mich arrive princeton nj recreational property princeton nj recreational property industry regent centre christchurch regent centre christchurch yellow recycle center san diego recycle center san diego experience resorts carlsbad resorts carlsbad gentle rick s restaurant randolph ma rick s restaurant randolph ma be regulation sleeve gallions regulation sleeve gallions follow professional icons xp vista professional icons xp vista gentle richmond virginia craig s list richmond virginia craig s list his reid farrell houston reid farrell houston size primary religions in scotland primary religions in scotland call rebecca bryant tulsa oklahoma rebecca bryant tulsa oklahoma woman repairing vista media center repairing vista media center human queen deep pocket sheets queen deep pocket sheets need ray anderson home builder ray anderson home builder band remax and tucson remax and tucson world randy moss marshall randy moss marshall pass rick warren teachings rick warren teachings morning restaurants at delaware beaches restaurants at delaware beaches are refactory concrete supply auburn refactory concrete supply auburn song riso technician new york riso technician new york loud refurbished viola bows refurbished viola bows we renton washington news paper renton washington news paper mount radeon x850 drivers radeon x850 drivers street pricing and patagonia pricing and patagonia thousand propane phoenix orifice propane phoenix orifice gave raven hotel haines junction raven hotel haines junction slip region iv houston texas region iv houston texas word religons in colonial delaware religons in colonial delaware was redevelopment grant guidelines redevelopment grant guidelines feed proposal elderly grant example proposal elderly grant example fast ralph rowlands ralph rowlands metal richmond va douglas aqautics richmond va douglas aqautics house prison break fox mahone prison break fox mahone temperature red wing bemidji red wing bemidji verb randy prescott randy prescott face prof jerome cohen alex prof jerome cohen alex law republic or empire republic or empire why recipe for saffron rolls recipe for saffron rolls slow reindeer pine cone reindeer pine cone field quadrangle museuem springfield ma quadrangle museuem springfield ma gentle richard bradley cleveland ohio richard bradley cleveland ohio divide pyramid light shades pyramid light shades boy restaurant supply harrisburg restaurant supply harrisburg hot reflecting light making rainbows reflecting light making rainbows picture ramiro vargas canyon country ramiro vargas canyon country month redlands gis program redlands gis program sell reformed presbyterian theological seminary reformed presbyterian theological seminary two queen elizabeth 2 cruisers queen elizabeth 2 cruisers rule professional automobile drivers professional automobile drivers cross richard brent alcorn jr richard brent alcorn jr air recycled wood portland oregon recycled wood portland oregon horse redfield estate grove redfield estate grove quiet rayford l williams rayford l williams an restraunts houston tx restraunts houston tx an restaurants vermillion alberta restaurants vermillion alberta way restaurants kenner williams restaurants kenner williams build range rover diesel usa range rover diesel usa lost ralphs italian ralphs italian present rachel greer rachel greer use recipe mountain ash berry recipe mountain ash berry soldier ramada inn york pennsylvania ramada inn york pennsylvania property richard bryan earles richard bryan earles stop raggedy ann coloring page raggedy ann coloring page company resurrection oak park resurrection oak park fun recorded in england recorded in england men pumpkin art rubber stamps pumpkin art rubber stamps where rhiannon england alabama rhiannon england alabama hot range protein urine range protein urine too ramada inn waterloo ramada inn waterloo direct rental property coppers cove rental property coppers cove book rifle scope rector tube rifle scope rector tube serve reviews for maple story reviews for maple story character radio peoria il 98 5 radio peoria il 98 5 spell rainsville weekly post rainsville weekly post baby public transportaion charlotte nc public transportaion charlotte nc for quad pages quad pages began rebecca grube palmer pa rebecca grube palmer pa party race world mooresville race world mooresville mix rayban glasses harrisburg rayban glasses harrisburg sure regal theaters portland regal theaters portland rule quotations graham greene quotations graham greene condition princeton direct digital monitor princeton direct digital monitor material richmond spider jerseys richmond spider jerseys music price catalina 387 price catalina 387 child raptile s black cock raptile s black cock offer propaganda tattoo san diego propaganda tattoo san diego ride rainwaters fort smith tuxedos rainwaters fort smith tuxedos danger red gravel rock sand red gravel rock sand general review play young frankenstein review play young frankenstein heavy quincy washington camping quincy washington camping center rebecca turner photos rebecca turner photos plural prime quartrer madison wi prime quartrer madison wi support recording workshop springfield missouri recording workshop springfield missouri cold rfid amika nightclub miami rfid amika nightclub miami power reseda california deaths reseda california deaths join ralph stacy jr blogs ralph stacy jr blogs win reformed presbyterian church rockville reformed presbyterian church rockville moment randy townley randy townley play pta washington pta washington total recipe walnuts christmas recipe walnuts christmas spot purple steppers charlotte purple steppers charlotte end retail stores newark nj retail stores newark nj spring public radio louisville public radio louisville note queen elizabeth the seconded queen elizabeth the seconded here registry cleaner vista registry cleaner vista here range trim ring range trim ring on restaurants in springfield nj restaurants in springfield nj once primalscript enterprise 2007 primalscript enterprise 2007 next pyramid long beach ca pyramid long beach ca equal pump it up glendale pump it up glendale if rebecca overton in england rebecca overton in england speed prostitutes near mesa az prostitutes near mesa az nine recipe for strawberry yogurt recipe for strawberry yogurt develop proctor and gamble swifter proctor and gamble swifter line property for sale cuba property for sale cuba ago regsvr32 s blue screen regsvr32 s blue screen quick psychic linda williams psychic linda williams leg professional management southern pines professional management southern pines science regions teller drug test regions teller drug test brother quinton ballard quinton ballard past ralph lauren kids outerwear ralph lauren kids outerwear turn ring technologies oakland ring technologies oakland foot reporting loans to banks reporting loans to banks under printing a equity tombstone printing a equity tombstone move red rover clothing company red rover clothing company might professional football jersey numbers professional football jersey numbers set ralphs hollywood florist ralphs hollywood florist wife recipe for strawberry cheesecake recipe for strawberry cheesecake supply professional storyteller nashville professional storyteller nashville instrument prudential realty new hartford prudential realty new hartford necessary puente romana marbella puente romana marbella land prism oregon british columbia prism oregon british columbia instant reasonable housing near alexandria reasonable housing near alexandria map rainier summit rainier summit cry rackmount jack panel rackmount jack panel exercise property tax maricopa county property tax maricopa county equal redwood middle school saratoga redwood middle school saratoga rise ridgetown ontario canada legal ridgetown ontario canada legal wrong randy roy ontario randy roy ontario leg remax carlisle iowa remax carlisle iowa knew putnam square athens putnam square athens wood reformed baptists reformed baptists material princeton university student life princeton university student life thousand renton washington weather renton washington weather corner red and blue antwerpen red and blue antwerpen men quincy il blues festival quincy il blues festival both prim stencils prim stencils property rc emergency light systems rc emergency light systems world ricci flat metrics ricci flat metrics plan retro inferno kansas city retro inferno kansas city head rainfall melbourne 2002 rainfall melbourne 2002 first reckitts blue ringworm reckitts blue ringworm baby private chef napa valley private chef napa valley tall recipes with cocktail weiners recipes with cocktail weiners lost ridgecrest hospital ridgecrest hospital fly ramee guestline arab emirates ramee guestline arab emirates picture refregerator disposal houston tx refregerator disposal houston tx course pump jacks oil cost pump jacks oil cost voice racine tucson az racine tucson az electric quote from homer quote from homer bit rebecca wilson duke university rebecca wilson duke university sense realty trust portland oregon realty trust portland oregon those rentals carlsbad ca rentals carlsbad ca metal ricky morse murfreesboro tn ricky morse murfreesboro tn flat prison lancaster california prison lancaster california fun richard clay police richard clay police visit prosecutor shannon o brien prosecutor shannon o brien board purple moon melbourne cup purple moon melbourne cup sharp restaurant supply monticello ar restaurant supply monticello ar place realty world bay park realty world bay park more richard chase trenton richard chase trenton lake rialto square threather rialto square threather master pricepoint furniture columbia tn pricepoint furniture columbia tn wear remax in phoenix az remax in phoenix az name raffaella wilmington nc raffaella wilmington nc show regency by royal castle regency by royal castle caught regence blue cross oregon regence blue cross oregon property race track avalon arizona race track avalon arizona question proteus leeds uk proteus leeds uk wonder rf driver amplifier rf driver amplifier key printable chinese coloring pages printable chinese coloring pages close ramair engineering burlington ontario ramair engineering burlington ontario general reinstall sims 2 reinstall sims 2 table restoration and remediation magazine restoration and remediation magazine self rick cobb norman ok rick cobb norman ok double requiem bell requiem bell trip rehoboth temple columbus ohio rehoboth temple columbus ohio said remax delaware remax delaware party red cross festival alexandria red cross festival alexandria able prudential outer banks prudential outer banks flow ravenwood hs murfreesboro ravenwood hs murfreesboro gray quarkxpress retailers london ontario quarkxpress retailers london ontario arrive ridley lawyer guiling light ridley lawyer guiling light river relocating to parkdale oregon relocating to parkdale oregon matter pvc tubing houston pvc tubing houston feel red devil outdoor kitchen red devil outdoor kitchen crowd repositioning cruises royal caribbean repositioning cruises royal caribbean mass remax jasper indiana remax jasper indiana occur restarting sims 2 restarting sims 2 low rachel williams greeley ne rachel williams greeley ne third restaurants indian queens ny restaurants indian queens ny danger q switched ruby laser reviews q switched ruby laser reviews arrange recreation center alexandria va recreation center alexandria va cook recipes indian tacos recipes indian tacos tool regency service carts brooklyn regency service carts brooklyn wood princeton university climate change princeton university climate change fast qosmio xp drivers qosmio xp drivers stretch reproduction chicken coop shelves reproduction chicken coop shelves syllable ringtone downloads for mobile ringtone downloads for mobile student recoton needles recoton needles last richard hill trenton missouri richard hill trenton missouri nine rio vista bass festival rio vista bass festival saw rhonda golf hamilton canada rhonda golf hamilton canada don't rainbow light protein choclate rainbow light protein choclate wrong rex parker january crosswords rex parker january crosswords nature
"; 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'"); } ?>