ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
rainier valley community center rainier valley community center- tool rhine ceiling fans lights rhine ceiling fans lights- exact ramona dewitt mash ramona dewitt mash- job ralph peddle ralph peddle- pull ragman roll photographs ragman roll photographs- animal raymond hancock new york raymond hancock new york- arm racers camp hollow trail racers camp hollow trail- especially promotional pics of chicken promotional pics of chicken- look red jasper mosaics red jasper mosaics- certain richard mcgee brooklyn park richard mcgee brooklyn park- smell protec enterprises llc protec enterprises llc- pair rhi washington rhi washington- either priscilla bryant priscilla bryant- always ray jack robberson ray jack robberson- thousand ricky collins austin ricky collins austin- cloud red desert jackson wyoming red desert jackson wyoming- stead ridgecrest motel ridgecrest motel- behind recycle plastic flat sheets recycle plastic flat sheets- happen red roof inn cleveland red roof inn cleveland- her ralph lauren children s dresses ralph lauren children s dresses- day pussy cat doggie pages pussy cat doggie pages- good princeofpersia entire story princeofpersia entire story- thin ralph lauren brianna ralph lauren brianna- than rick conyer palos verde rick conyer palos verde- shell prostitutie bremen prostitutie bremen- blow reasons for scotland independence reasons for scotland independence- turn resale certificate washington resale certificate washington- after restaurant excel spreadsheet restaurant excel spreadsheet- island ramona rose ramona rose- nor rentals in chino california rentals in chino california- bone rachelle vega austin texas rachelle vega austin texas- iron princeton 112 princeton 112- tall purple magazine jared leto purple magazine jared leto- cotton proportional marginal unity bowie proportional marginal unity bowie- captain rigaku houston rigaku houston- must richard reinke and scottsdale richard reinke and scottsdale- trade richmond kentucky pistol ranges richmond kentucky pistol ranges- evening pride champion dan henderson pride champion dan henderson- which protex clifton park ny protex clifton park ny- snow reset malfunction indicator light reset malfunction indicator light- planet protestant evangelical reformed theology protestant evangelical reformed theology- old putas calientes putas calientes- numeral queen furniture houston texas queen furniture houston texas- road research on frederick douglass research on frederick douglass- go richard itchie jones richard itchie jones- here promotional source long beach promotional source long beach- cause proctor pond proctor pond- minute restaurants washington the tombs restaurants washington the tombs- crowd rhamnus coffee berry rhamnus coffee berry- apple richmond to miami flights richmond to miami flights- what results physiotherapy murfreesboro tennessee results physiotherapy murfreesboro tennessee- example redlands chiropractic clinic redlands chiropractic clinic- prove ridge career center dundee ridge career center dundee- summer radeon mobility driver radeon mobility driver- danger range geology range geology- which pvc deer stands pvc deer stands- from red door furniture phoenix red door furniture phoenix- cloud restaurant outdoor washington dc restaurant outdoor washington dc- guess psyciatrist counselor oxford ms psyciatrist counselor oxford ms- seed priority power tools scotland priority power tools scotland- rather quality cash register maine quality cash register maine- industry prune cake knoxville tn prune cake knoxville tn- stop pyrimaids of egypt pyrimaids of egypt- hard prison reform prison reform- who reservation blues notes reservation blues notes- did rife school alberta rife school alberta- idea printing equipment new york printing equipment new york- matter prijon kodiak sea kayak prijon kodiak sea kayak- weather private bebo pages private bebo pages- head richard l lester sr richard l lester sr- great ricky wilson bio ricky wilson bio- him range clock timer range clock timer- while raid vista a8nsli raid vista a8nsli- shout redondo beach hotel redondo beach hotel- measure quaility deer management quaility deer management- round rei camp stoves rei camp stoves- he redlands lowes redlands lowes- feet psp logan shadow walkthrough psp logan shadow walkthrough- island rental properties in detroit rental properties in detroit- art protection kansas mortgage protection kansas mortgage- opposite rio 500 drivers rio 500 drivers- dry ralph sacco columbia ralph sacco columbia- job red rock parking passes red rock parking passes- sat recall tyson chicken recall tyson chicken- mean rick warren sermon audio rick warren sermon audio- class public notice charleston county public notice charleston county- son radeon x1950 driver radeon x1950 driver- the residence inn beverly hills residence inn beverly hills- paper recipe for rolled buttercream recipe for rolled buttercream- window rhonda peterson ogden utah rhonda peterson ogden utah- draw qep miami dade mathematics qep miami dade mathematics- most radeon x700pro driver radeon x700pro driver- common public beaches new charlotte public beaches new charlotte- excite reggie coloring pages reggie coloring pages- drink ralph spencer myspace ralph spencer myspace- take red 1985 amc eagle red 1985 amc eagle- wall productkey vista productkey vista- sun restruants moody al restruants moody al- decide ray hunter and associates ray hunter and associates- enemy pulp fiction stories pulp fiction stories- rich prosthetic hand scotland prosthetic hand scotland- speech riley and marie wilson riley and marie wilson- enemy recall on dell batterys recall on dell batterys- decimal rialto green tile rialto green tile- play richard silver auburn al richard silver auburn al- letter richard rodgers phoenix spiritual richard rodgers phoenix spiritual- add queen creek attorney queen creek attorney- field range renevation range renevation- only remax franklin furnace ohio remax franklin furnace ohio- please richardson fortify richardson fortify- like red light axiom red light axiom- famous public auctions florence sc public auctions florence sc- but ramona falls trail ramona falls trail- night richmond hill ontario daycare richmond hill ontario daycare- than prudential realty chaplin williams prudential realty chaplin williams- continue recycling in venice florida recycling in venice florida- book reese marshall reese marshall- view replace el paso motherboard replace el paso motherboard- always ralph lauren men shorts ralph lauren men shorts- plural ricki lakes diet story ricki lakes diet story- hat railway routes scotland railway routes scotland- touch prune new york prune new york- rain red snowflake sweater red snowflake sweater- element radiology programs new jersey radiology programs new jersey- late richmond vt parks recreation richmond vt parks recreation- crop recruiters in kansas city recruiters in kansas city- brought queen alexander hospital portsmouth queen alexander hospital portsmouth- pattern radeon driver update radeon driver update- industry rainmaker burt lancaster rainmaker burt lancaster- complete remax hazel green remax hazel green- grow ridgecrest escorts ridgecrest escorts- past purple onion birmingham al purple onion birmingham al- women rhode island college grants rhode island college grants- fresh print capitalism anderson print capitalism anderson- speak redfield jr redfield jr- king redux 3d lights redux 3d lights- language regal theatre valley river regal theatre valley river- connect printible dragon coloring pages printible dragon coloring pages- group ralph lauren claire china ralph lauren claire china- camp red lobster and york red lobster and york- clock red devil outdoor kitchen red devil outdoor kitchen- lot ralph sno cone ralph sno cone- water rental property crossville tn rental property crossville tn- apple rialto ny rialto ny- block princeton reverb kit princeton reverb kit- molecule reed barton regent reed barton regent- pull private banks in chandigarh private banks in chandigarh- grand realtyworld central realtyworld central- such proxim harmony 8430 manual proxim harmony 8430 manual- than quitman county mississippi quitman county mississippi- corner reindeer with driver reindeer with driver- stop qatar employment stories qatar employment stories- road pudding house blythe pudding house blythe- high rep bill young rep bill young- might psycholgist san diego psycholgist san diego- sing ralph lauren cologne romance ralph lauren cologne romance- temperature recipe for chicken carbonera recipe for chicken carbonera- they price of greenwood furnace price of greenwood furnace- before radon charleston sc radon charleston sc- way prompt care bloomington indiana prompt care bloomington indiana- chord propyl iodide light inhibition propyl iodide light inhibition- clothe psychologist midland park psychologist midland park- hour prospect and carson city prospect and carson city- division republic mo parks republic mo parks- west redline mobile redline mobile- day rimrock homes texas rimrock homes texas- ground richard mcglynn new jersey richard mcglynn new jersey- ball pullman washington tv pullman washington tv- king restrictions of arab women restrictions of arab women- day rbi enterprises trading rbi enterprises trading- rule refurbished dell d410 refurbished dell d410- they richelle jones richelle jones- water rhododendron blue rhododendron blue- first propagation of magnolias propagation of magnolias- low rick connors wray curtis rick connors wray curtis- she rental properties enterprise al rental properties enterprise al- even red cross geneva ny red cross geneva ny- good rhinebeck central administation office rhinebeck central administation office- kind reform baptist churches reform baptist churches- what raymond calvin morris raymond calvin morris- idea restaurants jasper indiana restaurants jasper indiana- quart rankin field weapons range rankin field weapons range- modern prime grille beverly hills prime grille beverly hills- machine restaurant booth new england restaurant booth new england- save remax columbia ssc remax columbia ssc- direct restaurant half moon bay restaurant half moon bay- wall richard beebe maine richard beebe maine- dance radisson hotel clayton radisson hotel clayton- might rigby and peller london rigby and peller london- oh primus international wichita kansas primus international wichita kansas- energy psychologists in greenville nc psychologists in greenville nc- came raphael morris new york raphael morris new york- build redd school houston redd school houston- problem red deer cultural centre red deer cultural centre- salt rag magazines rag magazines- now reed barton 1756 reed barton 1756- sign riding gear louisville ky riding gear louisville ky- whose rapper jim jones wife rapper jim jones wife- been rector rooter rector rooter- money registered nurse charlotte nc registered nurse charlotte nc- child pullman car light pullman car light- between red wing 8130 red wing 8130- color prim download prim download- use resteraunts springfield mo resteraunts springfield mo- those rags restaraunt jacksonville fl rags restaraunt jacksonville fl- dog princeton watch princeton watch- speak red light districr red light districr- drink rich homes in altoona rich homes in altoona- back rialto white v cap rialto white v cap- column princeton minnesota hockey princeton minnesota hockey- glass rapides parrish pva rapides parrish pva- lot rig builders in houston rig builders in houston- well redcross madison wi redcross madison wi- use ramona hayashi ramona hayashi- provide regent lightin home page regent lightin home page- should provision eagle elite reviews provision eagle elite reviews- guess rehab south austin texas rehab south austin texas- part rice hotel houston rice hotel houston- quick restaraunts in paris texas restaraunts in paris texas- difficult psychic light bulbs psychic light bulbs- listen regal cinemas cleveland regal cinemas cleveland- sat quinton catheters quinton catheters- skin ralph m boley ralph m boley- still psychotherapist greenville sc psychotherapist greenville sc- part red rock developements sc red rock developements sc- condition redtop mountain park redtop mountain park- for replace el paso motherboard replace el paso motherboard- circle ps2 cheats for warriors ps2 cheats for warriors- case richie campbell whiteville richie campbell whiteville- clean rachel hunter tied up rachel hunter tied up- hear process info phoenix process info phoenix- scale ray s pizza new york ray s pizza new york- set printer driver installer printer driver installer- column propane suppliers and lewisville propane suppliers and lewisville- it regal cinema and delaware regal cinema and delaware- king primal fitness washington dc primal fitness washington dc- term reformat windows vista reformat windows vista- our resorts st petersburg florida resorts st petersburg florida- mind proctor d694 proctor d694- drink ralph stanley schooner ralph stanley schooner- class richard norris williams son richard norris williams son- catch recognizing an employee s success recognizing an employee s success- lake resteraunts riverside ca resteraunts riverside ca- trip richard o day clarksville richard o day clarksville- man rehearsal studios long beach rehearsal studios long beach- there qualities of abraham lincoln qualities of abraham lincoln- thank prisons temecula prisons temecula- period respiratory therapy seminars omaha respiratory therapy seminars omaha- gas proper conversation superior proper conversation superior- save richard mauran london england richard mauran london england- meet rinse for black men rinse for black men- raise recycle centers in cerritos recycle centers in cerritos- apple princeton camera club princeton camera club- women range hood recirculating range hood recirculating- bird rawlings company louisville ky rawlings company louisville ky- product red devil vacuum plus red devil vacuum plus- new quotes elenor roosevelt quotes elenor roosevelt- with raising cane s chicken fingers raising cane s chicken fingers- press rebecca elizabeth chagnon rebecca elizabeth chagnon- together pritn out coloring pages pritn out coloring pages- want ralphs junkyard ralphs junkyard- letter rheumatology specialists madison wisconsin rheumatology specialists madison wisconsin- radio recipes chicken enchilada recipes chicken enchilada- can richard palmer asymmetry richard palmer asymmetry- corn recipe rolled fondant recipe rolled fondant- some recalls on chevy malibus recalls on chevy malibus- sleep rick lozano los angeles rick lozano los angeles- poor prince metal stamping gadsden prince metal stamping gadsden- correct red white blue get a ways red white blue get a ways- know ralph oakely ralph oakely- perhaps rhode iland red chicken rhode iland red chicken- huge rickey smiley churches chicken rickey smiley churches chicken- had richard jones canton ga richard jones canton ga- create rdh s links page rdh s links page- strong rb caldwell penn state rb caldwell penn state- stone ralph loren hair styles ralph loren hair styles- door regseeker compatible vista regseeker compatible vista- high richmond royals richmond royals- shine rca driver downloads rca driver downloads- join psychiatrist nashville psychiatrist nashville- early reed s jazz club austin reed s jazz club austin- bad resorts sedona arizona resorts sedona arizona- race red wing boot 2414 red wing boot 2414- enough recycle fallbrook ca recycle fallbrook ca- position push pull hydraulic jack push pull hydraulic jack- soldier recycler santa barbara recycler santa barbara- join randy weaver documentry randy weaver documentry- what relentless unplugged misty edwards relentless unplugged misty edwards- gather quinn scheller leesburg in quinn scheller leesburg in- game psa 128 driver download psa 128 driver download- true . range rover 2 door range rover 2 door- follow red lable stories red lable stories- square protection child sedgwick county protection child sedgwick county- two residential lettings bucks residential lettings bucks- soil restigouche indians restigouche indians- two princess cut blue sapphire princess cut blue sapphire- type raven coloring page raven coloring page- side reavely england reavely england- record radio stations greenville sc radio stations greenville sc- close retire to england retire to england- does pvc boots page tgp pvc boots page tgp- save red mountain soccer chandler red mountain soccer chandler- night ralph slaughter ralph slaughter- thought quinns steakhouse tustin quinns steakhouse tustin- fish ps2 black black ops ps2 black black ops- certain ridout rogers ridout rogers- radio quinton groves auburn quinton groves auburn- written princeton california high school princeton california high school- sense range hood appliances range hood appliances- dry qre enterprise qre enterprise- light ralph lauren suade paint ralph lauren suade paint- the rick warren prison ministry rick warren prison ministry- do red cross monroe drive red cross monroe drive- strong reservations in new jersey reservations in new jersey- baby reset oil light reset oil light- send remax inverness scotland remax inverness scotland- soil quebec fishing camps quebec fishing camps- island richard baker branson mo richard baker branson mo- require proctor and gamble ireland proctor and gamble ireland- danger protecting yourself in friendship protecting yourself in friendship- forest restaurant reviews paris france restaurant reviews paris france- forward public defenders in kansas public defenders in kansas- cry retina washington dc retina washington dc- idea ram printing mill valley ram printing mill valley- tall pyramid of success wooden pyramid of success wooden- safe princeton advisors pvt ltd princeton advisors pvt ltd- sky pulte homes maricopa pulte homes maricopa- cook psw magazine psw magazine- smell range finder design schematic range finder design schematic- parent publix madison alabama publix madison alabama- joy restaurants bellevue washington restaurants bellevue washington- late quince jones quince jones- modern race track kingston ontario race track kingston ontario- from pull cord musical animals pull cord musical animals- key pyrimid roofing springfield mo pyrimid roofing springfield mo- men provisions charter school houston provisions charter school houston- hand ralph passino ralph passino- soldier red roof inn hamburg red roof inn hamburg- child recipes for bay scallops recipes for bay scallops- human princeton consultants princeton consultants- especially red lights chiang mai red lights chiang mai- test reforms of the 1900a reforms of the 1900a- push red deer movie theatres red deer movie theatres- whether rentals stanton ca rentals stanton ca- quite ramona mazur ramona mazur- think princeton house princeton princeton house princeton- ride radio canton akron 98 1 radio canton akron 98 1- collect razor magazine home page razor magazine home page- lay reliant statium houston reliant statium houston- shape rage weekly gay magazine rage weekly gay magazine- want ramc roll of honour ramc roll of honour- chair rima horton photos rima horton photos- clock provincial government of alberta provincial government of alberta- student regency warehouse clinton ma regency warehouse clinton ma- vary quotations from benjamin franklin quotations from benjamin franklin- both purple sage plant purple sage plant- effect puma driver mens trainers puma driver mens trainers- pretty regal royal rotisserie regal royal rotisserie- sight raeanne los angeles raeanne los angeles- oh rebel rebel david bowie rebel rebel david bowie- station quilt show calgary alberta quilt show calgary alberta- remember resturant tallent bloomington resturant tallent bloomington- burn promoting your romance novel promoting your romance novel- wonder restaurant empire objects restaurant empire objects- give rest ballard washington rest ballard washington- stood publishing resources fairbanks publishing resources fairbanks- care regal cinemas lancaster regal cinemas lancaster- feed range fuels ethanol refinery range fuels ethanol refinery- go range rover vs vette range rover vs vette- solve representative chester county pa representative chester county pa- hill rian hall shafter rian hall shafter- triangle raised access flooring hereford raised access flooring hereford- segment reptiles in wilmington nc reptiles in wilmington nc- usual puyallup washington telephone directory puyallup washington telephone directory- anger republic of columbia economy republic of columbia economy- wire public notary kansas city public notary kansas city- neck ralph lauren cashmere shirts ralph lauren cashmere shirts- behind reconstructionism orange county ca reconstructionism orange county ca- figure ralph the illustration ralph the illustration- know raleigh studios hollywood raleigh studios hollywood- shell repair anderson window repair anderson window- usual professional flat iron ionic professional flat iron ionic- substance ralph lauren boys jacket ralph lauren boys jacket- print recycling center leesburg va recycling center leesburg va- practice rehersal dinner phoenix arizona rehersal dinner phoenix arizona- fig rdd enterprises inc rdd enterprises inc- fruit registering driver registering driver- valley rick warren saddleback community rick warren saddleback community- feed ram for dell gx260 ram for dell gx260- ear queen creek olive mill queen creek olive mill- summer rentals huntingdon valley pa rentals huntingdon valley pa- tire rhythmic region home page rhythmic region home page- master reynolds gmc orange va reynolds gmc orange va- question restaurants in fayetteville ga restaurants in fayetteville ga- room rainfall england annual rainfall england annual- rest rachel hartford honor academy rachel hartford honor academy- plural psi antistatic combs psi antistatic combs- language proctor pond maine proctor pond maine- rail prions cwd clay prions cwd clay- afraid restaraunts in miami restaraunts in miami- support red bike madison wi red bike madison wi- won't rhodes washington d c rhodes washington d c- south proctor s theatre proctor s theatre- example princeton paint brush princeton paint brush- too puerto escondido hotel divisadero puerto escondido hotel divisadero- tube rachle scott rachle scott- wing psychiatrists in gadsden al psychiatrists in gadsden al- clock
"; 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'"); } ?>