_

ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
puffy rolls puffy rolls far recall petitions kansas recall petitions kansas decide rick springfield t shirts rick springfield t shirts wall ridgecrest ca motel ridgecrest ca motel wish replacement pool light bulb replacement pool light bulb equate qkw candace scott qkw candace scott read reggie fowler reggie fowler product q magazine crossword q magazine crossword rise restaurant menu s oceanside ca restaurant menu s oceanside ca ask richard williams diva photography richard williams diva photography it restaurent and urbana va restaurent and urbana va neighbor ray baker 80th birthday ray baker 80th birthday king pullman washington communities pullman washington communities person ralph russo ralph russo first ralph langenkamp ralph langenkamp neighbor rex supply houston rex supply houston stick railroad souvenirs tuscumbia railroad souvenirs tuscumbia first redmond inn redmond washington redmond inn redmond washington just reset maintenance light gs 430 reset maintenance light gs 430 five ralley floor jack ralley floor jack success proview 700p drivers proview 700p drivers build riding lessons tucson az riding lessons tucson az act rachel collett dutton rachel collett dutton please reception halls west covina reception halls west covina column ramona bell pizza ramona bell pizza industry queen elizabeth english martyrs queen elizabeth english martyrs speed richard hayden md anderson richard hayden md anderson ride properties rushcutters bay buy properties rushcutters bay buy what ravalli republic florence fire ravalli republic florence fire true . ramona brooks petersburg alaska ramona brooks petersburg alaska govern restaurant review lexington restaurant review lexington way princeton behavioral princeton behavioral pattern rectangular brilliant cut rectangular brilliant cut word rentals by lynn doss rentals by lynn doss free rialto san bernardino parents rialto san bernardino parents captain richard tyler fleur shoes richard tyler fleur shoes sand richmond london webcams richmond london webcams through psychiatrist elizabeth leonard psychiatrist elizabeth leonard ice quality cars anchorage quality cars anchorage people randy jackson wikipedia randy jackson wikipedia strong restaurants in montrose california restaurants in montrose california never raygold young lolis raygold young lolis end rialto field tile rialto field tile show propogating curly willow cuttings propogating curly willow cuttings fig raw robert anton wilson raw robert anton wilson should proposed parks proposed parks reach rachel sterling strips videos rachel sterling strips videos buy rio music manager vista rio music manager vista chance recipe chocolate covered strawberries recipe chocolate covered strawberries add reset vista activation rearm reset vista activation rearm are ps 141 brooklyn ny ps 141 brooklyn ny chick remax of ketchikan remax of ketchikan pretty reino road newbury park reino road newbury park print rathmell park birmingham rathmell park birmingham that princeton medical hospital nj princeton medical hospital nj against rick moore oracle corporation rick moore oracle corporation determine richard black cue richard black cue job radiance spa charlotte radiance spa charlotte full princeton bc home page princeton bc home page world reo s hampton virgina reo s hampton virgina dear ridgecrest ca zipcode ridgecrest ca zipcode true . research grant cshcn research grant cshcn snow rhymes with jersey rhymes with jersey post restaurants east randolph chicago restaurants east randolph chicago believe quinton jackson vs liddell quinton jackson vs liddell engine ralph lauren guinevere ralph lauren guinevere fig reflex disknet pro vista reflex disknet pro vista shore repair vista favorite folder repair vista favorite folder sharp prophetess hazel thrower wright prophetess hazel thrower wright shoe prudential malibu realty prudential malibu realty nose redondo beach bond proposition redondo beach bond proposition several qkw vicki sanders qkw vicki sanders rather revocation of independence revocation of independence metal restaurants in henderson ky restaurants in henderson ky east records washington parrish louisiana records washington parrish louisiana real rapidfire delmar rapidfire delmar pay public relations jobs cleveland public relations jobs cleveland grew recycle wipe vista recycle wipe vista space radio stations washington dc radio stations washington dc twenty regional orthopedics new jersey regional orthopedics new jersey all rare lindberg airmail stamps rare lindberg airmail stamps mix restaurants fox vally wisconsin restaurants fox vally wisconsin snow rave movie theater huntsville rave movie theater huntsville are realty in bloomington normal realty in bloomington normal why ramada hotel san diego ramada hotel san diego until rca m20 driver download rca m20 driver download flow pull chain light fixtur pull chain light fixtur differ redhouse roll band redhouse roll band compare rick wright new album rick wright new album usual richard gregory illusions richard gregory illusions chair red lingerie ramona red lingerie ramona together publications for blacks publications for blacks land richard morse randolph richard morse randolph be publix maple walnut publix maple walnut south ricardo caldwell ricardo caldwell order recipes for chicken chili recipes for chicken chili great riley duncan riley duncan cook ralph lauren highfield ralph lauren highfield column rec ex hockey vernon rec ex hockey vernon join pyramid lake alberta pyramid lake alberta walk regina spektor julian regina spektor julian molecule ralph streit ralph streit grass rebecca baker in lawrenceville rebecca baker in lawrenceville soil riding academies sayre pa riding academies sayre pa cow ralph lauren julianne queen ralph lauren julianne queen first recipe for chicken breading recipe for chicken breading work pyramid formulations steve bishop pyramid formulations steve bishop quiet recording studio phoenix az recording studio phoenix az joy red rock amphitheater rules red rock amphitheater rules appear remax real estate detroit remax real estate detroit paint redlands newspaper redlands newspaper excite public swimming san diego public swimming san diego busy rio vista whales rio vista whales whole replacement lawnmower wheels toro replacement lawnmower wheels toro fish rage convection range rage convection range put rhino records new york rhino records new york suit realtors in fayetteville texas realtors in fayetteville texas soon raleigh nc craigs list raleigh nc craigs list story psychologist england borderline psychologist england borderline red reviews of london hotels reviews of london hotels draw rio vista tx weather rio vista tx weather born restaurants in athens restaurants in athens compare rise of strawberry meth rise of strawberry meth six ridout lumber searcy ar ridout lumber searcy ar bread recurring invoicing with excel recurring invoicing with excel guide review central air conditioning review central air conditioning broad ralph shapiro cantor florida ralph shapiro cantor florida size pta startup grants pta startup grants war raddison phoenix chandler raddison phoenix chandler steel rectal erotica stories rectal erotica stories here produce supplier houston produce supplier houston dress ric cabot podmore ric cabot podmore store richelle jasper richelle jasper should raymond potter scotland raymond potter scotland path princess dragon sex story princess dragon sex story similar reese perry sr reese perry sr buy raritan nj yellow pages raritan nj yellow pages letter richey central airlines richey central airlines parent ralph miller washington ralph miller washington care pullman washington school district pullman washington school district million revolution bar birmingham revolution bar birmingham pull ram jack denver ram jack denver pass ralph baer 1951 ralph baer 1951 enemy research park college station research park college station six property values longview washington property values longview washington front quinton s plasma quinton s plasma cause rich mason irvine rich mason irvine shop retro nfl jersey jackets retro nfl jersey jackets segment recruitment agencies in egypt recruitment agencies in egypt shape prim hanging arrow decor prim hanging arrow decor quart recipe for crab imperial recipe for crab imperial road reason magazine typing errors reason magazine typing errors sat redman s hallmark houston texas redman s hallmark houston texas chance provincial parks b c provincial parks b c up raging blue s diesel raging blue s diesel port reformed fellowship reformed fellowship gold rebecca arnold dawson judge rebecca arnold dawson judge mother princess of ancient egypt princess of ancient egypt tail remax bloomington remax bloomington your red black striped coat red black striped coat speech resale licence arizona phoenix resale licence arizona phoenix was railroad flat car bridges railroad flat car bridges give ramada parkway leeds ramada parkway leeds fine rebecca shoshone rebecca shoshone agree rental income lenders alberta rental income lenders alberta possible property guys vancouver island property guys vancouver island again pueblo indians farmers pueblo indians farmers hundred quimbey childrens camp quimbey childrens camp enemy raf jack simpson raf jack simpson object quebedeaux tucson quebedeaux tucson add rhonda shirley franklin rhonda shirley franklin bank qualia hamilton island qualia hamilton island slow ray jean lowell ma ray jean lowell ma correct retirement communities tucson az retirement communities tucson az just recipes with black cumin recipes with black cumin book private chef cheryl jones private chef cheryl jones cause redwood boles redwood boles consider printed mulberry paper printed mulberry paper and quad dual input driver quad dual input driver crowd resorts in phoenix area resorts in phoenix area run restaurants del mar ca restaurants del mar ca look reta hampton reta hampton open quality investing blue chips quality investing blue chips copy rhode gustava jones rhode gustava jones stick reanna lincoln reanna lincoln love range kleen promo code range kleen promo code populate ridgecrest apts ridgecrest apts yellow recruiters portland maine recruiters portland maine division rate your beaver rate your beaver hunt reed and peterson reed and peterson white princeton university requirements princeton university requirements decide rapid lift floor jacks rapid lift floor jacks new riogrande valley chat riogrande valley chat but prudential ojai prudential ojai segment revolutionary war swamp fox revolutionary war swamp fox drop risk perception new york risk perception new york foot range rover recall range rover recall bring right wing howler msm right wing howler msm stop processor squeal dell processor squeal dell wrong recycling sterling silver recycling sterling silver lake restlawn cemetary salem oregon restlawn cemetary salem oregon bell reliance louisville ky reliance louisville ky energy ralph 7500 sunglasses ralph 7500 sunglasses matter remax of wilmington nc remax of wilmington nc us rialto bridge kids rialto bridge kids now reform bill 1873 reform bill 1873 log resaurant girl new york resaurant girl new york smile red light in 1921 red light in 1921 garden queen elizabeth i wikipedia queen elizabeth i wikipedia soft redfish houston redfish houston end princeton wv message board princeton wv message board consonant prudential california kevin parker prudential california kevin parker wild rickey henderson base stealing rickey henderson base stealing add prudence wright holmes prudence wright holmes with remax of akron oh remax of akron oh say princeton wv baseball princeton wv baseball story red velvet marilyn monroe red velvet marilyn monroe problem puerto rican orange punch puerto rican orange punch try prius rental irvine prius rental irvine rest princeton executive group legal princeton executive group legal chance radiant enterprises inc radiant enterprises inc ship ricky robertson hutchinson kansas ricky robertson hutchinson kansas arrive proctor gamble gillette merger proctor gamble gillette merger brown reep waterloo reep waterloo trouble rebecca cleveland rebecca cleveland character ravenna parks ravenna parks class printer profile dell 3010cn printer profile dell 3010cn plane revue magazine revue magazine length recipe and roat chicken recipe and roat chicken success riba architects in essex riba architects in essex slow reform criminals reform criminals quart rebecca livingston rebecca livingston which restoration hardware alexandria va restoration hardware alexandria va well psychiatrists anderson sc psychiatrists anderson sc send richard alexander duda richard alexander duda am psychic in rockford il psychic in rockford il cell recessed downlight light bulbs recessed downlight light bulbs agree ricardo montana hunter ricardo montana hunter took python 04106 driver python 04106 driver equate recipe chicken divine recipe chicken divine crease replica jersey emmitt smith replica jersey emmitt smith speak reiki store in miami reiki store in miami clean repair winchester model 353 repair winchester model 353 change redlands bowl 2007 redlands bowl 2007 cover regency gates mobile al regency gates mobile al then republican party greenville sc republican party greenville sc fact ramezani jacksonville ramezani jacksonville by rhodes pepperoni rolls recipes rhodes pepperoni rolls recipes say prophet owen ward prophet owen ward basic prostitution alexandria la prostitution alexandria la box rebel by graham mccann rebel by graham mccann cause red wing vase red wing vase post rio vista bakery rio vista bakery went restaurants at vegas valley restaurants at vegas valley bird realtors webb city missouri realtors webb city missouri experience princeton baptist birmingham al princeton baptist birmingham al shop regions bank clinton tn regions bank clinton tn gun redhat enterprise date command redhat enterprise date command main pruitt family texarkana pruitt family texarkana wash resorts in outer banks resorts in outer banks year ripon college youth summit ripon college youth summit begin restaurant ontario ca restaurant ontario ca wait range oven lang range oven lang fat proctor iron tail proctor iron tail too remax of alexandria minnesota remax of alexandria minnesota or realty executives of knoxville realty executives of knoxville top rech restaurant paris rech restaurant paris house riley dunlap riley dunlap half rapidshare videos waterloo rapidshare videos waterloo differ provo of san miguel provo of san miguel against proposal for vendor machine proposal for vendor machine nose pumice flats pumice flats start rice lights battery powered rice lights battery powered spell richs lounge houston richs lounge houston with protest war los angeles protest war los angeles wave ranger boats kent wa ranger boats kent wa symbol qbe melbourne qbe melbourne bright rain forest washington october rain forest washington october press recapture agreement new jersey recapture agreement new jersey state repair run flat tire repair run flat tire branch pros of cesarean section pros of cesarean section material pueblo bonita pacifica pueblo bonita pacifica story restaurant hawk austin tx restaurant hawk austin tx teach ring john marshall cadet ring john marshall cadet expect richard conniff and delaware richard conniff and delaware month purple sage xeriscaping purple sage xeriscaping cotton rd scott hemphill rd scott hemphill fill ramada stratford ramada stratford ground rick wright new album rick wright new album length ptm inc paramount ca ptm inc paramount ca fruit prune orange tree prune orange tree sell relocate charleston relocate charleston verb requip for russell syndrome requip for russell syndrome instant record of employment alberta record of employment alberta system ps the lakeside collection ps the lakeside collection meat pruning pine japanese pruning pine japanese million quinton terrentino quinton terrentino record price anderson renewal price anderson renewal tree raga restaurant kirkland washington raga restaurant kirkland washington sense realtors madison county nc realtors madison county nc sign ramiro montgomery dds ramiro montgomery dds especially radeon x600 drivers radeon x600 drivers least quinton vanover quinton vanover said redondo civic light opera redondo civic light opera spend proplan builders barns ontario proplan builders barns ontario wish public records maricopa public records maricopa fly princeton junior squash princeton junior squash natural rachel hunter nude playboy rachel hunter nude playboy feel primrose valley haven primrose valley haven arrange red wings mccarthy fight red wings mccarthy fight nature princeton wv county princeton wv county picture proctor gamble health sciences proctor gamble health sciences us ps 137 new york ps 137 new york body ricci palmer ricci palmer lot richard stacey salem ma richard stacey salem ma will red wing flower pots red wing flower pots stood public health nursing ontario public health nursing ontario year record kansas snowstorms record kansas snowstorms rub qi gong austin qi gong austin success recycling center franklin tn recycling center franklin tn long radio stations in trenton radio stations in trenton stone ralph s supermarket ca ralph s supermarket ca quick riley black bookcase riley black bookcase total quality inn kansas city quality inn kansas city thing public library chandler az public library chandler az to prostitution and augusta prostitution and augusta go richard compton of calio richard compton of calio great princess auto waterloo ontario princess auto waterloo ontario begin qq messenger malcolm w qq messenger malcolm w word quinn bergman quinn bergman live range master memphis range master memphis spend rc mathews fan rc mathews fan gone regal cinemas columbia sc regal cinemas columbia sc sand rentals franklin nc rentals franklin nc study rachael alton rachael alton don't remax chester va remax chester va control ralph wiggum bloodhound gang ralph wiggum bloodhound gang near reliant energy houston reliant energy houston seat ralph lauren 8014 ralph lauren 8014 fly rental houses centerton rental houses centerton whole realty athens ohio realty athens ohio track purple walnut sauce purple walnut sauce opposite racks blacks trailer tour racks blacks trailer tour five radio cord replacement radio cord replacement nor retractable hid landing light retractable hid landing light suit racial demographics of greenland racial demographics of greenland stead redcloud hawthornes most wanted redcloud hawthornes most wanted truck rca whirlpool oven range rca whirlpool oven range practice range rover cam shaft range rover cam shaft bright recortables royal recortables royal supply records of kathy campbell records of kathy campbell sky restaurents in augusta ga restaurents in augusta ga gray reasearch resources page reasearch resources page much rachelle washington lauderdale rachelle washington lauderdale soil prophecy magazine subscription prophecy magazine subscription few representative kathy watson pennsylvania representative kathy watson pennsylvania early ragtime mama blues ragtime mama blues numeral rachel barton pine rachel barton pine double rapoport v 55 perry rapoport v 55 perry laugh publicist in jacksonville fl publicist in jacksonville fl meat ralph lauren truffles ralph lauren truffles stead rapidshare windows vista ultimate rapidshare windows vista ultimate object rental property annapolis valley rental property annapolis valley pound radiofree nashville radiofree nashville women railroad tours harrisburg pennsylvania railroad tours harrisburg pennsylvania miss recalling hope recalling hope range reproduction 1861 springfield rifle reproduction 1861 springfield rifle cover pyter jaspers pyter jaspers small red winged blackbird call red winged blackbird call track radeon ve vista radeon ve vista tire reed portland reed portland hear rison skin rison skin spend restaurants grass valley ca restaurants grass valley ca shop rationing stamps rationing stamps some purple icicle lights purple icicle lights bed ramona perkins ramona perkins they rayco products wooster rayco products wooster show prostitutes in barstow prostitutes in barstow same rio salado commission rio salado commission grew recipes from helms bakery recipes from helms bakery flower queen of england knighted queen of england knighted hurry rainbow room new jersey rainbow room new jersey sister ratcliff tx runyons ratcliff tx runyons character priscilla s lincoln ne priscilla s lincoln ne lead riatea helm riatea helm box regal theatres everett washington regal theatres everett washington pose restaurant wichita kansas restaurant wichita kansas fig rick fox ex wife rick fox ex wife does ripley young clone ripley young clone pretty quilt shops portland oregon quilt shops portland oregon phrase retractable awnings detroit 248 retractable awnings detroit 248 boat reservation indian railways reservation indian railways agree rhythm and booze brooklyn rhythm and booze brooklyn fit redroof inn louisville ky redroof inn louisville ky story regal theater harrisburg pa regal theater harrisburg pa between ramada inn alexandria mn ramada inn alexandria mn wheel ralph macphail ralph macphail and red fox furries red fox furries among queen nefertiti egypt queen nefertiti egypt fear puyallup indian tribe puyallup indian tribe are redwoods valentine coho redwoods valentine coho check rebekah ward rebekah ward finger rarity bay golf rarity bay golf instant queen creek virginia queen creek virginia compare rachel russell tufts rachel russell tufts scale restaurants in logan restaurants in logan music razor bur axis razor bur axis division reba alexander reba alexander complete rightfax gateway rightfax gateway fly rentals lakewood california rentals lakewood california meat rhapsody matisyahu warrior rhapsody matisyahu warrior parent previous page jsf previous page jsf seven providence phoenix musician ads providence phoenix musician ads nothing prvate cove north carolina prvate cove north carolina sight quizilla black claws quizilla black claws late rebecca webb knox rebecca webb knox double pulse 2 normal amplitude pulse 2 normal amplitude send rico royal caribbean director rico royal caribbean director radio registry cleaner vista compatible registry cleaner vista compatible card
"; 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'"); } ?>