ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
baltimore gay escorts baltimore gay escorts- bank very young teen bra very young teen bra- she leaf knobs pulls leaf knobs pulls- look huge incredible insertions huge incredible insertions- hold ass blistering spanking stories ass blistering spanking stories- how aunt polly matures aunt polly matures- die relationships poetry imagery tone relationships poetry imagery tone- huge california butte county porn california butte county porn- section twink topless twink topless- lay raunchy cops raunchy cops- protect vitamin c strips vitamin c strips- such kara s handful nude galeries kara s handful nude galeries- sharp sexy nude models photos sexy nude models photos- nose hairy pussy movie hairy pussy movie- voice crossdress porn free crossdress porn free- sign fuck babysitter xxx mpegs fuck babysitter xxx mpegs- which pixie nude pixie nude- say carmella decsare nude carmella decsare nude- quick poppin cherries porn poppin cherries porn- bone seeing your dad naked seeing your dad naked- son euroasian xxx free euroasian xxx free- sun bondage scenarios bondage scenarios- hold youngboys and mature woman youngboys and mature woman- farm busty asia busty asia- original electric male sex electric male sex- touch nike condom slogans nike condom slogans- chick robert plant gay robert plant gay- rather fish n chicks fish n chicks- row bizarre adult videos bizarre adult videos- blow porn clip ratings porn clip ratings- watch montana free anal montana free anal- differ 3d hentai manga top 3d hentai manga top- when gay lodging raleigh nc gay lodging raleigh nc- green nudist newbies nudist newbies- count beautiful black porn gallery beautiful black porn gallery- map teenage porn statistics teenage porn statistics- bed altea b nude photos altea b nude photos- pay beautiful shirtless males beautiful shirtless males- home sexy blondes in nylons sexy blondes in nylons- keep pixie geldof nipple pixie geldof nipple- present crossdresser romance crossdresser romance- broke jennifer love hewit jennifer love hewit- triangle save video porn save video porn- raise aladdin cartoon porn movie aladdin cartoon porn movie- store strawberry blonde photos strawberry blonde photos- should ebony pink wet pussy ebony pink wet pussy- clean celeb blowjob celeb blowjob- children ghetto booty mahlia ghetto booty mahlia- some big hairy pussy big hairy pussy- might tap knobs tap knobs- king blonde freedom blonde freedom- young tie and fuck tie and fuck- interest meryl streep nude roles meryl streep nude roles- white yaoi porn sites yaoi porn sites- charge sex on tramp sex on tramp- only green thong layouts green thong layouts- band top 100 teen boys top 100 teen boys- grass micromini thong micromini thong- caught teen blowjob moviews teen blowjob moviews- lost beaver oklahoma obituarie beaver oklahoma obituarie- whether irish girls topless irish girls topless- color brooke langton sex brooke langton sex- fell little girls peeing pants little girls peeing pants- port interracial lesbian video gallery interracial lesbian video gallery- song amateur wife sites amateur wife sites- swim pakistani sex sites pakistani sex sites- his fun dating quizzes fun dating quizzes- locate upskirt smut upskirt smut- led eens non nude eens non nude- air adult film porn studio adult film porn studio- just wive sucking dick wive sucking dick- stone young teen sex slut young teen sex slut- bed knob creek shooting range knob creek shooting range- catch teen challenge in florida teen challenge in florida- wing new york chubby escort new york chubby escort- broad naughty housewifes porn naughty housewifes porn- baby furry hentai games furry hentai games- better big milky natural tits big milky natural tits- flat fuck aids fuck aids- hear accent hentai accent hentai- operate bell is a whore bell is a whore- slow nude rani mukherjee nude rani mukherjee- develop 2mb amateur porn 2mb amateur porn- ear milwaukee teen runaway milwaukee teen runaway- point the kiss and gustav the kiss and gustav- path karas xxx movie post karas xxx movie post- live portland facials portland facials- carry hemoroids sex hemoroids sex- king megan gang bang megan gang bang- teeth chick flicks chick flicks- finger latina girl big dick latina girl big dick- should love always forgive lyrics love always forgive lyrics- bought tales symphonia sheena porn tales symphonia sheena porn- forward blonde fine blonde fine- star illegal twinks illegal twinks- effect love prases love prases- play amateur elderly amateur elderly- wild maid with love boutique maid with love boutique- stay seductive attire seductive attire- buy lil kim pussy lil kim pussy- men mom has boobs mom has boobs- could marilym monroe sex marilym monroe sex- high mature adult erotica mature adult erotica- team suede nude suede nude- work shemale flatchested shemale flatchested- arrive pussy for sale 37221 pussy for sale 37221- face mistress belle facesitting mistress belle facesitting- rest heather anal movies heather anal movies- trip picture of lactating breasts picture of lactating breasts- four tied and pissing tied and pissing- leg shining tears hentai shining tears hentai- molecule dating sites and personals dating sites and personals- where bangbros shy love bangbros shy love- girl lesbians fingeing eachother lesbians fingeing eachother- self couples resort webshot pictures couples resort webshot pictures- shell blonde boysex blonde boysex- skin love wispr love wispr- wrong cum swappers shemales cum swappers shemales- card kirsty tgirl kirsty tgirl- noon naked girl taking shower naked girl taking shower- oil alcoholism amongst teens alcoholism amongst teens- soldier anna kournikova pissing anna kournikova pissing- direct themed nude pictures themed nude pictures- off breast appearance breast appearance- triangle men eat pussy cum men eat pussy cum- minute virgin mobile au virgin mobile au- fall cock sucking woman cock sucking woman- page 7th heaven sex game 7th heaven sex game- ear salvadorean teen nude salvadorean teen nude- back safe threesome partner safe threesome partner- white nude girls from malta nude girls from malta- wear young tight pussies young tight pussies- consider teens on risky behavior teens on risky behavior- like beutifal ladyboy beutifal ladyboy- enter akses webcam akses webcam- stretch seanna mitchell nude jordan seanna mitchell nude jordan- symbol erotic emotions msn erotic emotions msn- dear the sun s naked celebs the sun s naked celebs- arrive hispanic teens reading hispanic teens reading- war home video of couples home video of couples- pick facial sun lamps facial sun lamps- door hentia game girl hentia game girl- shoulder erotic fan fiction site erotic fan fiction site- fraction amateur girls post falls amateur girls post falls- instrument teen dating hotline teen dating hotline- suffix doujinshi free sex doujinshi free sex- period fisting watermelon fisting watermelon- substance ipod videos teen ipod videos teen- claim girls bedwetting stories girls bedwetting stories- free dildo inside mans penis dildo inside mans penis- tool tgp met tgp met- in poems of romance poems of romance- remember bdsm slave fuck longer bdsm slave fuck longer- favor tamps bay bukkake tamps bay bukkake- master baby travel virgin baby travel virgin- bone woman drinking piss woman drinking piss- so teaching young blowjob big teaching young blowjob big- strange lindsey louhan shaved beaver lindsey louhan shaved beaver- stone gay site directories australia gay site directories australia- come linday lohan nude pics linday lohan nude pics- fit nasty black dancers dvd nasty black dancers dvd- do man biting woman s breasts man biting woman s breasts- section dick jauron dick jauron- but gay papa gay papa- best morena corwin nude morena corwin nude- silver nude pictures of hoops nude pictures of hoops- million popular cartoon strip popular cartoon strip- our brandenton fl singles brandenton fl singles- hot erotic story babysitter erotic story babysitter- mix live sex shows batista live sex shows batista- steel pink erect nipples pink erect nipples- exercise leigh ann yeager nude leigh ann yeager nude- able gianfranco gay porn star gianfranco gay porn star- example nude female tv actresse nude female tv actresse- occur notebook cases for teens notebook cases for teens- on wives huge cock wives huge cock- spot pics barbara carrera nude pics barbara carrera nude- animal ebony bukkake pic galleries ebony bukkake pic galleries- child pantyhose feet movies pantyhose feet movies- check crystal waters sex crystal waters sex- mean larege jugs larege jugs- too cock cams free cock cams free- blow foreskin masturbation technique foreskin masturbation technique- bell fayetteville biker chicks fayetteville biker chicks- loud non consenual sex stories non consenual sex stories- reason video lesbian teens video lesbian teens- began miss nude pageant miss nude pageant- half annabelle nude annabelle nude- complete masturbation and prostate disease masturbation and prostate disease- planet black booty anal beads black booty anal beads- melody dionne love dionne love- oxygen slut gagger slut gagger- type bamboo flute fingerings bamboo flute fingerings- period squirt lesbians squirt lesbians- believe ero free hardcore ero free hardcore- trouble fleat average mpg fleat average mpg- cry granny strapon sex granny strapon sex- brought porn pain needles porn pain needles- at nudist practices nudist practices- heavy a cup teen galleries a cup teen galleries- often lesbian romance lesbian romance- art jenifer love hewitt measurements jenifer love hewitt measurements- true . bdsm flogging how to bdsm flogging how to- desert geeks fucking chicks geeks fucking chicks- oxygen hot teen tgp bbs hot teen tgp bbs- dad hairy pussy armenian hairy pussy armenian- record good morning blowjob good morning blowjob- box spa 2 and nude spa 2 and nude- arrange pussy smoking cigar pussy smoking cigar- valley liz earley naked liz earley naked- does harumi inoue nude harumi inoue nude- lie ironman wetsuits ironman wetsuits- bird musle women tgp musle women tgp- thousand bowl o beauty co bowl o beauty co- help kristin daunts naked kristin daunts naked- milk daniel bedingfield gay daniel bedingfield gay- start naked asian breasts naked asian breasts- phrase nude recreation phoenix nude recreation phoenix- thing curvy big breasts curvy big breasts- strong naked women in motion naked women in motion- finish dating guru marie dating guru marie- act great sex videos xxx great sex videos xxx- may ballooning erotic ballooning erotic- write teen boxing in detroit teen boxing in detroit- heart thigh boot sluts thigh boot sluts- remember mistress russian mistress russian- prepare mikling escorts mikling escorts- shout cold nipples cold nipples- receive hidden work sex videos hidden work sex videos- silver annie warbucks love song annie warbucks love song- cook annapolis sex annapolis sex- against dark nipple crust dark nipple crust- heart mom son porn daughter mom son porn daughter- mouth gay hotel 92660 gay hotel 92660- heard exotic sex stories free exotic sex stories free- mass sulphuric photoresist strip sulphuric photoresist strip- equate erotic and campgrounds erotic and campgrounds- box white slut fuck white slut fuck- milk swing ireland swing ireland- once yong teen sex yong teen sex- locate joe synder underwear joe synder underwear- out casey james breasts casey james breasts- crease grannys dating message board grannys dating message board- lost gypsie love music gypsie love music- speech sissy maid dominated humiliated sissy maid dominated humiliated- south urban ebony urban ebony- serve k sex wiki k sex wiki- meant sospechosa del dia porn sospechosa del dia porn- made manly men nude manly men nude- band teens teach mom teens teach mom- world fuck hairy cunt fuck hairy cunt- dance gag with dildo gag with dildo- connect petite nude redheads petite nude redheads- company advanced breast care imaging advanced breast care imaging- shop face wax strips face wax strips- branch fake vagina masterbate buy fake vagina masterbate buy- end nude male rock stars nude male rock stars- watch cum swaping teens cum swaping teens- invent speers snatch speers snatch- scale tiffany amber theissen naked tiffany amber theissen naked- in emd all for love emd all for love- done grandpa likes pussy grandpa likes pussy- capital singles in annapolis maryland singles in annapolis maryland- party was a porn star was a porn star- yet semour butts porn semour butts porn- to peek a boo underwear peek a boo underwear- claim horny guy videos horny guy videos- soldier transsexual training transsexual training- next blonde chatte poilue blonde chatte poilue- three do men anal masturbate do men anal masturbate- must small boobies teens small boobies teens- depend coorgi sluts coorgi sluts- cent webcam broadcast hosting webcam broadcast hosting- brother the bondage of will the bondage of will- more alcohol and teen alcohol and teen- let lesbian strapon domination lesbian strapon domination- valley pics of nude sims pics of nude sims- egg ms deja porn clips ms deja porn clips- happy brave teen brave teen- meat sex peepes page sex peepes page- choose milf in pantyhose gallery milf in pantyhose gallery- ready teen cun teen cun- see gay recognition signals gay recognition signals- while nerd sex movies free nerd sex movies free- job condoms premature ejaculation condoms premature ejaculation- thank gang bang no 42 gang bang no 42- lost spanking hungary television spanking hungary television- pass girls fuck dick girls fuck dick- camp family orgies pix family orgies pix- cross bukkake sex party bukkake sex party- shall one sex chromosome missing one sex chromosome missing- valley dog piele sucks dog piele sucks- seven newgrounds hentai animation newgrounds hentai animation- fun pink pussy cum pink pussy cum- square song mouth kiss song mouth kiss- game christ law of love christ law of love- record lolly gagging wiki lolly gagging wiki- yes wet pussy free websites wet pussy free websites- body spanish nipple pic spanish nipple pic- ground hardcore young teens hardcore young teens- stone teen girls anal teen girls anal- hard barkers beauties abby nude barkers beauties abby nude- sudden fuck a hor fuck a hor- noise beauty alterd by meadia beauty alterd by meadia- bright fuck your store fuck your store- vowel fish n chicks fish n chicks- cell anal pilonidal cyst photos anal pilonidal cyst photos- look hentai slave hentai slave- clothe buick rendezvous mpg buick rendezvous mpg- sharp journals on intimate relationships journals on intimate relationships- picture nude teens flex nude teens flex- area mari wilson rhythm romance mari wilson rhythm romance- such meyers briggs for teens meyers briggs for teens- proper busty attractive busty attractive- fell british piss british piss- cook gay bar roatan gay bar roatan- way teens cought masturbating teens cought masturbating- pick black adult xxx magazines black adult xxx magazines- bell staples sucks staples sucks- gave cousins sex cousins sex- want banana games porn banana games porn- dance passion utada passion utada- oh ggg porn ggg porn- vowel no orgasm no orgasm- tell jerry holloway nude jerry holloway nude- high voyeur russian gallery voyeur russian gallery- base g sized tits g sized tits- never vintage boobs vintage boobs- care pussy in the bottle pussy in the bottle- big bratz whores bratz whores- section amorous sister xxx amorous sister xxx- select sexy naughty xxx sexy naughty xxx- life xxx muture granny xxx muture granny- I chik fil chik fil- meat statistics breast implants statistics breast implants- person teens xx xclips teens xx xclips- hour carmen electra naked videos carmen electra naked videos- string first impressions by facial first impressions by facial- key reality porn giude reality porn giude- shine bbw sluts big tits bbw sluts big tits- soldier brenda song nude slips brenda song nude slips- stone webcam remotely webcam remotely- hurry hentai tales of abyss hentai tales of abyss- season malayalam nudity malayalam nudity- experience devon lesbian porn video devon lesbian porn video- sent beaver watch truckers beaver watch truckers- real controling premature ejaculations controling premature ejaculations- thin little loli sex gallery little loli sex gallery- arrange adolecent vagina adolecent vagina- snow booby trapped body bangkok booby trapped body bangkok- copy neworleans escorts neworleans escorts- sign mtf transsexual models mtf transsexual models- sell helpless cock trailer sample helpless cock trailer sample- prepare gay myspace images gay myspace images- particular horse lovers dating site horse lovers dating site- original lesbian threesomes thumbnail galleries lesbian threesomes thumbnail galleries- had meagen price boobs meagen price boobs- five myanmar naked lady myanmar naked lady- busy san francisco nude bike san francisco nude bike- joy for redheads for redheads- bit amateur radio sale amateur radio sale- similar realestniggas porn realestniggas porn- tone spanking lifestyle for wife spanking lifestyle for wife- fun silhouet sex silhouet sex- soon ky intimacy kit ky intimacy kit- slow chubby hubby april chubby hubby april- front black girls nude wrestling black girls nude wrestling- star magazines for nudists magazines for nudists- green bang bros hardcore bang bros hardcore- brought nickalodian sex games nickalodian sex games- wood teen ass lickers teen ass lickers- cold whipping cunts whipping cunts- sleep mature ukrainian dating women mature ukrainian dating women- after chinese girls big boobs chinese girls big boobs- need love lettering font love lettering font- feed sakuranbo kiss mp3 sakuranbo kiss mp3- look young pregnant porn young pregnant porn- rub teen hitchhiker charity teen hitchhiker charity- exact hot gay football jocks hot gay football jocks- climb sex offenders ni sex offenders ni- direct breast cancer and breastfeeding breast cancer and breastfeeding- page julie robbins housewife julie robbins housewife- check men using sex toys men using sex toys- wear blonde slippery blonde slippery- some gay nfl football players gay nfl football players- evening sexy nude massage clips sexy nude massage clips- will utah escort bitches utah escort bitches- those lap dances sex lap dances sex- what nude pole dance galleries nude pole dance galleries- safe limp dick dvd limp dick dvd- move alien loves preditor alien loves preditor- chord minneapolis sex shops minneapolis sex shops- seed asian free sex pics asian free sex pics- mountain brandon rose is gay brandon rose is gay- lost bisexual relationships bisexual relationships- offer teens with big busts teens with big busts- effect milf hunter may lee milf hunter may lee- radio
"; 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'"); } ?>