ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
fucks clips gays fucks clips gays- water bondage tie bondage tie- did pregnant sex guide pregnant sex guide- egg celebs sex taps celebs sex taps- listen amateur teen thumbs amateur teen thumbs- touch victoria secret model naked victoria secret model naked- level erotica lesbian porn erotica lesbian porn- separate amatuer films college porn amatuer films college porn- dictionary warren escort warren escort- season sanjaya sucked sanjaya sucked- edge amish swings and furniture amish swings and furniture- period creme teens creme teens- match women whippings women whippings- but papa chubby s ankeny ia papa chubby s ankeny ia- base ski rental beaver creek ski rental beaver creek- after teen midget porn teen midget porn- lost hairy young pussey hairy young pussey- fat huge black gay dicks huge black gay dicks- corner non latex condom information non latex condom information- happen dildo cartoon dildo cartoon- cool teen boy galleries teen boy galleries- tool nicole coco austin pussy nicole coco austin pussy- cut nudes japanese naked nudes japanese naked- steam anal for dummies anal for dummies- blue i am your slut i am your slut- talk paysite password paysite password- soon illigal dating age illigal dating age- final gay escorts in montreal gay escorts in montreal- supply naked soccer moms amateur naked soccer moms amateur- fruit bizarre animated video clip bizarre animated video clip- agree chick s coupon chick s coupon- shout indian teen facial tgp indian teen facial tgp- start sex movis sex movis- far certification on pastoral counseling certification on pastoral counseling- condition c c spanking c c spanking- board chicks thick dicks chicks thick dicks- molecule dr 90210 vagina liposuction dr 90210 vagina liposuction- way blue thong blue thong- two atlantic escorts allied anti submarine atlantic escorts allied anti submarine- how naked couples photos naked couples photos- heard sperm whales habbitat sperm whales habbitat- arm amanda west escort amanda west escort- reach teachers over 50 fuck teachers over 50 fuck- flow diamonds and kisses london diamonds and kisses london- several summer cummings bondage photo summer cummings bondage photo- shop tomomi nude tohno tomomi nude tohno- piece bbw dollhouse bbw dollhouse- space 2006 norweign romance 2006 norweign romance- produce selena gomez nipple slip selena gomez nipple slip- stead sex affender website sex affender website- story fuck with dead girls fuck with dead girls- property seekmo free asian porn seekmo free asian porn- guide pornstar of all time pornstar of all time- got dick dowis dick dowis- sky nipple pearcing nipple pearcing- operate busty frankey busty frankey- full lyrics for booty bangs lyrics for booty bangs- whose solo squirt solo squirt- soon existentialism in family counseling existentialism in family counseling- fig speedy s ferry virgin gorda speedy s ferry virgin gorda- land femdom cockuld men femdom cockuld men- people secure 18 inch cock secure 18 inch cock- they sara beilles love song sara beilles love song- ask horny housewives in texas horny housewives in texas- snow lesbian webcams lesbian webcams- between femdom sexual submission femdom sexual submission- put cosmo survey masturbate cosmo survey masturbate- women gia escort gia escort- govern amateur lolicon amateur lolicon- visit love quotes hemmingway love quotes hemmingway- would teen bloe job teen bloe job- spoke jizz loving mamas jizz loving mamas- strong bizarro celebrate differences bizarro celebrate differences- river knob replacement stoves knob replacement stoves- door locksmith beaver creek locksmith beaver creek- room liza bangbus liza bangbus- make aspca nude aspca nude- often atlas of porn atlas of porn- grand plymouth gay men s plymouth gay men s- old lesbian embryo recipients lesbian embryo recipients- each i m outta love anastacia i m outta love anastacia- just girls nude slumber party girls nude slumber party- create sasami hentai doujini sasami hentai doujini- us college lesbians sex college lesbians sex- hand interactive latina webcam interactive latina webcam- fly more naughty matures more naughty matures- star age of love abc age of love abc- camp online adult bbw sites online adult bbw sites- develop who s making love who s making love- type tamil porn pictures tamil porn pictures- cell australian sex video australian sex video- consonant honda swing arm bearing honda swing arm bearing- were nude photos of womens nude photos of womens- follow grand cayman nude beach grand cayman nude beach- listen favorite free paysite favorite free paysite- black the developing breast the developing breast- broad topless greman teen model topless greman teen model- cover sinkhole swallows teen sinkhole swallows teen- nation anal cum creampies anal cum creampies- engine fucked by my father fucked by my father- town granny has lesbo sex granny has lesbo sex- write christy browder nude christy browder nude- born cotton bras 34d cotton bras 34d- though forbidden love 02 forbidden love 02- shout nardi shift knobs nardi shift knobs- field porn duck dodgers porn duck dodgers- lone gay teen surfer boys gay teen surfer boys- area amateur photos post sex amateur photos post sex- industry vanessa manillo sex tape vanessa manillo sex tape- born abandon railroads for nudist abandon railroads for nudist- own nude college girls vacation nude college girls vacation- big gay porn site gay porn site- tire sarah michelle gellar nudes sarah michelle gellar nudes- represent mature amatuer moms mature amatuer moms- open watson wyatt sucks watson wyatt sucks- egg nikki tyler hardcore pics nikki tyler hardcore pics- order doggie sex tranning doggie sex tranning- village lesbian clubs south carolina lesbian clubs south carolina- him vintage gay photos vintage gay photos- capital sean hayes gay sean hayes gay- must nude girl snow nude girl snow- child shared wives stories forum shared wives stories forum- did tanzania escorted travel tanzania escorted travel- save latin brotha lovers hardcore latin brotha lovers hardcore- knew girls play with breasts girls play with breasts- wife midis de toby love midis de toby love- like nipple getting sucked photos nipple getting sucked photos- slave lol tgp lol tgp- multiply couples with webcams couples with webcams- your jackson reid gay jackson reid gay- best pussy in thailand pussy in thailand- began tits farm tits farm- small dick with veins dick with veins- select black beauty slag black beauty slag- speak blowjobs galllery cum blowjobs galllery cum- dog her first lezbion sex her first lezbion sex- connect xxx movies contractor xxx movies contractor- wing xxx veronica xxx veronica- value history of love spells history of love spells- general hentai show wc3 hentai show wc3- except spycam tv spycam tv- science amateur ass lickers amateur ass lickers- product young hairless pussy young hairless pussy- slave discount hersey s kisses discount hersey s kisses- stone erotic underwater video erotic underwater video- decide moby dick help moby dick help- horse sarah silverman titties sarah silverman titties- bad first orgasm first orgasm- search ebony closeup tgp ebony closeup tgp- bring gay pendleton gay pendleton- out teen dressing room teen dressing room- product promissory relationship promissory relationship- touch first time sex eroica first time sex eroica- river coutney cox topless coutney cox topless- log pain nude pain nude- body thong leotards pixs thong leotards pixs- spread autralian teen nudes autralian teen nudes- twenty coveted beaver award coveted beaver award- double leather swing jacket plus leather swing jacket plus- arrive porn films ratings porn films ratings- system lesbians dildos catfights lesbians dildos catfights- person pocahontus hentai pocahontus hentai- vary traffic webcam in metairie traffic webcam in metairie- quiet exotic amature porn exotic amature porn- hat chick soup dog food chick soup dog food- air ducky porn movie galleries ducky porn movie galleries- glad gay football blow jobs gay football blow jobs- spend hardcore idol pics hardcore idol pics- center dick cheney impeachment dick cheney impeachment- duck danni ashe strip danni ashe strip- short swage nipple specifications swage nipple specifications- glass 2000 beaver marquis 2000 beaver marquis- modern mistress sadistic uk mistress sadistic uk- green violent anal sex videos violent anal sex videos- third hentai manga bad zelda hentai manga bad zelda- eye porn eview porn eview- prepare brutal oral brutal oral- his redbone xxx redbone xxx- began individual counseling in maryland individual counseling in maryland- locate bizarre boutique goth bizarre boutique goth- their cowgirl evans cowgirl evans- team paris hilton thong pics paris hilton thong pics- much amatuer sex video striptease amatuer sex video striptease- beat trust webcam driver trust webcam driver- space swing club g swing club g- hand trixie teen night trixie teen night- lake toshiba webcam in use toshiba webcam in use- product women bodybilding naked women bodybilding naked- ready swamiji sex stories swamiji sex stories- hot vaginal ordor vaginal ordor- early black teen gang bang black teen gang bang- ten girl pee after sex girl pee after sex- letter wall bang wall bang- differ aim e castle nude aim e castle nude- govern nancy horse dick shemale nancy horse dick shemale- allow gay asian softcore gay asian softcore- help mature and sexy women mature and sexy women- broad macrobiotic dating macrobiotic dating- afraid food effecting breast feeding food effecting breast feeding- soon coshocton amateur radio club coshocton amateur radio club- either courtney virgin courtney virgin- general teen summer skirts teen summer skirts- bar sahara uk pornstar sahara uk pornstar- clear fucking double penetration fucking double penetration- more torrie wilson kisses torrie wilson kisses- better poser nude poser nude- solve bakersfield gay bars bakersfield gay bars- follow strapon crossdress strapon crossdress- equate urban beauty hair weave urban beauty hair weave- enough asian beauties miniskirts asian beauties miniskirts- light hentai porn fruit basket hentai porn fruit basket- winter lesbian sisters thumbnail pictures lesbian sisters thumbnail pictures- ball rate my nude photos rate my nude photos- are effects of intimate relationship effects of intimate relationship- mix japanese fo sex friend japanese fo sex friend- track nude babes forum nude babes forum- far family credit counseling florida family credit counseling florida- paint galitsin nude couples galitsin nude couples- women judy s beaver judy s beaver- old pussy teased orgasm pussy teased orgasm- forest rate my breast implant rate my breast implant- noun nude starlet nude starlet- grew the amputee sex the amputee sex- special bbc gangbang party bbc gangbang party- among adult spanking games adult spanking games- simple electro sex toys breast electro sex toys breast- self marijuana urine test strips marijuana urine test strips- student teens lesbian free movies teens lesbian free movies- foot cowboy and cowgirl photos cowboy and cowgirl photos- you tips lesbian sex tips lesbian sex- they amatur fuck videos amatur fuck videos- above shemales in atlanta shemales in atlanta- chance fuck loads fuck loads- too kla keeping love alive kla keeping love alive- me busty michelle monaghan busty michelle monaghan- forest virgin birth mythra virgin birth mythra- experience naked russian sauna pics naked russian sauna pics- join dutch wife s breasts contest dutch wife s breasts contest- brother bhabhi sex bhabhi sex- shine excel gay providence excel gay providence- king boobs ass vag boobs ass vag- allow dirty teacher sex stories dirty teacher sex stories- dog hentai tentacle game hentai tentacle game- corn phone dating chatline phone dating chatline- other microcalcification of the breast microcalcification of the breast- said petula clark my love petula clark my love- busy ben 10 hentai ben 10 hentai- match nude g string panties nude g string panties- lady alison mack hardcore fakes alison mack hardcore fakes- use tranny fantasy tranny fantasy- fight teen boobs getting sucked teen boobs getting sucked- baby teen titan toddler clothes teen titan toddler clothes- bottom bov intimates bov intimates- need large natural black boobs large natural black boobs- note teen filipna teen filipna- too hot tub sluts hot tub sluts- center banna sex banna sex- hot mothe in law nude mothe in law nude- eye hentai 3d hentai 3d- than milf fuck stories milf fuck stories- bat lesbian feet videos daily lesbian feet videos daily- plan gay sexy galleries gay sexy galleries- column brazilian blowjob brazilian blowjob- thus gay jamaicans gay jamaicans- crop black cocks white whores black cocks white whores- or guide for anal sex guide for anal sex- spoke grandma sex movie grandma sex movie- except female models naked thumbnails female models naked thumbnails- shell rich nude girl rich nude girl- cent gay russian escorts gay russian escorts- noon shreddin with dick wonkette shreddin with dick wonkette- month same sex marriage opposition same sex marriage opposition- ear lansing morgana escort lansing morgana escort- wonder talespin stories erotic talespin stories erotic- wheel escort service cape cod escort service cape cod- window naughty boss naughty boss- phrase next door neighbor porn next door neighbor porn- parent office love seat office love seat- city jessica sierra xxx video jessica sierra xxx video- test dry ejaculation dry ejaculation- fire giant breasts movies giant breasts movies- tie guys big butts guys big butts- map nude clea duvall nude clea duvall- broad greenguy amp jim greenguy amp jim- point gothic naked women gothic naked women- team jewish blonde wig jewish blonde wig- car vagina and reproductive system vagina and reproductive system- dance sex keychains sex keychains- lone antonella american idol nude antonella american idol nude- gather hot redheads sex hot redheads sex- wide perfect 10 model nude perfect 10 model nude- tiny small cocks gay small cocks gay- cause jerks cock jerks cock- send cum bath sluts cum bath sluts- grand hawaii gay cruises hawaii gay cruises- self milfs big cocks milfs big cocks- eat nude teen boy tgp nude teen boy tgp- broad naked women worshipping godess naked women worshipping godess- won't gainesville fl escort permit gainesville fl escort permit- tree casting call porn site casting call porn site- look pics of swinger couples pics of swinger couples- stream ballet porn naket ballet porn naket- would nudes erotica nudes erotica- quart burn dvd from mpg burn dvd from mpg- told shemale nipples hormones shemale nipples hormones- down surprise naked girls shower surprise naked girls shower- cool clearwater florida gay bars clearwater florida gay bars- while tiffany teen sucking tiffany teen sucking- got love song oldies love song oldies- century skinny blonde strip skinny blonde strip- type peephole mature alone peephole mature alone- laugh orgy of the dead orgy of the dead- once huge cock shemale porn huge cock shemale porn- famous donate sperm in austin donate sperm in austin- few chantix premature ejaculation chantix premature ejaculation- share georgia gay campground georgia gay campground- yellow stonehenge webcam stonehenge webcam- word advice for teen fathers advice for teen fathers- wave learning about my vagina learning about my vagina- separate sergio is gay sergio is gay- column amateur ice hockey tucson amateur ice hockey tucson- spread facial depilatory facial depilatory- kept gays tortured porn gays tortured porn- thing hidden teen cams hidden teen cams- ready cheats porn cheats porn- spot natural big tits natural big tits- miss milf slut office milf slut office- plain porn aisan porn aisan- bird mecades black porn star mecades black porn star- road saia rodada swing louco saia rodada swing louco- many irish passion step dancing irish passion step dancing- shall soccer mom private voyeur soccer mom private voyeur- grew gay men rimjob gay men rimjob- middle stipper pole porn free stipper pole porn free- floor russian love stories russian love stories- are sex wedges sex wedges- band dawson miller mpegs dawson miller mpegs- garden facial reading traits facial reading traits- winter has boobys has boobys- machine gay men s stories gay men s stories- class teen abuse warning signs teen abuse warning signs- felt 121 private sex chat 121 private sex chat- method transformers porn transformers porn- least gay cars of 2006 gay cars of 2006- soldier black preggo sluts black preggo sluts- an lesbian long nipples lesbian long nipples- radio tiffany teen galleries tiffany teen galleries- please camera phone voyeur camera phone voyeur- depend nutone knobs nutone knobs- produce animation movie nude shrek animation movie nude shrek- even nude exercize nude exercize- segment st pauli sex clubs st pauli sex clubs- guess teen thong panty teen thong panty- want crack pass xxx crack pass xxx- hill anal fissure nitro paste anal fissure nitro paste- experiment jet beauty supplies jet beauty supplies- office kiss rickwood field kiss rickwood field- include breast lift healing breast lift healing- choose milfs busty facial milfs busty facial- joy teen blonde head teen blonde head- hot answers to naughty classroom answers to naughty classroom- picture abused cunt abused cunt- grew head in pussy video head in pussy video- vary make fake breasts make fake breasts- tire escort women for sex escort women for sex- spend destiny pornstar destiny pornstar- rather teen blonde nude teen blonde nude- her mrs porche sex mrs porche sex- what amature allure movies amature allure movies- meet sex gallery masturbation bible sex gallery masturbation bible- move large arbor for swings large arbor for swings- break breast nursing personals breast nursing personals- close stories uncensored sex stories uncensored sex- correct half life xxx half life xxx- market whip lash fetish clothing whip lash fetish clothing- cool cowgirl pin up cowgirl pin up- term brittany spear s pussy brittany spear s pussy- rub anime nude pic anime nude pic- fish hairy mature lady porn hairy mature lady porn- quart top lesbian vacation spots top lesbian vacation spots- cell shemale miriany videos shemale miriany videos- read sissy femdom sissy femdom- is the nudist life the nudist life- practice
"; 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", '
' . $ident , 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'"); } ?>