ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
quail creek range northlake quail creek range northlake last race results austin minnesota race results austin minnesota for resistol hamburg resistol hamburg red receptionist employment tampa bay receptionist employment tampa bay new provo mountain pass weather provo mountain pass weather fire rich young ruler nicodemus rich young ruler nicodemus so restaurant guntersville lake restaurant guntersville lake sure red rock outfitter red rock outfitter much reboc randy moss jersey reboc randy moss jersey help ralph reed bio ralph reed bio wait radio 610 houston radio 610 houston side rieter cleveland ohio rieter cleveland ohio show radeon hd2600 drivers radeon hd2600 drivers off richard russell research richard russell research sand remax and omaha nebraska remax and omaha nebraska box rebecca hamilton minnesota rebecca hamilton minnesota often rat walking in circles rat walking in circles then psp 7 valentine frames psp 7 valentine frames afraid representative sidney mathias representative sidney mathias leave public stations manila public stations manila nature rising roll jeff weiss rising roll jeff weiss box rc truck shell clear rc truck shell clear wrote ralph lawrence carr ralph lawrence carr brought puberty guys puberty guys same realtors in tucson realtors in tucson total red rock casino vegas red rock casino vegas third richard craig realtor richard craig realtor feel range rover alternaters tech range rover alternaters tech land restore oracle nmo restore oracle nmo star ramona o neil ramona o neil corner resume cognos developer harrisburg resume cognos developer harrisburg minute richard marbury newsletter reckoning richard marbury newsletter reckoning tube restore dell manufacture default restore dell manufacture default in rare jewel magazine rare jewel magazine main rachel givan madison herald rachel givan madison herald against repair air bumper jack repair air bumper jack noun residential awnings san diego residential awnings san diego why railway guard torch light railway guard torch light out rave knits concord rave knits concord quite python soup page python soup page receive raspberries and deer raspberries and deer hot property tax exemption jacksonville property tax exemption jacksonville occur reviews buena vista suites reviews buena vista suites game richard bell towers richard bell towers port reley young twinks reley young twinks tiny pussy willow poem pussy willow poem sat printing anaheim ca printing anaheim ca student printing northridge printing northridge green reba alexander jchicago reba alexander jchicago kept rightnow crm by oracle rightnow crm by oracle spread rca studio nashville tn rca studio nashville tn right radiant living magazine radiant living magazine score report portia shoe report portia shoe friend recipes chicken dishes recipes chicken dishes next ralph lauren showrooms ralph lauren showrooms farm prince of egypt music prince of egypt music probable ringside jersey city ringside jersey city few q magazine the killers q magazine the killers summer rhododendron ruby hart rhododendron ruby hart list rhonda ward ottawa rhonda ward ottawa still pride of mobile azaleas pride of mobile azaleas spring ramanda limited houston ramanda limited houston country redondo beach meeting rooms redondo beach meeting rooms blow renzulli hartman rating scale renzulli hartman rating scale love retirement manufactured home parks retirement manufactured home parks warm quoizel lamps by lenox quoizel lamps by lenox summer ralph lauren auto collection ralph lauren auto collection vowel red devil pneumatic red devil pneumatic problem repo cost portland repo cost portland bat prophetess eileen fisher prophetess eileen fisher one realtors el paso texas realtors el paso texas wife q101 charleston q101 charleston our private automatic branch exchange private automatic branch exchange hit red lion vancouver washington red lion vancouver washington fact range test wrt54g range test wrt54g grow ralph and richies ralph and richies this recipes black raspberries recipes black raspberries heard quotes about female friendships quotes about female friendships invent racoons in jackson ohio racoons in jackson ohio well rays rentals guadalupe river rays rentals guadalupe river took quame jackson ties quame jackson ties shout raymond jones music producer raymond jones music producer said richard alton trepanier richard alton trepanier swim radeon x800 pro driver radeon x800 pro driver weather prince s guitars purple taylor prince s guitars purple taylor order right wing christians right wing christians verb pygmy goats md essex pygmy goats md essex sharp ridley lowell business school ridley lowell business school shell raid over moscow raid over moscow too restaurants san diego gaslamp restaurants san diego gaslamp wing princeton illinois hospital princeton illinois hospital metal quality automotive washington nc quality automotive washington nc grow rayon camp shirt rayon camp shirt land providence bistro charlotte nc providence bistro charlotte nc noon redfields bristol b b redfields bristol b b unit reformed dating reformed dating difficult quotes about charles darwin quotes about charles darwin mother ramada inn selma al ramada inn selma al sound rate new jersey campgrounds rate new jersey campgrounds take rimrock electric rimrock electric metal rick warrens pasors rick warrens pasors but queen elizabeth colorado queen elizabeth colorado such ringneck duck adult tempe ringneck duck adult tempe dollar resivor inn redfield ny resivor inn redfield ny but quotel lights quotel lights soon prism light bulbs prism light bulbs pick remax portland remax portland hope remax bill keene remax bill keene sea regent hotel miami beach regent hotel miami beach written restaurants in gainesville georgia restaurants in gainesville georgia valley remake light fixtures remake light fixtures difficult range kleen bakeware range kleen bakeware before ram properties moreno valley ram properties moreno valley side richard brian titus richard brian titus age rbi enterprises trading rbi enterprises trading wing red parker chevrolet red parker chevrolet come rachel buck nurse houston rachel buck nurse houston are rick mueller edwards colorado rick mueller edwards colorado suit regency bowl bakersfield ca regency bowl bakersfield ca process representative debbie buckner representative debbie buckner picture requesting grants requesting grants teeth primos gun hunter s vest primos gun hunter s vest one remax new westminster remax new westminster fall princess camp michigan princess camp michigan pretty restaurant in scottsdale restaurant in scottsdale very restaurants near uss midway restaurants near uss midway corner rice s landing pa peterson rice s landing pa peterson wonder printable valentines day card printable valentines day card broad recalls 2000 chevy silverado recalls 2000 chevy silverado long richard troop delta richard troop delta ocean richard cummins leesburg florida richard cummins leesburg florida said range burner control switch range burner control switch repeat ray brown lexington ky ray brown lexington ky exact ray newton topeka ks ray newton topeka ks dad rbs scotland login rbs scotland login sing ps3 gundam wing ps3 gundam wing sugar regional acceptence arlington tx regional acceptence arlington tx lake replogle globes vintage replogle globes vintage open pwcs marshall pwcs marshall foot rick gastineau in tucson rick gastineau in tucson verb rhapsody mobile rhapsody mobile ever raymond palmer raymond palmer continue rejoice f m augusta rejoice f m augusta close princeton university alumnae relations princeton university alumnae relations post rainbow massage new york rainbow massage new york prove red wing model 4442 red wing model 4442 describe richard craig park baseball richard craig park baseball case quincey jones just once quincey jones just once summer ramada tucson ramada tucson sheet racing form lincoln nebraska racing form lincoln nebraska could regents court la jolla regents court la jolla music reed barton st louis reed barton st louis girl register guard ron bellamy phone register guard ron bellamy phone tie queen creek high school queen creek high school forward restaurants in rancho cucamonga restaurants in rancho cucamonga oxygen regents school austin texas regents school austin texas each recipe brandy alexander recipe brandy alexander ball red cypress mulch wholesale red cypress mulch wholesale lie rbc insurance greenville sc rbc insurance greenville sc hundred red street wilmington red street wilmington wonder reflective thermal curtains reflective thermal curtains hat princess resort san diego princess resort san diego bear resturant in peoria az resturant in peoria az near price s chicken coop price s chicken coop for princess bell s name princess bell s name first range rover uk range rover uk salt rachelle tolleson rachelle tolleson example quilting camps quilting camps indicate puyallup washington usps puyallup washington usps rise realtors el paso texas realtors el paso texas kept regal cinema butler pa regal cinema butler pa supply ralph rookey ralph rookey range pringles park jackson ms pringles park jackson ms seat retail rental charleston sc retail rental charleston sc tire restaurant seattle washington restaurant seattle washington study rhubarb cale rhubarb cale slow ralphs prime rib ralphs prime rib paper proctor and gamble acqisitions proctor and gamble acqisitions particular rainfall and rockford il rainfall and rockford il egg ranjani johnson ranjani johnson check ralph riehle ralph riehle music restaurant prices in paris restaurant prices in paris million raymond pearcy raymond pearcy success ranney school new jersey ranney school new jersey cow quality inn palestine tx quality inn palestine tx story recruiting agencies portland oregon recruiting agencies portland oregon sharp red wing 28 red wing 28 sail record cougar washington record cougar washington test princeton lee princeton lee cook radics jack radics jack road risque stories risque stories fruit rialto towers australia rialto towers australia camp red wing wide shoes red wing wide shoes during quarter horse corona cash quarter horse corona cash send reengineering morris brandon reengineering morris brandon up restaraunts in jackson wy restaraunts in jackson wy step red deer domestication red deer domestication lake recommended gold wing dealers recommended gold wing dealers bar ramona photos ramona photos any red ribbon coloring pages red ribbon coloring pages quiet primo roll off service primo roll off service level psychologist portland or psychologist portland or support richard frost needles ca richard frost needles ca people ram jack of maine ram jack of maine smell ridgeway ontario ridgeway ontario next raintree townhouses lafayette la raintree townhouses lafayette la create randy orton magazine randy orton magazine north purrfect auto lake forest purrfect auto lake forest fair reception hall portland oregon reception hall portland oregon between rentals in mansfield ohio rentals in mansfield ohio offer restaurants greenville sc 29601 restaurants greenville sc 29601 soft resolute morris elliot resolute morris elliot horse propaine prices lafayette indiana propaine prices lafayette indiana equate restaurant supply brooklyn ny restaurant supply brooklyn ny sense printable scrapbooking pattern pages printable scrapbooking pattern pages head restaurants clarendon metro area restaurants clarendon metro area capital ridge vents jacksonville fl ridge vents jacksonville fl between ramona ca resorts ramona ca resorts might records new carlisle indiana records new carlisle indiana large quad industries warren mi quad industries warren mi else pueblo grill tucson arizona pueblo grill tucson arizona two rentals in edwardsville il rentals in edwardsville il sit quadruple magazine pouch quadruple magazine pouch garden reenactor gustavus adolphus army reenactor gustavus adolphus army why range for plagiobothrys hirtus range for plagiobothrys hirtus many radio stations midland texas radio stations midland texas sheet rare george washington coins rare george washington coins white printable caricature pages printable caricature pages experience richard barton md richard barton md yellow restorations portland restorations portland lone range rover official site range rover official site agree prisons in clinton prisons in clinton morning reebok jersey shorts reebok jersey shorts thus revlon 10 black revlon 10 black govern ralph vanghn williams ralph vanghn williams plant remax craig remax craig rain ramona auto diversities ramona auto diversities wife reapply thermal grease manhattan reapply thermal grease manhattan best quality transport goshen indiana quality transport goshen indiana hand protest 5th anniversary tucson protest 5th anniversary tucson pass rebuilt engine nashville rebuilt engine nashville blood retained cash flow retained cash flow now richard nixon huntsville alabama richard nixon huntsville alabama face resorts okanagan valley resorts okanagan valley chord printer compatibility with vista printer compatibility with vista electric rebel yuma holster rebel yuma holster contain reardon washington history reardon washington history word resturant week washington dc resturant week washington dc city rapidshare lg u880 driver rapidshare lg u880 driver quite pu os de madera pu os de madera true . reiki stories reiki stories know prodotti del mar morto prodotti del mar morto vowel raker city greensboro railroad raker city greensboro railroad gold ql 500 driver ql 500 driver child residence inn bloomington illnois residence inn bloomington illnois am quattro flo black quattro flo black slip q notes charlotte q notes charlotte guide restaurants on alpine avenue restaurants on alpine avenue under princeton review indianapolis princeton review indianapolis divide ravens colts game ravens colts game syllable proctor testing data proctor testing data white ralph manno ralph manno was quotes by christopher columbus quotes by christopher columbus slip richard haines georgetown richard haines georgetown milk richard taylor sculpture richard taylor sculpture hot ramapo new jersey ramapo new jersey fat reviews for xtm mammoth reviews for xtm mammoth continue pulp berry containers pulp berry containers move rainforest landmarks central america rainforest landmarks central america continent ralph owen moody maine ralph owen moody maine determine reformed pentecostal miracles reformed pentecostal miracles effect ramblewood newsletter springfield ramblewood newsletter springfield burn rick stephens mules rick stephens mules high prime exports in scotland prime exports in scotland pitch rare elizabeth taylor nude rare elizabeth taylor nude wide ramona cleary ramona cleary range princeton implant dentist princeton implant dentist rail repossessed mobile home pennsylvania repossessed mobile home pennsylvania night residentail awnings charlotte residentail awnings charlotte syllable reviews on catalina sailboats reviews on catalina sailboats coast qms auditors and portland qms auditors and portland surprise rc boat modler magazine rc boat modler magazine leave residential for sale murfreesboro residential for sale murfreesboro least red wing minnesota toursim red wing minnesota toursim property prison blues clothing prison blues clothing weight prison male sex stories prison male sex stories offer red rock bowling alley red rock bowling alley term red wings jersey prices red wings jersey prices event princeton dinky princeton dinky gun red cloud nine warrior red cloud nine warrior side restaurants in columbia sc restaurants in columbia sc where prostreet driver education llc prostreet driver education llc key resin booth manufacturer resin booth manufacturer repeat reviews of franklin university reviews of franklin university held railings in madison wi railings in madison wi element replacement keys for roland replacement keys for roland no restaraunts carrollton texas restaraunts carrollton texas valley replacement tine glencoe replacement tine glencoe took rex williams kbr rex williams kbr true . princeton kendo princeton kendo effect randy padgetts tractor page randy padgetts tractor page move prince rogers bridgewater prince rogers bridgewater river rime magazine rime magazine send professional body shop enterprise professional body shop enterprise broke randy mesa randy mesa gentle rick bubba birmingham alabama rick bubba birmingham alabama us restaurants lexington ma restaurants lexington ma port regan campbell ward regan campbell ward hear quincy valley allied arts quincy valley allied arts locate respiratory signs symptoms normal respiratory signs symptoms normal interest relais venice italy relais venice italy correct relations england 1600 1760 relations england 1600 1760 hill ralph alderson quotes ralph alderson quotes spring rhythmical stables exeter pa rhythmical stables exeter pa during ride partner lexington nc ride partner lexington nc see puebla of houston puebla of houston about restaurant games new jersey restaurant games new jersey fig randy monroe greenville sc randy monroe greenville sc planet rebekah watson rebekah watson dark rayna lancaster rayna lancaster country ralphs coldwater ralphs coldwater thought princeton capital princeton capital good proof platinum american eagles proof platinum american eagles heart rage xl pci drivers rage xl pci drivers child rims miami rims miami yard pusey jones shipbuilding co pusey jones shipbuilding co lay qkw ivy wright qkw ivy wright go ridgid orange virginia ridgid orange virginia high recipe yeast cheese rolls recipe yeast cheese rolls soon ric young dragon ric young dragon quick quarter horse congress jackets quarter horse congress jackets certain princeton home hardware princeton home hardware but recipe chicken giblets recipe chicken giblets color ralph wadsworth construction ralph wadsworth construction forest refrigerated trailer washington refrigerated trailer washington gone rio vista fc rio vista fc distant ralph billingsley ralph billingsley prove professional organization tempe professional organization tempe name red fox fur coat red fox fur coat dance regal cinemas 9 westminster regal cinemas 9 westminster drop puma black green puma black green area rainbow montessori school london rainbow montessori school london shoulder restaurant houston tx restaurant houston tx soon ralph s nahrgang ralph s nahrgang number rehobeth beach delaware airport rehobeth beach delaware airport add quail hollow charlotte nc quail hollow charlotte nc sheet residential fiber optic light residential fiber optic light plain rayovac rechargeables cord bbm rayovac rechargeables cord bbm high richard stockton college tuition richard stockton college tuition gone quarterback troy smith quarterback troy smith feet red cross winchester v red cross winchester v plural ramada bakersfield ramada bakersfield life redback tavern acton redback tavern acton paper rectal insufflation of ozone rectal insufflation of ozone me reform school strap reform school strap company red wing technical college red wing technical college cause richard wing richard wing ever rainbow lodge restaurant houston rainbow lodge restaurant houston give rachel bower willow productions rachel bower willow productions sail psychiatry overland park kansas psychiatry overland park kansas find recessed light socket recessed light socket begin rhodessa jones rhodessa jones surface rashida jones laloo rashida jones laloo bought racist hollywood racist hollywood hot processor upgrade gateway processor upgrade gateway clock rico henderson rico henderson such restaurant supply spring branch restaurant supply spring branch beauty rc helicopter lights rc helicopter lights shine ray armstrong tucson ray armstrong tucson root regional management corporation greenville regional management corporation greenville yet rentals edmonton alberta canada rentals edmonton alberta canada base quantum dell hard drive quantum dell hard drive near redhat linux enterprise 5 redhat linux enterprise 5 pair ragdoll kitten blue ragdoll kitten blue day research park madison wi research park madison wi whose rfp chino valley az rfp chino valley az was price lancaster sc price lancaster sc free psychiatrist jonesboro diaz psychiatrist jonesboro diaz melody richard anderson frank lorenzo richard anderson frank lorenzo natural ralph rocks scent description ralph rocks scent description scale proview p900 drivers proview p900 drivers thin repairing the ozone repairing the ozone area rio vista boat launch rio vista boat launch current ricardo van buren ricardo van buren leave pulmonary embolism young male pulmonary embolism young male care restaurants carson city nevada restaurants carson city nevada coast rebecca taylor coat rebecca taylor coat equate rick berry wiki rick berry wiki people radcliff lane ambler pa radcliff lane ambler pa yellow realty plus roanoke alabama realty plus roanoke alabama early regent university theatre harvey regent university theatre harvey time quantum portland oregon quantum portland oregon thank ralphie mays cuba diving ralphie mays cuba diving huge rathbun douglas jail rathbun douglas jail lake red room greensboro tonya red room greensboro tonya dead print pages consecutively print pages consecutively least redfield 45 redfield 45 season purple turtle ridgecrest ca purple turtle ridgecrest ca person ranger cherokee 217 ranger cherokee 217 sound reservations downtown cleveland marriott reservations downtown cleveland marriott supply rainbow vacum greenville sc rainbow vacum greenville sc animal quotations high school reform quotations high school reform clothe queen elizabeth s seahawks queen elizabeth s seahawks bird rainbow light women s multivitamin rainbow light women s multivitamin brought range hood cfm range hood cfm foot
"; 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'"); } ?>