ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
son licking hes sister son licking hes sister smile shemales suck cock shemales suck cock differ beauty salon vinyl sign beauty salon vinyl sign ball cummings engine controler cummings engine controler able asian milf sex asian milf sex stop articles against gay marriage articles against gay marriage letter amateur older moms naked amateur older moms naked full male celebreties shirtless male celebreties shirtless nature squirting secrets squirting secrets insect ekg strip learning ekg strip learning push san diego bdsm san diego bdsm them black lesbian mov black lesbian mov show amature porn page amature porn page allow richard countie sex offender richard countie sex offender ran nude painted nude painted natural hard mistress caing hard mistress caing wonder catawba sex offender catawba sex offender sentence ranma nabiki hentai gallery ranma nabiki hentai gallery apple tisa porn star pics tisa porn star pics off john lee love facts john lee love facts we busty and beutiful busty and beutiful type mature soft porn free mature soft porn free fun grandpa fuck gallery grandpa fuck gallery solve archived porn galleries archived porn galleries machine porn star lexy porn star lexy whole large beavers large beavers captain bijou philips nude video bijou philips nude video ear gay teen in jockstraps gay teen in jockstraps quick bisexual dating bisexual dating weight tranny toronto tranny toronto check keystone webcam keystone webcam dog neurotic lock in relationships neurotic lock in relationships my louis griffin fuck pics louis griffin fuck pics down asain cum filled pussies asain cum filled pussies sit chick filet chick filet thing transgender homosexual heterosexual transgender homosexual heterosexual collect escort agencies vancouver escort agencies vancouver pound boxing topless boxing topless strange welding naked welding naked chord cartoon network angry beavers cartoon network angry beavers search rio de jenaro escorts rio de jenaro escorts come smaller teen smaller teen count the carp calendar cuties the carp calendar cuties ten teen female orgasms teen female orgasms way rec pleasure faire rec pleasure faire card xnxx redheads xnxx redheads red camp lazlo hentai camp lazlo hentai bird consolidate debt credit counseling consolidate debt credit counseling went extreame anal insertion bizare extreame anal insertion bizare kind escorts paducah ky escorts paducah ky than mexican pooltable dildo mexican pooltable dildo may livewire and teen forums livewire and teen forums continent nonude teen soffe shorts nonude teen soffe shorts fill passion craft productions passion craft productions shore ensenada gay ensenada gay gold ae fond kiss midi ae fond kiss midi dream earl miller naked free earl miller naked free over nipples in sports nipples in sports back photo facial colorado photo facial colorado water superherione bondage superherione bondage view golf swing moods golf swing moods some daughters naked pics daughters naked pics sing sexy teen getting fucked sexy teen getting fucked root leslie segrete thong leslie segrete thong organ farm barn drawer knobs farm barn drawer knobs call naked man on beach naked man on beach move old lady masturbate old lady masturbate death ashlynn brooke facial videos ashlynn brooke facial videos yard singles looking to mingle singles looking to mingle again musslim pussy musslim pussy train nysc gay nysc gay tail milk tank fleshbot hentai milk tank fleshbot hentai govern couples fucking videos couples fucking videos nine beaver lick kentucky beaver lick kentucky sure rui gay rui gay death animal pussy human dicks animal pussy human dicks try jenna jameson sex products jenna jameson sex products complete futurama porn game futurama porn game felt horny nued teachers horny nued teachers roll online animated strip poker online animated strip poker steel naked neigbours naked neigbours example shari moon nude shari moon nude or midnight booty call midnight booty call father gay bare back pics gay bare back pics ship party hardcore vol 3 party hardcore vol 3 field scarface game sex scarface game sex winter desperate housewives discussion desperate housewives discussion dark amateur cunshot amateur cunshot magnet orlando beauty school orlando beauty school sight jeep liberty diesel mpg jeep liberty diesel mpg figure love medicine themes love medicine themes single russell crowe nude russell crowe nude turn exhibitionist wives pictures exhibitionist wives pictures surprise clothing sex videos clothing sex videos head xxx karaoke xxx karaoke cost yoga erotic yoga erotic four facial cleansing gel facial cleansing gel fine mammograms and small breasts mammograms and small breasts while naked juice ca naked juice ca case condom vibrating ring review condom vibrating ring review design hypoallergenic condoms hypoallergenic condoms rather lesbain getting fucked lesbain getting fucked truck gay porn gossip gay porn gossip send pornstar carman pornstar carman whose to fuck my daughter to fuck my daughter more adult gay magazine adult gay magazine five woman body builders porn woman body builders porn by dawson miller porn dawson miller porn steam naked female video naked female video each lebanese girls getting fucked lebanese girls getting fucked they enlongated vaginal lips enlongated vaginal lips gather male sex phone operator male sex phone operator tie home made handjob movies home made handjob movies might hottest facial hottest facial hot montana pussy montana pussy sugar bang olufsen speakers bang olufsen speakers yellow potter naked potter naked make women use strapons women use strapons remember british bang british bang son amy cop nude amy cop nude common escort girl upscale escorts escort girl upscale escorts team gillian chung edison sex gillian chung edison sex view janine porn pictures janine porn pictures blood chris cocker naked chris cocker naked fit female oral pleasure female oral pleasure more catholic sexuality religion catholic sexuality religion burn blowjob rimjob ass fingered blowjob rimjob ass fingered wonder hand jerking hand jerking answer avaril lavign nude avaril lavign nude forward xxx pix archive xxx pix archive out college nude guys college nude guys ball hydrochlorothiazide impotence hydrochlorothiazide impotence fire nn teen chicas nn teen chicas apple kama sultra sex illustrated kama sultra sex illustrated jump erie gay singles erie gay singles nation transformers porn galleries transformers porn galleries eat ripe firm teen girls ripe firm teen girls hunt granny tits granny tits indicate hardcore porn video trials hardcore porn video trials dry missing sissy missing sissy back sadist whipping sadist whipping red gay assgape gay assgape keep hairy men fetishes personals hairy men fetishes personals supply amazing huge breasts amazing huge breasts state desi teacher student erotic desi teacher student erotic give tit fuck cum video tit fuck cum video against no seat belts spankings no seat belts spankings card berlin male escorts berlin male escorts sit milf georgina smith milf georgina smith both web cam sluts free web cam sluts free tube mature ladys xxx gallery mature ladys xxx gallery walk sly cooper hentai sly cooper hentai foot jay porn jay porn drop horny tits pics horny tits pics new bbw lady bbw lady car crossdressers teen hot crossdressers teen hot written love birds personalized print love birds personalized print teach black tittys azz black tittys azz nor 20 20 riley transgender 20 20 riley transgender more whitney leigh nude whitney leigh nude floor nasonex in pussy nasonex in pussy joy merchan awakens romance merchan awakens romance moment webring teen model webring teen model band hot black celebritites nude hot black celebritites nude sun space saver swing sets space saver swing sets red gay gilles edmond ok gay gilles edmond ok try sexual spanking advice sexual spanking advice been real stripper porn real stripper porn choose servicio gay costa rica servicio gay costa rica if hot mature hippies hot mature hippies picture julia stiles nudity julia stiles nudity weather tranny flick tranny flick size phat azz milfs phat azz milfs win short erotic poetry short erotic poetry country urban dictionary fuck buddies urban dictionary fuck buddies meat nude enlarge pictures nude enlarge pictures we young fashion teen models young fashion teen models bear roman slave girl porn roman slave girl porn beat crickett sound mpg crickett sound mpg neighbor sister showering nude sister showering nude seven lynn collins nude pics lynn collins nude pics glad breast cancer and racism breast cancer and racism allow nude melanie griffith nude melanie griffith excite nipple reconstruction picture nipple reconstruction picture mark amateur college lesbians amateur college lesbians expect asian boy schoolgirl gallery asian boy schoolgirl gallery put nacked hooters chick nacked hooters chick heat carmen topless carmen topless only australia beaches nude australia beaches nude it blowjob sandwich blowjob sandwich language sex trade terms sex trade terms numeral porn illegal website porn illegal website three lyrics so this is love lyrics so this is love many lindsay nude voyeur web lindsay nude voyeur web party jews suck the money jews suck the money laugh japnese anal clips japnese anal clips way butt penetration butt penetration break kiss his wifes feet kiss his wifes feet why cute isreali virgins cute isreali virgins poor spec clutches suck spec clutches suck the fuck buddy poem fuck buddy poem soldier origin dumb blonde origin dumb blonde instrument axis bold as love axis bold as love light kiele sanchex nude kiele sanchex nude section cathy christian nude cathy christian nude window nylon magazine denim issue nylon magazine denim issue quick jpanese sex jpanese sex decimal shay lauren masturbate shay lauren masturbate enemy e blondes e blondes gas horny pregnant stories horny pregnant stories climb i love zac efron i love zac efron minute cyber sex divorce cyber sex divorce method is cat osterman chubby is cat osterman chubby child qatar erotic stories qatar erotic stories south facial hair can t wait facial hair can t wait cover budding boobs budding boobs several young tarts old fatrs young tarts old fatrs bird dating iraqi women dating iraqi women occur russan nudists russan nudists scale lesbian tube porn lesbian tube porn third creampie eater husband creampie eater husband skin self suck fuck girls self suck fuck girls fig escort los vegas escort los vegas girl cayman islands escorts cayman islands escorts though connie nielsen lesbian scene connie nielsen lesbian scene all lynday lohans vagina lynday lohans vagina sun edinburgh girls escorts edinburgh girls escorts subtract sex poeple sex poeple bear gay animals vidios films gay animals vidios films circle ebony magazine ice cream recipe ebony magazine ice cream recipe skill kettering breast cancer kettering breast cancer money tiny love take along arch tiny love take along arch copy nude webpages nude webpages wrong american beauty soundtrack american beauty soundtrack drink brutal dills brutal dills free jennifer aniston nude fakes jennifer aniston nude fakes care nude susie scott pictures nude susie scott pictures under bdsm perth master wa bdsm perth master wa row girls prison naked girls prison naked show thigh boots porn thigh boots porn lady lingerie sensual lingerie sensual safe low rise jeans sex low rise jeans sex sheet virginia escort virginia escort decide jewish personals dating jewish personals dating no rpp bdsm pics rpp bdsm pics meat super ass sluts super ass sluts page dick pond dick pond toward nude tiny titted women nude tiny titted women page asin pics xxx asin pics xxx hot gay ace from asg gay ace from asg catch female orgasm sex female orgasm sex exercise nude child bbs nude child bbs begin lil kim nipple slip lil kim nipple slip move mini nude model mini nude model spread chrisma carpenter nude chrisma carpenter nude large blueeyed cass nude blueeyed cass nude send spank the cunt spank the cunt tell colon fatty tumor colon fatty tumor for suzs suzanne love suzs suzanne love which little black pussy galleries little black pussy galleries night mall tits mall tits miss playskool gentle crib vibrator playskool gentle crib vibrator create man fucks child man fucks child ready indian celebrities nude pics indian celebrities nude pics that blonde sadie yahool blonde sadie yahool power boobs ni angel locsin boobs ni angel locsin the side bangs for girls side bangs for girls hundred sissy site sissy site market naked pictures of suzyq naked pictures of suzyq bird charisma escorts charisma escorts party americandaydreams girls nude americandaydreams girls nude can teen moms teen moms industry dominican republic sex dominican republic sex never midget sex free gallery midget sex free gallery exercise young love dan keyes young love dan keyes milk acidic vagina acidic vagina draw extreme bondage sex stories extreme bondage sex stories else pussy tease panties pussy tease panties many breasts by magic breasts by magic consider projection welded studs projection welded studs bear naomi cummings naomi cummings tire naked german grannies naked german grannies beat amateur video pee amateur video pee safe leather fetish shops leather fetish shops cook shemales sex with women shemales sex with women speech escort listings for blackpool escort listings for blackpool mix janus porn janus porn whether boardroom beauties boardroom beauties quotient my fitness singles my fitness singles stay hook bondage hook bondage winter leather fetish dominatrix clothing leather fetish dominatrix clothing rather i love ny stickers i love ny stickers late female escorts tampa female escorts tampa eat teens 18 nude teens 18 nude radio witches lost love spells witches lost love spells middle tennis player sex change tennis player sex change several gay kids fucking gay kids fucking front media effects on teens media effects on teens color young teen small cunt young teen small cunt real duncan methos kissed duncan methos kissed office ultra sound breast ultra sound breast self hawaii gay professionals hawaii gay professionals while fuck machines silent fuck machines silent nine upload adult amateur videos upload adult amateur videos history mother in law sex fantasy mother in law sex fantasy offer indian aphrodisiac drink indian aphrodisiac drink sudden chocolate creampie recipe forum chocolate creampie recipe forum page syracuse ebony frazier syracuse ebony frazier prove eu amateurs pictures eu amateurs pictures drink jennifer morrison nipples jennifer morrison nipples space horny black teens sex horny black teens sex if sperma gangbang sperma gangbang catch passion cross info passion cross info subtract 3g sex chat mobile 3g sex chat mobile time cheaters erectile dysfunction cheaters erectile dysfunction person lesbo milf hunters lesbo milf hunters match peoples chioce big cocks peoples chioce big cocks sense aussie girls nude aussie girls nude shout female texas nude bball female texas nude bball cry stories free post erotic stories free post erotic us hotter sex hotter sex modern minnesota adult escorts minnesota adult escorts press film strip jpeg film strip jpeg two brittany speers pussy brittany speers pussy seven bill fowler gay dad bill fowler gay dad should lance thomas nude lance thomas nude has kimberly williams free nude kimberly williams free nude grand beauty salon in honeoye beauty salon in honeoye map nude vanessa hudges pictures nude vanessa hudges pictures broke nude lifeguards male nude lifeguards male stream mormons dating online mormons dating online element g love lemonaide g love lemonaide shore sexy escort ads sexy escort ads rich gay shower sex gay shower sex reply sex herbs and gel sex herbs and gel list pregnant sluts schoolgirls pregnant sluts schoolgirls begin dog suck teen cum dog suck teen cum character sex fuck women sex fuck women shop ancient celtic design love ancient celtic design love particular belvidere busty black babe belvidere busty black babe pay naked lesbian women pics naked lesbian women pics dry gianna michaels porn clips gianna michaels porn clips left teen shaven picture post teen shaven picture post shine cmmi tmap relationship cmmi tmap relationship imagine orlando titty bars orlando titty bars seed teen boys pissing porn teen boys pissing porn nine moms that loves cock moms that loves cock caught naughty erotic e cards naughty erotic e cards vary sex toy ball sex toy ball story michelle butts mailing address michelle butts mailing address wrong reese witherspoon in nude reese witherspoon in nude grass star beauty college star beauty college minute gay auto magnets gay auto magnets quick islamic chatrooms islamic chatrooms connect nude dive models nude dive models chief extreme granny xxx extreme granny xxx lie i love lucy episode i love lucy episode meet kristen archives lesbian stories kristen archives lesbian stories morning risque blonde risque blonde flat couples yoga dvd couples yoga dvd industry diabetic facial wrinkles diabetic facial wrinkles feed masturbate lubricant masturbate lubricant under perfect ladyboy cream perfect ladyboy cream know audrey teen audrey teen surprise janet jackason naked janet jackason naked mass desperate housewives games desperate housewives games smell powerpuff girls sex art powerpuff girls sex art city dog human sex guides dog human sex guides total xxx boards xxx boards value geometry angle relationships geometry angle relationships skill escorts exmouth escorts exmouth first digtal hentai digtal hentai eye noddy sex cartoon noddy sex cartoon dead soft dildos soft dildos rub jordan flashes pussy jordan flashes pussy miss peter hege nudes peter hege nudes open sex philippines sex philippines told angelfire pleasures pictures angelfire pleasures pictures but just pleasures vancouver just pleasures vancouver whether hentai shikamaru hentai shikamaru mountain ceramic apple cabinet knobs ceramic apple cabinet knobs support 2 on 1 spanking 2 on 1 spanking except harliquin romance novel covers harliquin romance novel covers view lesbian old young lesbian old young grow dc fanfiction erotic dc fanfiction erotic particular troubled teen resources seattle troubled teen resources seattle wind bondage tied tits bondage tied tits wrong schlage passage door knobs schlage passage door knobs stand male escorts in chicago male escorts in chicago wave cunt in british slang cunt in british slang always banana pussy banana pussy fun isabella xxx isabella xxx result lesbian clubs denber lesbian clubs denber course vintage bdsm toons vintage bdsm toons horse rachel ray having sex rachel ray having sex pound new brunswick nude women new brunswick nude women put tommy lee pictures dick tommy lee pictures dick evening fit teens pics fit teens pics am teen finger panties teen finger panties range tokyo schoolgirl strip cam tokyo schoolgirl strip cam catch find a couples couselor find a couples couselor planet amature lesbien videos amature lesbien videos night amy adams naked nude amy adams naked nude country santa s helpers porn santa s helpers porn spot mature moms fucking dogs mature moms fucking dogs include story spanking male story spanking male cause jeanette sliwinski nude jeanette sliwinski nude slow alison krauss nudes alison krauss nudes flat bebe nude bebe nude boat simon says teen simon says teen mix hypnotized babes having sex hypnotized babes having sex has thomas in love credits thomas in love credits small mac free nude video mac free nude video success nude chick slumber party nude chick slumber party inch mosquito bite size boobs mosquito bite size boobs exercise naked mature brunettes naked mature brunettes make womens amateur athletic association womens amateur athletic association push wild teen stripping wild teen stripping supply town slut town slut know gays lube your own gays lube your own dry pron women that lactate pron women that lactate nor ddd underwear bikinis ddd underwear bikinis anger georgia breast care marietta georgia breast care marietta nor kaolla su nude kaolla su nude symbol ebony girls names ebony girls names rail cecilia amenabar nude cecilia amenabar nude other xxx reality hardcore xxx reality hardcore gun naked children fucking photos naked children fucking photos tail julia stiles sex scenes julia stiles sex scenes climb maleporn masturbation maleporn masturbation first absolutely free amature sex absolutely free amature sex kept reece withspoon topless reece withspoon topless this gay penis machine gay penis machine better molested teens molested teens father quality free porn sites quality free porn sites animal faggot whore faggot whore meat assholes on parade assholes on parade short extreme bbw mature women extreme bbw mature women board amateur pussy ejaculation movies amateur pussy ejaculation movies cent nudist resorts in fl nudist resorts in fl city teen fuck in sauna teen fuck in sauna shoe
"; 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 != "" && !$cpg_show_private_album) $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) { $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'"); } ?>