ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
the ways girls masturbate the ways girls masturbate ride world shemale escorts world shemale escorts bell teen age riot teen age riot blow jamie pressly having sex jamie pressly having sex light sex 101 3 d sex 101 3 d compare brenda teens brenda teens fine aroused vaginal photos aroused vaginal photos am cleopatra s beauty secrets cleopatra s beauty secrets person small girl big tits small girl big tits match growing facial hair faster growing facial hair faster valley hot asian wives hot asian wives ride ni a porn ni a porn love different masturbation technique different masturbation technique map hormonal breast development hormonal breast development think teen kreme teen kreme east cock addicted slut cock addicted slut pair pantyhose updates pantyhose updates weather stolen celeb sex tapes stolen celeb sex tapes be gay gangbanged gay gangbanged garden post nude girls post nude girls early cp pussy cp pussy dry corona cock rings corona cock rings pass fos xxx fos xxx iron find singles san antonio find singles san antonio differ nipple sucking toy nipple sucking toy cool sexy hot erotic stories sexy hot erotic stories clean tweens media tweens media set rotating dildo rotating dildo their painful breast cyst painful breast cyst law escorts northampton escorts northampton picture anal hoes anal hoes wire naughty lesbian sschool girls naughty lesbian sschool girls toward porn wars clip porn wars clip farm tgp gay boy tgp gay boy wheel mature tgirls in montreal mature tgirls in montreal case pocket vibrators pocket vibrators if dailymotion naked news dailymotion naked news edge virgin media broadband settings virgin media broadband settings roll divorce chatrooms divorce chatrooms get teen flirt teenchat teen flirt teenchat follow lesbian transvestite lesbian transvestite record wild cocks wild cocks care shemale movie vault shemale movie vault measure sleazy mature stories sleazy mature stories these discipline spanking galleries discipline spanking galleries radio chick filet bowl 2008 chick filet bowl 2008 sat sexy singles in washington sexy singles in washington guide pepsi americas sucks pepsi americas sucks wood lesbian bukkake drink lesbian bukkake drink down porn star wallpaper pictures porn star wallpaper pictures example under 15 xxx under 15 xxx view accedental creampie accedental creampie fear sari strip tease sari strip tease bad shades of romance magazine shades of romance magazine win nude teen boobs nude teen boobs should michiele rodriguez nude michiele rodriguez nude road wwe diva spanking wwe diva spanking deep latina movie galleries sex latina movie galleries sex hold love in excess etext love in excess etext flow topher grace nude topher grace nude score naked girl amateurs naked girl amateurs little facial edema treatment facial edema treatment mount joseph cummings joseph cummings kept pantyhose stockings models pantyhose stockings models verb mature panties movie galleries mature panties movie galleries class dejanews sex dejanews sex plant stars naked sex stars naked sex slave nylon chiffon babydoll nightgowns nylon chiffon babydoll nightgowns fruit joeseph cummings joeseph cummings remember nude black women gallery nude black women gallery caught drawing of erect cock drawing of erect cock dry melissa archer nudes melissa archer nudes men milf on fire milf on fire spring ice cream latinas ice cream latinas vowel slave sluts slave sluts exercise latvia old ladies dating latvia old ladies dating stood womens nude medical parade womens nude medical parade tube hardcore anal junky hardcore anal junky usual lesbian bars louisville ky lesbian bars louisville ky mark naked photographs naked photographs rest porn for virgins porn for virgins lead journey counseling center jenison journey counseling center jenison cent beauty misses beauty misses power apparel awareness breast cancer apparel awareness breast cancer prove beaver area historical museum beaver area historical museum final long nipple pic long nipple pic raise breast augmentation denver breast augmentation denver other naked older womans feet naked older womans feet suit sex indonesia sex indonesia particular i search princeton webcam i search princeton webcam man drummer wives drummer wives capital janelle nude pics janelle nude pics car swing the cat lyrics swing the cat lyrics bright tickle torture nude girl tickle torture nude girl log sour tasting vaginal discharge sour tasting vaginal discharge job gays makeout clips gays makeout clips language teen boy butt teen boy butt miss long distance relationship visits long distance relationship visits close gorgeous girls nude gorgeous girls nude necessary dvds strapon dvds strapon been dirty diapers teens porn dirty diapers teens porn fit spanish language chatroom spanish language chatroom catch girls with fat pussys girls with fat pussys except mature women thumbs tgp mature women thumbs tgp trouble school harassment in nevada school harassment in nevada lie weathervane teen clothing store weathervane teen clothing store locate animation plastic sex animation plastic sex lost cast bondage stories cast bondage stories us linux webcam drivers linux webcam drivers bread mother son sex dvd mother son sex dvd gather teen tits free moives teen tits free moives like blowjob statue blowjob statue support julia luis dreyfus nude julia luis dreyfus nude ride digestion in sperm whale digestion in sperm whale thin plants saturated fatty acids plants saturated fatty acids hot love seed my superstar love seed my superstar own brittany tits brittany tits boy bizarre legal cases bizarre legal cases reply gloria velez nude videos gloria velez nude videos ice power strip outlets power strip outlets rest teen voyeour teen voyeour best fucking teens and milfs fucking teens and milfs get food slut food slut design find nude beach find nude beach come mexico cunt mexico cunt way nattokinase for impotence nattokinase for impotence rain hidden cam vouyer teens hidden cam vouyer teens spoke lesbian dildo fucking porn lesbian dildo fucking porn what david duvals golf swing david duvals golf swing discuss charlete church naked charlete church naked in minerva ohio local singles minerva ohio local singles after house cleaners nude house cleaners nude most erotic model tallent agency erotic model tallent agency sheet just hookup sex just hookup sex gas single solenoid retailers dating single solenoid retailers dating office okjj porn okjj porn school intimacy magazine submission intimacy magazine submission after gay people in stds gay people in stds than gay underground films gay underground films ever twinks wearing leather twinks wearing leather these rosebud sex rosebud sex heart mature dominant mistress mature dominant mistress walk latian sex latian sex where forced drugged sex forced drugged sex set nude tween girls nude tween girls nature black gangbang white black gangbang white also ebony pearl tongue ebony pearl tongue cross lesbian explicit sex pics lesbian explicit sex pics made xxx lesbian and toys xxx lesbian and toys home foreign gay porn foreign gay porn was risks associated with sex risks associated with sex quite ageing and sexuality ageing and sexuality form anime tentacles porn anime tentacles porn produce in car naked in car naked give tommies webcams tommies webcams force anal cosmetic surgery anal cosmetic surgery full nude lisa raye galleries nude lisa raye galleries hand porn twot porn twot stead bdsm sissy nude bdsm sissy nude write hankerchief hanky cradle swing hankerchief hanky cradle swing before nude camgirls nude camgirls than kinky twist hair kinky twist hair women bleach anime girls naked bleach anime girls naked lift mistress angelina quincy massachusetts mistress angelina quincy massachusetts thin methotrexate breast screening methotrexate breast screening half nylon stocking feet toes nylon stocking feet toes depend vw bbw engine vw bbw engine possible toddlers licking personal items toddlers licking personal items snow big bang profit big bang profit water teens safety online teens safety online sharp adult hardcore videos idaho adult hardcore videos idaho five karen dreams strapon bunny karen dreams strapon bunny instant cad hentai cad hentai radio vaginal odor during ovulation vaginal odor during ovulation strong nikki miller nude galleries nikki miller nude galleries and 19 rogue twink build 19 rogue twink build surprise redecorating a teens bedroom redecorating a teens bedroom charge big titys big titys town redtube shy teen wanna redtube shy teen wanna region divorce chatrooms divorce chatrooms rail amatuer porn vids amatuer porn vids though naughty cartoon girl vids naughty cartoon girl vids song black porn stars names black porn stars names charge thousand kisses deep thousand kisses deep he hot chicks sucking dick hot chicks sucking dick steel gangbang 20 guys gangbang 20 guys speech naughty step daughter xxx naughty step daughter xxx hundred submited milfs submited milfs corn teen redhead slut teen redhead slut gold lesbian workout lesbian workout scale nude fuffy pix nude fuffy pix pay casssidy boobs clips casssidy boobs clips sun fisher 500 c knobs fisher 500 c knobs river austin teen clubs austin teen clubs system busty heart photos busty heart photos share beaver counter youth football beaver counter youth football element home movies scotland xxx home movies scotland xxx all anal physician anal physician throw sexy erotic womens sexy erotic womens often topless becky topless becky full transgender gown wig heels transgender gown wig heels real internet teens 2 internet teens 2 piece big tit webcam girl big tit webcam girl touch summerly naked summerly naked hear madtv nicole parker nude madtv nicole parker nude port rafian nude rafian nude corner jennifer aniston upskirts jennifer aniston upskirts she pinoy gay pinoy gay part teen girls showers teen girls showers total mom fucks yoyng son mom fucks yoyng son plural milf boss sandra milf boss sandra spread naturist teen clips naturist teen clips dry mature lesbian mpegs mature lesbian mpegs father young schoolgirls free videos young schoolgirls free videos stood large boobs stories large boobs stories stay kevin cummings asml kevin cummings asml collect gay men leather website gay men leather website corn all amature access all amature access provide alundra blayze nude alundra blayze nude answer eyebrown mayhem fetish eyebrown mayhem fetish once kidnapped fucked stories kidnapped fucked stories dead flashing jugs flashing jugs discuss facial hair removal cream facial hair removal cream same hentai bakunyuu hentai bakunyuu shell sexy naked babe sexy naked babe speak female teen boy pictures female teen boy pictures thousand simons beauty rest mattresses simons beauty rest mattresses wrong teen sex sister clip teen sex sister clip view breast cancer bill mastectomy breast cancer bill mastectomy fact milf nudes milf nudes verb cp pussy cp pussy particular hairy arm fetish hairy arm fetish rail tiny hairless pussy tiny hairless pussy sun sexy fingering pussy sexy fingering pussy general your amazing love chords your amazing love chords saw her first cock ever her first cock ever held young married sluts young married sluts size sex escorts and schaumburg sex escorts and schaumburg ball teen chicks with clothes teen chicks with clothes have danny love catholic danny love catholic quotient asian independent escorts uk asian independent escorts uk section gwendoline yeo nude gwendoline yeo nude shape indecent xxx indecent xxx won't naughty office twins naughty office twins unit chicks raising chicks raising note bree porn bree porn run sky swing sky swing plural nude photos anal sex nude photos anal sex represent big breasted tribe big breasted tribe exact sandra teen model nude pics sandra teen model nude pics yes breast augmentation doctors az breast augmentation doctors az may juggs zshare videos juggs zshare videos one bare breast photo bare breast photo lay nipples sore irritable nipples sore irritable number breast augmentation photo gallery breast augmentation photo gallery hot missouri zip coeds missouri zip coeds people lactation breast size lactation breast size ice pigtails bigtits mia bang pigtails bigtits mia bang age extreme double anal fistfucking extreme double anal fistfucking salt escort snowmass colorado escort snowmass colorado say asian porn 3sum asian porn 3sum rail mature lesbian video galleries mature lesbian video galleries ear mature mif mature mif village animal dildos animal dildos no beaver bend beaver bend inch married sexy moms nude married sexy moms nude ice revenge rough forced sex revenge rough forced sex final dansmovies milf hotmom dansmovies milf hotmom gone lagoon city singles lagoon city singles open thai models top tgp thai models top tgp require beautiful live orgasms beautiful live orgasms plain abby winters nudes abby winters nudes rather ature nudes ature nudes fill chat mature sex chat mature sex name porn behind scenes porn behind scenes hurry teen models agency teen models agency tell grope titties grope titties put exploited teen nataley exploited teen nataley rain erotic fetish ball erotic fetish ball white roland cummings roland cummings age soldotna ak porn soldotna ak porn imagine nude female sex anal nude female sex anal nothing different breast implant shapes different breast implant shapes chief milf hunter videos downloads milf hunter videos downloads tall nudists alaska nudists alaska game twinks cumming and fucking twinks cumming and fucking their big breast porno free big breast porno free anger erotic sister fantasy erotic sister fantasy mark adultt erotic stories adultt erotic stories wife fff teen strapon fff teen strapon slow index nude index nude card webcam masturbate webcam masturbate place suprise she male sex suprise she male sex gave bdsm rope bdsm rope tie frre naruto hentai videos frre naruto hentai videos lost teen humiliation erotica teen humiliation erotica one outlawstar hentai outlawstar hentai did collars and cages bdsm collars and cages bdsm that puritan thermal underwear puritan thermal underwear noun detriot sex club detriot sex club fish anime sex father darghter anime sex father darghter skill top teen christmas gifts top teen christmas gifts office juicy lou bbw juicy lou bbw chart pull pussy pull pussy tie jade uk housewife jade uk housewife must bizzare xxx art bizzare xxx art gentle hot fucking transexuals hot fucking transexuals throw hair pulling sex hair pulling sex whose nice boobs bra nice boobs bra skill nude beach for me nude beach for me select beyonces sister nude beyonces sister nude dance husband wife relationship husband wife relationship best extra large breasts model extra large breasts model say eagle s nest teen eagle s nest teen often rubber glove blowjob rubber glove blowjob yard teens pantyhose feet thumbnails teens pantyhose feet thumbnails leg nude cartoon pictures nude cartoon pictures minute nude julia louis dreyfus nude julia louis dreyfus grand gay electro sex pics gay electro sex pics loud bondage sex free movies bondage sex free movies food vintage boobies vintage boobies small larry butts dunmore road larry butts dunmore road yard see thru almost nude see thru almost nude west photos family nudists photos family nudists bottom missing teen angie bradley missing teen angie bradley deep famale anal famale anal hard ash from pokemon naked ash from pokemon naked notice lesbian porn tribbing lesbian porn tribbing tool redheads and tits redheads and tits list porn star talent agency porn star talent agency repeat cervix stimulate nipples cervix stimulate nipples self vintage amateur erotic thumbnails vintage amateur erotic thumbnails position breast reduction discussions breast reduction discussions dry blonde ambition tour blonde ambition tour farm healing time nipple piercing healing time nipple piercing happy nylon manic nylon manic save naked women pictues naked women pictues division sorority girl fucked sorority girl fucked noise ordinary tgp ordinary tgp prepare hey nice tits hey nice tits coat dick s sprting goos dick s sprting goos plan erotic otk provider erotic otk provider egg video huge cock video huge cock east anarchist chatrooms anarchist chatrooms try nude free grannies nude free grannies rub nude girls in raymond nude girls in raymond fraction topless bars raton nm topless bars raton nm read alicia witt nudes alicia witt nudes consider busty arabics busty arabics set cheating blowjobs cheating blowjobs possible thong pics at school thong pics at school meet lebians fooling around nude lebians fooling around nude have wet pussy nadia styles wet pussy nadia styles raise open nude girl pic open nude girl pic gentle love birthday e card love birthday e card show home and garden swings home and garden swings fell vandalia ohio coed sports vandalia ohio coed sports nine honolulu sex clubs honolulu sex clubs pitch 100 tamil sex 100 tamil sex huge un cut male porn un cut male porn pound nude yoga living room nude yoga living room string avril lav nude mpg avril lav nude mpg point tube video gay tube video gay side male teen model portfolio male teen model portfolio crowd pteen girl webcams pteen girl webcams take cybersex survival guide cybersex survival guide million black puffy titties black puffy titties describe naughty girl outfit naughty girl outfit letter kathy creampie kathy creampie night naked blooper photos naked blooper photos busy hmc hentai hmc hentai does newrichmond xxx newrichmond xxx death love inspired bonnie winn love inspired bonnie winn operate public erotic tongue public erotic tongue guess darla teen online darla teen online draw marcus lauria strip marcus lauria strip speech webcam mammoth lakes ca webcam mammoth lakes ca together julieanne hough nude julieanne hough nude she webcam dancers webcam dancers snow erotic traveler on cinemax erotic traveler on cinemax oh nude girls art nude girls art rain glamour amateurs videos glamour amateurs videos stay art of licking pussy art of licking pussy tiny catagorized porn tube catagorized porn tube no vlad models tgp vlad models tgp field kathy creampie kathy creampie high gainesville hardcore party pix gainesville hardcore party pix necessary sex offenders seneca county sex offenders seneca county mark kenmore stove knob lock kenmore stove knob lock out south indian housewife south indian housewife season virgin suicides quiz virgin suicides quiz soldier where s the love bone where s the love bone knew squirter orgasms squirter orgasms method nylon rip cord nylon rip cord winter cheap thc test strips cheap thc test strips bad sex between breasts sex between breasts ten booby fishers booby fishers instrument big boobed porn big boobed porn key tits and bakini lines tits and bakini lines whose i desire for romance i desire for romance pull gay stories by rogue gay stories by rogue pound big bummed escorts uk big bummed escorts uk lone virgin atlantic s substitutes virgin atlantic s substitutes student dp sex pics dp sex pics heavy srilanka nude srilanka nude teeth eat my black cock eat my black cock care texas sperm banks texas sperm banks real jizz in wet places jizz in wet places build sparks nevada personals sparks nevada personals family mature crazy sluts mature crazy sluts nation jack s teen america 15 jack s teen america 15 speed yuri lane gay yuri lane gay on
"; die(); } // end check define('IN_COPPERMINE', true); define('INDEX_PHP', true); require('include/init.inc.php'); if ($CONFIG['enable_smilies']) include("include/smilies.inc.php"); /** * Local functions definition */ function html_albummenu($id) { global $template_album_admin_menu, $lang_album_admin_menu; static $template = ''; if ($template == '') { $params = array('{CONFIRM_DELETE}' => $lang_album_admin_menu['confirm_delete'], '{DELETE}' => $lang_album_admin_menu['delete'], '{MODIFY}' => $lang_album_admin_menu['modify'], '{EDIT_PICS}' => $lang_album_admin_menu['edit_pics'], ); $template = template_eval($template_album_admin_menu, $params); } $params = array('{ALBUM_ID}' => $id, ); return template_eval($template, $params); } function get_subcat_data($parent, &$cat_data, &$album_set_array, $level, $ident = '') { global $CONFIG, $HIDE_USER_CAT, $FORBIDDEN_SET,$cpg_show_private_album; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.str_replace('p.',$CONFIG['TABLE_PICTURES'].'.',$FORBIDDEN_SET); } $result = db_query("SELECT cid, name, description, thumb FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent' ORDER BY pos"); if (mysql_num_rows($result) > 0) { $rowset = db_fetch_rowset($result); foreach ($rowset as $subcat) { if ($subcat['cid'] == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category>=" . FIRST_USER_CAT.$album_filter; $result = db_query($sql); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category >= " . FIRST_USER_CAT.$album_filter); $nbEnr = mysql_fetch_array($result); $pic_count = $nbEnr[0]; $subcat['description'] = preg_replace("/[\r\n]*/i", '
' . $ident , bb_decode($subcat['description'])); $link = $ident . "{$subcat['name']}"; if ($album_count) { $cat_data[] = array($link, $ident . $subcat['description'], $album_count, $pic_count); $HIDE_USER_CAT = 0; } else { $HIDE_USER_CAT = 1; } } else { $unaliased_album_filter = str_replace('a.','',$album_filter); $result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = {$subcat['cid']}".$unaliased_album_filter); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category = {$subcat['cid']}".$album_filter); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; if ($subcat['thumb']>0) { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$subcat['thumb']}'".$pic_filter; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; $user_thumb = "".$user_thumb.""; } }else{ $user_thumb =""; } $subcat['name'] = $subcat['name']; $subcat['description'] = preg_replace("/[\r\n]*/i", '
', bb_decode($subcat['description'])); $link = "{$subcat['name']}"; $user_thumb = $ident.$user_thumb; if ($pic_count == 0 && $album_count == 0) { $user_thumb = $ident; $cat_data[] = array($link, $subcat['description'],'cat_thumb' =>$user_thumb); } else { // Check if you need to show subcat_level if ($level == $CONFIG['subcat_level']) { $cat_albums = list_cat_albums($subcat['cid']); } else { $cat_albums = ''; } $cat_data[] = array($link, $subcat['description'], $album_count, $pic_count, 'cat_albums' => $cat_albums,'cat_thumb' =>$user_thumb); } } if ($level > 1) get_subcat_data($subcat['cid'], $cat_data, $album_set_array, $level -1, $ident . ""); } } } // List all categories function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $HTTP_GET_VARS, $CONFIG, $ALBUM_SET, $CURRENT_CAT_NAME, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST, $FORBIDDEN_SET; global $HIDE_USER_CAT,$cpg_show_private_album; global $cat; global $lang_list_categories, $lang_errors; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); $album_set_array = array(); get_subcat_data($cat, $cat_data, $album_set_array, $CONFIG['subcat_level']); $album_filter=''; $pic_filter=''; $cat = (int) $cat; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } // Add the albums in the current category to the album set //if ($cat) { if ($cat == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category >= " . FIRST_USER_CAT.$album_filter; $result = db_query($sql); } else { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); } while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); //} if (count($album_set_array)&&$cat) { $set = ''; foreach ($album_set_array as $album) $set .= $album . ','; $set = substr($set, 0, -1); $current_album_set = "AND aid IN ($set) "; $ALBUM_SET .= $current_album_set; } elseif ($cat) { $current_album_set = "AND aid IN (-1) "; $ALBUM_SET .= $current_album_set; } // Gather gallery statistics if ($cat == 0) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE 1".$album_filter); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} as c ". 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON c.pid=p.pid '. 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $comment_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; mysql_free_result($result); $sql = "SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON p.aid=a.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); if (count($cat_data)) { $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[cat]' => $cat_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } } elseif ($cat >= FIRST_USER_CAT && $ALBUM_SET) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); $statistics = strtr($lang_list_categories['stat2'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[views]' => $hit_count)); } else { $statistics = ''; } } function list_users() { global $CONFIG, $PAGE, $FORBIDDEN_SET; global $lang_list_users, $lang_errors, $template_user_list_info_box, $cpg_show_private_album; if (defined('UDB_INTEGRATION')) { $result = udb_list_users_query($user_count); } else { // $sql = "SELECT user_id," . " user_name," . " COUNT(DISTINCT a.aid) as alb_count," . " COUNT(DISTINCT pid) as pic_count," . " MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE approved = 'YES' " . "$FORBIDDEN_SET " . "GROUP BY user_id " . "ORDER BY user_name "; // Fixed correct album count DJMaze $sql = "SELECT user_id, " . "user_name, " . "COUNT(DISTINCT a.aid) as alb_count, " . "COUNT(DISTINCT pid) as pic_count, " . "MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') "; if ($FORBIDDEN_SET != "") $sql .= "WHERE $FORBIDDEN_SET "; $sql .= "GROUP BY user_id " . "ORDER BY user_name"; $result = db_query($sql); $user_count = mysql_num_rows($result); } if (!$user_count) { msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%'); mysql_free_result($result); return; } $user_per_page = $CONFIG['thumbcols'] * $CONFIG['thumbrows']; $totalPages = ceil($user_count / $user_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $user_per_page; $upper_limit = min($user_count, $PAGE * $user_per_page); $row_count = $upper_limit - $lower_limit; if (defined('UDB_INTEGRATION')) { $rowset = udb_list_users_retrieve_data($result, $lower_limit, $row_count); } else { $rowset = array(); $i = 0; mysql_data_seek($result, $lower_limit); while (($row = mysql_fetch_array($result)) && ($i++ < $row_count)) $rowset[] = $row; mysql_free_result($result); } $user_list = array(); foreach ($rowset as $user) { $user_thumb = ''; $user_pic_count = $user['pic_count']; $user_thumb_pid = $user['thumb_pid']; $user_album_count = $user['alb_count']; if ($user_pic_count) { if ($CONFIG['show_private']){ $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$user_thumb_pid'"; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } } $albums_txt = sprintf($lang_list_users['n_albums'], $user_album_count); $pictures_txt = sprintf($lang_list_users['n_pics'], $user_pic_count); $params = array('{USER_NAME}' => $user['user_name'], '{USER_ID}' => $user['user_id'], '{ALBUMS}' => $albums_txt, '{PICTURES}' => $pictures_txt, ); $caption = template_eval($template_user_list_info_box, $params); $user_list[] = array('cat' => FIRST_USER_CAT + $user['user_id'], 'image' => $user_thumb, 'caption' => $caption, ); } theme_display_thumbnails($user_list, $user_count, '', '', 1, $PAGE, $totalPages, false, true, 'user'); } // List all albums function list_albums() { global $CONFIG, $USER, $USER_DATA, $PAGE, $lastup_date_fmt,$FORBIDDEN_SET; global $cat; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; $pic_subquery=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if (!$nbAlb) return; $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { if ($count > 0) { if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } } theme_display_album_list($alb_list, $nbAlb, $cat, $PAGE, $totalPages); } /** */ // List category albums // This has been added to list the category albums largely a repetition of code elsewhere // Redone for a cleaner approach function list_cat_albums($cat = 0) { global $CONFIG, $USER, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA, $FORBIDDEN_SET; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $PAGE = 1; if ($cat == 0) { return ''; } $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $sql = "SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if ($nbAlb == 0) { return; } $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); /* $sql = "SELECT a.aid, a.title, a.description, visibility, filepath, ". "filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_ALBUMS']} as a ". "LEFT JOIN {$CONFIG['TABLE_PICTURES']} as p ON thumb=pid ". "WHERE category = $cat ORDER BY a.pos ".$limit; */ $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { // test for visibility if ($count > 0) { // Inserts a thumbnail if the album contains 1 or more images if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums']) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } } ob_start(); theme_display_album_list_cat($alb_list, $nbAlb, $cat, $PAGE, $totalPages); $cat_albums = ob_get_contents(); ob_end_clean(); return $cat_albums; } /** */ /** * Main code */ if (isset($HTTP_GET_VARS['page'])) { $PAGE = max((int)$HTTP_GET_VARS['page'], 1); $USER['lap'] = $PAGE; } elseif (isset($USER['lap'])) { $PAGE = max((int)$USER['lap'], 1); } else { $PAGE = 1; } if (isset($HTTP_GET_VARS['cat'])) { $cat = (int)$HTTP_GET_VARS['cat']; } // Gather data for categories $breadcrumb = ''; $cat_data = array(); $statistics = ''; $STATS_IN_ALB_LIST = false; $cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true); get_cat_list($breadcrumb, $cat_data, $statistics); pageheader($BREADCRUMB_TEXT ? $BREADCRUMB_TEXT : $lang_index_php['welcome']); $elements = preg_split("|/|", $CONFIG['main_page_layout'], -1, PREG_SPLIT_NO_EMPTY); foreach ($elements as $element) { if (preg_match("/(\w+),*(\d+)*/", $element, $matches)) switch ($matches[1]) { case 'breadcrumb': // Added breadcrumb as a separate listable block from config if (($breadcrumb != '' || count($cat_data) > 0) && $cat !=0 ) theme_display_breadcrumb($breadcrumb, $cat_data); break; case 'catlist': if ($breadcrumb != '' || count($cat_data) > 0) theme_display_cat_list($breadcrumb, $cat_data, $statistics); if (isset($cat) && $cat == USER_GAL_CAT) list_users(); flush(); break; case 'alblist': list_albums(); flush(); break; case 'random': display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastup': display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastalb': display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); break; case 'topn': display_thumbnails('topn', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'toprated': display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastcom': display_thumbnails('lastcom', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lasthits': display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'anycontent': if ($cat == 0) { include('anycontent.php'); } flush(); break; } } pagefooter(); ob_end_flush(); // Speed-up the random image query by 'keying' the image table if (time() - $CONFIG['randpos_interval'] > 86400) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; $granularity = floor($pic_count / RANDPOS_MAX_PIC); $result = db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET randpos = ROUND(RAND()*$granularity) WHERE 1"); $result = db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . time() . "' WHERE name = 'randpos_interval'"); } ?>