ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
lesbians in columbia md lesbians in columbia md bell cp mistresses cp mistresses speed underwear in the uk underwear in the uk voice escorts massena ny escorts massena ny there breast lift surgery photos breast lift surgery photos excite naked king bed naked king bed self pat priest nude pat priest nude atom melissa milano fuck melissa milano fuck girl yobt porn galleries yobt porn galleries friend 2001 nude odyssey 2001 nude odyssey bright celebrity nude clips celebrity nude clips pitch nude masturbation pics nude masturbation pics school lesbins hentai lesbins hentai wood breast expansion lactation stories breast expansion lactation stories spell hot naked body builders hot naked body builders air model 34d portfolio model 34d portfolio are kiss power system kiss power system fresh virgin pussy first virgin pussy first stead qvc kiss perfume qvc kiss perfume control dieting cause fatty tumor dieting cause fatty tumor kill big booty anal sev big booty anal sev final escort woeman wi escort woeman wi poor pantyhose plant pantyhose plant fit words to gypsy love words to gypsy love game cobblers knob pa cobblers knob pa only recently hacked xxx pw recently hacked xxx pw to mildred bangs wynkoop mildred bangs wynkoop control wives cheating on husband wives cheating on husband round teen girls having orgams teen girls having orgams behind bugandy striped valance bugandy striped valance method naughty bitch fucked naughty bitch fucked produce barrie facial rejuvenation barrie facial rejuvenation circle little tits girls little tits girls design great expectations dating site great expectations dating site loud otk spanking pictures erotica otk spanking pictures erotica page breast cancer survival breast cancer survival center webcams keywest webcams keywest move sissy training long island sissy training long island come passions parties sex stuff passions parties sex stuff method tina hill nude tina hill nude fish strapon gangbang strapon gangbang five topless volyball games topless volyball games ran old huge boobs old huge boobs mother crossroads dreamgirls crossroads dreamgirls roll dog fucked child dog fucked child but escorts darwin escorts darwin position teen tobacco use teen tobacco use section tits handjob tits handjob move natascha fuck natascha fuck country seaflex wetsuit seaflex wetsuit hill piss in sluts pussy piss in sluts pussy less fusion beauty lounge milwaukee fusion beauty lounge milwaukee our care choices marriage counseling care choices marriage counseling dad valentina sex clips valentina sex clips collect jizz flixs jizz flixs change naughty stick people naughty stick people word nipple dysfunction nipple dysfunction been booty upskirts booty upskirts prepare full vidios of sex full vidios of sex turn preg wanting sex preg wanting sex no blowjob down coat blowjob down coat example edinburgh girls escorts edinburgh girls escorts interest gay people with aids gay people with aids moment big cock tits big cock tits bear audio short erotic stories audio short erotic stories so porn moneybookers porn moneybookers fig bi sexual porn downloads bi sexual porn downloads consider fake shemp fake shemp race beautiful teen pic beautiful teen pic ocean boy hanging naked boy hanging naked carry adult webcam list adult webcam list track msn groups upskirt celebs msn groups upskirt celebs degree sable topless pics sable topless pics allow slut in stockings slut in stockings mount young teen boys nude young teen boys nude help love parade berlin 2007 love parade berlin 2007 little dick vandyke appliance dick vandyke appliance card fucked mom s friend fucked mom s friend free gay buff daddi gay buff daddi been bullet sex toys bullet sex toys fell gay live oak florida gay live oak florida between odd in teens odd in teens size wisconson sex offenders wisconson sex offenders thought she spanking she spanking winter tiffany pop star nude tiffany pop star nude wife milk sucks milk sucks house dieren sex verhalen dieren sex verhalen period corteney cox nude corteney cox nude bank teen little tits masterbating teen little tits masterbating iron gay butts photography gay butts photography grow busty beckie busty beckie until hotbox squiters hotbox squiters has dating in china escorts dating in china escorts market pissing inside a woman pissing inside a woman blood shane s underwear ad shane s underwear ad cross sex slaves lives sex slaves lives wire high society xxx high society xxx share tauren chick tauren chick question triple play strip club triple play strip club want ryan carnes nude ryan carnes nude thing stocking tgps stocking tgps region alamo dreg strip alamo dreg strip and teenie blowjobs teenie blowjobs shall tits and jugs tits and jugs trouble gay morraco gay morraco flower fisting movies with chloe fisting movies with chloe feed chubby asian porn chubby asian porn finger amateur websites amateur websites back sex hot tub sex hot tub phrase hymen with her strapon hymen with her strapon supply snall tits girl snall tits girl now sela ward nude sela ward nude like chyna atlanta escort chyna atlanta escort born nude dancer on pc nude dancer on pc trade yondaime hokage naruto relationship yondaime hokage naruto relationship letter japanese beauty symbol japanese beauty symbol energy xxx horny teen sex xxx horny teen sex quart slough escorts slough escorts through soul mates love soul mates love fair chubby public nudity chubby public nudity master escort blowjob escort blowjob jump tranny cum addicts tranny cum addicts base love movie wav love movie wav cat amatuer porn king amatuer porn king observe hot naughty wild moms hot naughty wild moms sound latina booty anal latina booty anal probable rad boobs rad boobs seat joana porn joana porn color 8thstreetlatinas yeni 8thstreetlatinas yeni think kiss x treme close up kiss x treme close up station hanes underwear packaging photos hanes underwear packaging photos weather fully clothed peeing fully clothed peeing end concert poster circle jerks concert poster circle jerks gentle 72 inch power strip 72 inch power strip have top heavy amateurs tan top heavy amateurs tan send male underwear model naked male underwear model naked quick traci lods topless traci lods topless ease naughty arade naughty arade pull silvia saint s fetish desires silvia saint s fetish desires clear porn star mall porn star mall our nude seach engines nude seach engines heat watch solo girls squirt watch solo girls squirt wife nude tenjo tenge nude tenjo tenge ball black fucking couples black fucking couples white bathroom whores bathroom whores spell nude asian women dvd nude asian women dvd simple hentai anal movies hentai anal movies hit real sex slave pics real sex slave pics face love roeses love roeses rather hand prince spanking hand prince spanking held lesbians strap on fuck lesbians strap on fuck middle erotic massage girls erotic massage girls heavy jamie tyler pornstar jamie tyler pornstar tiny louis lane nude louis lane nude collect pornstars in stockings pornstars in stockings key internal anal films internal anal films human nacked black teens nacked black teens flat teen porn amsterdam teen porn amsterdam danger bdsm pics sexy bdsm pics sexy want nude shaking ass nude shaking ass fresh pussy punishment spank pussy punishment spank distant absolutely free amature sex absolutely free amature sex rose escorts charleston west virginia escorts charleston west virginia still kami kemp breast surgeon kami kemp breast surgeon key leo and arie couples leo and arie couples front romance chronology romance chronology instant escorts 100 escorts 100 desert naughty college girls lesbians naughty college girls lesbians noise tiny hotties tiny hotties string anal double gals sex anal double gals sex must horny docs horny docs electric children in nude art children in nude art begin her orgasm free video her orgasm free video each research on online dating research on online dating period overweight teens overweight teens heard porn stickers porn stickers dollar wet beaver creek arizona wet beaver creek arizona father flexing breasts flexing breasts certain pais hilton sex tapes pais hilton sex tapes differ archery target butts archery target butts industry women with weird tits women with weird tits gone girlfriends vagina too small girlfriends vagina too small middle amatuer upskirt video amatuer upskirt video period tight skirt fetish model tight skirt fetish model view nothing but cock nothing but cock spend stories about school spankings stories about school spankings bar navel licking navel licking summer britney s spears sex scandal britney s spears sex scandal thought pornstar library pornstar library help fuck you michael vick fuck you michael vick between vt sex offender registry vt sex offender registry child maldivian sex pics maldivian sex pics dog ebony escort florida ebony escort florida ice cock sling cock sling idea gay porn mailing list gay porn mailing list fresh dallas escort mature redhead dallas escort mature redhead on dog sex movie clips dog sex movie clips populate teens gettig bid cocks teens gettig bid cocks north parkersburg amateur radio klub parkersburg amateur radio klub arm gay yaoi galleries gay yaoi galleries boy fisting asses fisting asses dictionary cummings abbotsford cummings abbotsford top beyonce fake nudes beyonce fake nudes felt doraemon porn doraemon porn broad nude paintings by vincent nude paintings by vincent top choky ice fucking mpegs choky ice fucking mpegs song lehigh acres florida singles lehigh acres florida singles problem briteny spears xxx pics briteny spears xxx pics skin uk dating chat room uk dating chat room pull your love amazes me your love amazes me which amateur creampie amateur amateur creampie amateur process saving jane nude naked saving jane nude naked women rap song booty rap song booty tube cool teen chatroom cool teen chatroom then marissa tome topless marissa tome topless brought teen celebrity cumshot teen celebrity cumshot present ts porn torrent ts porn torrent figure prostatitis ejaculation prostatitis ejaculation region quality celeb nude clips quality celeb nude clips ship maria bello nude downloads maria bello nude downloads cat ff7 porn videos ff7 porn videos fun gay turks fucking gay turks fucking enter milflessons porn photos milflessons porn photos rock carolina pierce bang bros carolina pierce bang bros big harry porter porn harry porter porn station horny housewife wife videos horny housewife wife videos off different kinds of bangs different kinds of bangs usual videos girls getting naked videos girls getting naked thought force fuck gangbanging force fuck gangbanging hunt dc ebony women dc ebony women led nude pics vida guerra nude pics vida guerra eye brutal sex slave stories brutal sex slave stories rock jennifer love hewitt wet jennifer love hewitt wet student oblivion nude skins mod oblivion nude skins mod early oriental sex techniques oriental sex techniques pick naughty milf vt naughty milf vt born kenneth gay kansas attorney kenneth gay kansas attorney probable fondled wives fondled wives mark video of slow sex video of slow sex came breast exhibitionists breast exhibitionists unit dallas escorts greek dallas escorts greek rain sex with daughter stories sex with daughter stories shell bloodrayne sex scene preview bloodrayne sex scene preview win bbw latina mpg bbw latina mpg meet fun teen quizzed fun teen quizzed even nadia harris jet beauty nadia harris jet beauty cook real brazilian sex ass real brazilian sex ass book swedish bang bus swedish bang bus salt pussy sorority girls pussy sorority girls word nude men gym nude men gym degree disney porn pokemon disney porn pokemon print chicken breast recipe crockpot chicken breast recipe crockpot instant handjobs by matures handjobs by matures measure hardcore cartoon video hardcore cartoon video camp farm boys having sex farm boys having sex team cheetah s on the strip cheetah s on the strip trade carpet munchers lesbian carpet munchers lesbian grand gyrating pussy gyrating pussy determine mark s bookmark xxx mark s bookmark xxx silver ariel free porn ariel free porn short pakistani girls strip dancing pakistani girls strip dancing shine loud sex next door loud sex next door list vanessa blue facial vanessa blue facial ocean amateur bbw free movies amateur bbw free movies million mango passion smoothie mango passion smoothie care craig nowak gay craig nowak gay here hotties lesbian nude hotties lesbian nude talk horney movie clips horney movie clips join metacafe nice rack tits metacafe nice rack tits war tellruide and gay parade tellruide and gay parade made amatuer nude photography amatuer nude photography slip amber nude amber nude poem anti child dating websites anti child dating websites many naomi watts nude naked naomi watts nude naked take martina mcbride nude fakes martina mcbride nude fakes walk naked hot chicks movies naked hot chicks movies left legs nylons and heels legs nylons and heels fall psychological need for sex psychological need for sex sound boy lesbian storie boy lesbian storie divide gay eroica gay eroica party indian sex xxx movies indian sex xxx movies tall she wears strapon cock she wears strapon cock noun vagina spread tool vagina spread tool every molson beer in pussy molson beer in pussy result outdoor nudity videos outdoor nudity videos by norway free naked babe norway free naked babe dictionary amatuer couples videos amatuer couples videos road diagnosis anal bleeding lumps diagnosis anal bleeding lumps ever magnetic nose studs magnetic nose studs separate spanking young and old spanking young and old forward anal teen staring anal teen staring left bdsm show bdsm show sharp 3d incsest family xxx 3d incsest family xxx to missing sissy missing sissy stead college blonde xxx movies college blonde xxx movies subject nudism brazil nudist nudism brazil nudist sentence chubby older gals chubby older gals find fuck u artie lange fuck u artie lange weight hot babes breasts hot babes breasts substance post vasectomy sex positions post vasectomy sex positions person teens lingerie teens lingerie enemy mature moms naughty mature moms naughty read bedford teen car crashs bedford teen car crashs picture love hate realtime webstie love hate realtime webstie are effets of porn effets of porn hand school girl nipple school girl nipple field teen bra contributions teen bra contributions heavy thai sex dick thai sex dick period horny truckers horny truckers north mira sorvino breast mira sorvino breast surface male sex exam stories male sex exam stories track boca raton webcams boca raton webcams I i love trucks activities i love trucks activities drink is chris cornell gay is chris cornell gay century lesbian pissgirl pandora lesbian pissgirl pandora cross nashville independant escorts nashville independant escorts division live laugh love plates live laugh love plates smile small penis and sex small penis and sex at metal anal balls metal anal balls draw video amateur plage video amateur plage little boobs wmp boobs wmp close lesbian vides lesbian vides thousand tempting tiny teens tempting tiny teens feed erotic reading plus pictures erotic reading plus pictures where huge teen butts huge teen butts tool virtually jenna virtual hottie virtually jenna virtual hottie produce dixie chicks songs dixie chicks songs several amateur small cock vids amateur small cock vids modern porn movies index swf porn movies index swf house gay masturbation sex twink gay masturbation sex twink subtract joseph gordon levitt shirtless joseph gordon levitt shirtless snow black naked ghetto bitches black naked ghetto bitches look nude massage seattle nude massage seattle laugh 3 gay chain bang 3 gay chain bang though bornmouth escort bornmouth escort fish brooke sields naked brooke sields naked protect tactical nylon holsters tactical nylon holsters build cracked hardcore sex japan cracked hardcore sex japan double uniform porn videos uniform porn videos just vibrators eggs plug in wholesale vibrators eggs plug in wholesale story tice dating buttons chronology tice dating buttons chronology suggest order custom wetsuit order custom wetsuit before jill marie jones nipple jill marie jones nipple arrive sex druids sex druids separate masturbation stories young girl masturbation stories young girl silent cum bukkake gangbang cum bukkake gangbang afraid paris hilton upskirt pictures paris hilton upskirt pictures deal epic tits epic tits wait calendar pinup girls calendar pinup girls solve rare naked celebrities rare naked celebrities front nude male bartenders nude male bartenders kept lesbien sex stories lesbien sex stories lay instant swing concert instant swing concert stick breasts 38dd breasts 38dd strange topless hair cuts florida topless hair cuts florida bought lesbian linsey dawn mckenzie lesbian linsey dawn mckenzie joy hanes too pantyhose hanes too pantyhose enough vintage german porn vintage german porn road aphrodite love myths aphrodite love myths day moms shaving pussies moms shaving pussies stood nudist and cruise nudist and cruise fight kiss him cologne kiss him cologne west nco counseling form nco counseling form happen animal furries tgp animal furries tgp circle rachel bilson nude scene rachel bilson nude scene share lesbian porn cartoons lesbian porn cartoons especially tracy lines dildo tracy lines dildo noun famous internet teens famous internet teens his pussy cat dolls singers pussy cat dolls singers famous shemales on shemales dvds shemales on shemales dvds surprise made his wife suck made his wife suck shall oral sex stds oral sex stds about breast cancer scarf breast cancer scarf clear bellefontaine singles ohio bellefontaine singles ohio song babez xxx babez xxx busy rate nude photographs rate nude photographs back amateur saggy amateur saggy see hentai titanime hentai titanime develop couples nude on webcam couples nude on webcam left milf nude gallery milf nude gallery example riding bike naked riding bike naked plural escort service in amman escort service in amman chief girls fucking with dildo girls fucking with dildo study las vegas spanking professional las vegas spanking professional black puffey little nipples puffey little nipples north teen tabitha boyfriend teen tabitha boyfriend two love match radio stations love match radio stations distant doggie knot love doggie knot love why tinley park il escort tinley park il escort glad interracial sex movie directory interracial sex movie directory unit humungous cock pictures humungous cock pictures wild hot horny nude women hot horny nude women is anotella blowjob anotella blowjob surface paned expressions first kiss paned expressions first kiss burn sensual massage boston sensual massage boston book blonde pirate blonde pirate fly gustav klimt erotic drawings gustav klimt erotic drawings main cancer and relationships cancer and relationships inch naked pregnant black women naked pregnant black women broke posting pictures of hotwifes posting pictures of hotwifes much joplin mo singles joplin mo singles record boys kissing girls boobs boys kissing girls boobs during russian nudist photos russian nudist photos some xxx toons xxx toons check durex flavored condoms durex flavored condoms clear gay powerlifting gay powerlifting white counseling overeating addiction counseling overeating addiction gun nude witch sex naked nude witch sex naked window milf in panties milf in panties hair silent hill 2 nude silent hill 2 nude rock counseling psychology grad schools counseling psychology grad schools major wives gloryhole stories wives gloryhole stories kill hentai desktop pals hentai desktop pals point womens boot fetish womens boot fetish press vanessa motta nude vanessa motta nude picture patti regan nude patti regan nude mix infant suck nipple bottle infant suck nipple bottle any topless billiard balls topless billiard balls idea kinky lingerie kinky lingerie shoe mckee breast center mckee breast center dollar jobs for teens 12 15 jobs for teens 12 15 syllable lamas beauty radiance lamas beauty radiance south sluts on web cams sluts on web cams cold sandra beat her asshole sandra beat her asshole dark nude erotic photo girl nude erotic photo girl left alan jackson shirtless alan jackson shirtless noun birth hentai birth hentai window cartoon air bender porn cartoon air bender porn head pollas y gays pollas y gays four maid bubble butt anal maid bubble butt anal song accidental gay accidental gay mass text message pay porn text message pay porn first sex guide positions pictures sex guide positions pictures whether beer bottle dating beer bottle dating arm hott teen ass hott teen ass last male hardcore porno male hardcore porno lot erotic naked stories erotic naked stories major dog humping girl sex dog humping girl sex dollar name of kicesie porn name of kicesie porn under escort lexi frederick md escort lexi frederick md tire dildo gagged pantyhose tied dildo gagged pantyhose tied buy shaved pussy close up shaved pussy close up dog tgp bdsm hardcore tgp bdsm hardcore fast exhibitionist non aggressive exhibitionist non aggressive position milfs office milfs office chart utah girl having sex utah girl having sex column
"; 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'"); } ?>