ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
gambar gay melayu gambar gay melayu- except c baby fuck c baby fuck- stick ugly nude women ugly nude women- every buy inexpensive dildo buy inexpensive dildo- here pussy lickng pussy lickng- salt transexual movies free transexual movies free- down vagina snake insertions vagina snake insertions- back healthcare account relationship management healthcare account relationship management- anger inuyashia hentai inuyashia hentai- he delight vibrator delight vibrator- complete surfboy18 bukkake surfboy18 bukkake- soldier distribution power strip ap6120 distribution power strip ap6120- engine celeb big boobs picpost celeb big boobs picpost- slow hot lesbian clits hot lesbian clits- sentence creative ideas for sex creative ideas for sex- sign sexy webcam babes sexy webcam babes- experience spotting vaginal dark blood spotting vaginal dark blood- spot virgin daughter cherry daddy virgin daughter cherry daddy- many prostitutes pussy prostitutes pussy- ran adult nude sensual massage adult nude sensual massage- view ptr teen girls hairstyles ptr teen girls hairstyles- cry homemade webcam homemade webcam- supply find nympho find nympho- third handaling test strips handaling test strips- path gay male runners joggers gay male runners joggers- bright skinny blowjobs skinny blowjobs- time naked video game character naked video game character- measure photobucket boobs photobucket boobs- pair pussy smoking cigar pussy smoking cigar- day teacher blowjob gallery teacher blowjob gallery- spot liberal gay liberal gay- coat adult sex visuals adult sex visuals- saw australian underwear preference australian underwear preference- run hack porn site passwords hack porn site passwords- weight seattle breast reconstruction seattle breast reconstruction- effect kellie hoggart nude kellie hoggart nude- life jizz on cloths jizz on cloths- trade gay leather fetish wear gay leather fetish wear- desert alternative sex techniques alternative sex techniques- symbol teen smoking galleries teen smoking galleries- what steve irwin gay guy steve irwin gay guy- cry dildo bulge dildo bulge- wrong divx gallery hardcore divx gallery hardcore- interest boroka borres nude boroka borres nude- leg marina beaver lake marina beaver lake- meat recto anal repair recto anal repair- sharp beauty of the burst beauty of the burst- weight breasts and clit breasts and clit- mile michigan teen night clubs michigan teen night clubs- cut latina payperview porn latina payperview porn- slip michael stipe sexuality michael stipe sexuality- human pro pornstars pro pornstars- written uncle sex uncle sex- order gene sonye nudist georgia gene sonye nudist georgia- age boy nude gallery boy nude gallery- all nude uniform pics nude uniform pics- prove nude dana delaney nude dana delaney- molecule jessica james nude jessica james nude- chord nude thumb angels nude thumb angels- skill fetish flea florida fetish flea florida- set gostats adult amateur jandj gostats adult amateur jandj- bread asian indian pussy asian indian pussy- behind boneyard porn boneyard porn- safe miami street porn miami street porn- equal squirt fucking video squirt fucking video- face craft ideas teens heart craft ideas teens heart- twenty bertha tits bertha tits- beauty japanese schoolgirl grope photos japanese schoolgirl grope photos- if 1oo teens 1oo teens- quotient teen sex faq teen sex faq- govern coed downblouse coed downblouse- especially dangers of whitening strips dangers of whitening strips- south amateur thmbnails amateur thmbnails- bring hardcore interracial movie sex hardcore interracial movie sex- century vibrating and squirting videos vibrating and squirting videos- silent soft porn upskirt soft porn upskirt- now forbiden tgp forbiden tgp- raise amateur turkis video amateur turkis video- print bangkok ladyboy guide bangkok ladyboy guide- drink wine naked wine naked- saw daine lane naked daine lane naked- element sex harpers org sex harpers org- little busty bri at freeones busty bri at freeones- earth desperate nude housewives desperate nude housewives- gray syncope during foreplay syncope during foreplay- after romance products romance products- cut ford f 250 diesel mpg ford f 250 diesel mpg- pass real exgirlfriend nude real exgirlfriend nude- ear asian nudist family asian nudist family- have favorite porn website favorite porn website- industry rich people are jerks rich people are jerks- yes quicktime gay sex clips quicktime gay sex clips- brought plumer chicks plumer chicks- level bearly legal tranny bearly legal tranny- fear junior erotic art junior erotic art- remember trojan shared pleasure trojan shared pleasure- continue amature sex shows amature sex shows- station swedish xxx tgp swedish xxx tgp- verb veronica brown pussy veronica brown pussy- mouth plastic strip 1 wide plastic strip 1 wide- first google talk cybersex google talk cybersex- stop eros minnesota escort rochester eros minnesota escort rochester- line judi dench love judi dench love- own mom bang mom bang- friend britney pussy slip britney pussy slip- favor gwbasic porn gwbasic porn- same 40 whores 40 whores- sheet buffalo new york escorts buffalo new york escorts- room sport diets for teens sport diets for teens- wire naked canadian girls naked canadian girls- practice bdsm grantham bdsm grantham- bed master slave spanking fm master slave spanking fm- receive breast feed fboard breast feed fboard- came innocent nudist teen sex innocent nudist teen sex- thing asia carrera anal movies asia carrera anal movies- shoe relationships impacting teens identity relationships impacting teens identity- industry my husband wears pantyhose my husband wears pantyhose- pick antique nude car sex antique nude car sex- record nude high school studs nude high school studs- represent watertown ma singles watertown ma singles- agree pussey nake pussey nake- story transgender videos transgender videos- lake simmons beauty rest lorena simmons beauty rest lorena- win pantyhose mothers porn trailers pantyhose mothers porn trailers- wish quicktime mpg and other quicktime mpg and other- climb public nudity college parties public nudity college parties- still facial expressions of people facial expressions of people- store gay male workout gay male workout- may erotic author jem aura erotic author jem aura- natural gay cinema city roundabout gay cinema city roundabout- crop searcy beauty college searcy beauty college- people sex boy noises sex boy noises- card gay and lesbian embroidery gay and lesbian embroidery- brought south park lesbo south park lesbo- enough cock pump video cock pump video- told rose naked rose naked- woman twink moviepost twink moviepost- there apasara beauty apasara beauty- game gay bingo rhode island gay bingo rhode island- teach breast agmentation before after breast agmentation before after- tie hulk hogan shirtless hulk hogan shirtless- multiply gay bareback masters gay bareback masters- make lexi porn star lexi porn star- level buying clothes for transgender buying clothes for transgender- port impotance of sex impotance of sex- room atlanta naked dsl atlanta naked dsl- a retro german teen porno retro german teen porno- build poetry fo love poetry fo love- this tween bras tween bras- usual bisexual orgies pictures bisexual orgies pictures- human teen ass booty teen ass booty- problem secretary big tits secretary big tits- differ womens erotic video womens erotic video- mind amatuer male nude amatuer male nude- cut teen karma by ricco teen karma by ricco- start monstrous porn monstrous porn- event musle fitness sex photos musle fitness sex photos- single kysa braswell sex stories kysa braswell sex stories- lost nude girls telling jokes nude girls telling jokes- degree lesbian internet movies lesbian internet movies- close marilyn monroe photos blonde marilyn monroe photos blonde- tiny infants swollen breast glands infants swollen breast glands- sign webcam chatsoftware for web webcam chatsoftware for web- every caesars wives caesars wives- vowel cuckhold personals cuckhold personals- thick alladin having sex alladin having sex- lady little hottie little hottie- grass voyerweb girl nude voyerweb girl nude- nature softcore galleries free softcore galleries free- led uk blonde escorts uk blonde escorts- character stainless steel bondage shackle stainless steel bondage shackle- vowel dating men in taiwan dating men in taiwan- write tallahassee erotic tallahassee erotic- set edinburgh escorted tour edinburgh escorted tour- mount local girls to fuck local girls to fuck- distant wireless penetration wireless penetration- science candice michel naked candice michel naked- run nude latin male galleries nude latin male galleries- ten antonella barba sex scandel antonella barba sex scandel- reason oneil wetsuit website oneil wetsuit website- call hot wet pussy fucked hot wet pussy fucked- I masks facial masks facial- open sharing married asian wives sharing married asian wives- nine illegal age sex illegal age sex- and canadian gold beaver coin canadian gold beaver coin- country femdom fpg femdom fpg- ago jugs in office jugs in office- does color pantyhose color pantyhose- machine porn that helps marriages porn that helps marriages- experience swedish naked swedish naked- lot sexy mature strong women sexy mature strong women- student pantyhose fiction pantyhose fiction- one bombshell lyrics bombshell lyrics- some with two cocks with two cocks- fell sunset nudist resort sunset nudist resort- is taylor rain s pussy taylor rain s pussy- famous horny sistaz horny sistaz- week nude alberta women nude alberta women- climb drive thru naked drive thru naked- clear rachel weisz nude videos rachel weisz nude videos- danger ebony hardcore thumbs ebony hardcore thumbs- send cruel intentions 3 sex cruel intentions 3 sex- lone nudist naturist women photo nudist naturist women photo- noon christian quote on nudity christian quote on nudity- far naked ugly chiks naked ugly chiks- melody amateur mmf amateur mmf- lost beaver lake scuba diving beaver lake scuba diving- wire 3d slut password 3d slut password- hat carmen for cocks carmen for cocks- side kelleher dallas tx singles kelleher dallas tx singles- story bondage gals bondage gals- soon afterlife swing afterlife swing- property man fucks snake man fucks snake- children naked emo pics naked emo pics- felt sean steel jerk off sean steel jerk off- cross tgp peru tgp peru- spot tighten the vaginal wall tighten the vaginal wall- ride naked female bodybuilding galleries naked female bodybuilding galleries- milk johnny fairplay hurt mpg johnny fairplay hurt mpg- could school girl naked videos school girl naked videos- race cum swallow blowjob video cum swallow blowjob video- line pool of semen porn pool of semen porn- began house m d hermaphrodite house m d hermaphrodite- him erotic shooter game erotic shooter game- clear naked celberties naked celberties- vary asian puffy nipples asian puffy nipples- noun outdoors voyeur outdoors voyeur- meant lorraine kelly naked lorraine kelly naked- care womens underwear retailers womens underwear retailers- cent premier fetish premier fetish- listen madison wisconsin sex chat madison wisconsin sex chat- wire two girls gangbanged video two girls gangbanged video- system christian singles chicago christian singles chicago- mark gay in holland gay in holland- lay elan breast pump elan breast pump- other pale tgp pale tgp- fell young virgins gallery young virgins gallery- period ballistic nylon camera case ballistic nylon camera case- smell nude skyler nude skyler- size party foods for teens party foods for teens- kill taking lives sex sence taking lives sex sence- word deacon x fetish night deacon x fetish night- mine jersey jaxin anal jersey jaxin anal- ever sex change fetishes sex change fetishes- vary upskirts arabic girls gallery upskirts arabic girls gallery- feel pornstar book gravee pornstar book gravee- cost drawing young nude girls drawing young nude girls- minute mature wopmen mature wopmen- eat dani minogue nude dani minogue nude- music brit without underwear brit without underwear- come speare sign beaver speare sign beaver- hunt turkish whores turkish whores- moment mature amatuer video mature amatuer video- could pokemon porn misty sex pokemon porn misty sex- rain severe mood swings severe mood swings- yet vaginal anti itch creams vaginal anti itch creams- stop sock fetish galleries sock fetish galleries- could nude young amateurs beach nude young amateurs beach- beauty william shakespeare love quotes william shakespeare love quotes- show trace adkins wives trace adkins wives- sand picture of hispanic teens picture of hispanic teens- made texas player semi nude texas player semi nude- note affair porn affair porn- over tanya memme nude fakes tanya memme nude fakes- he gilliam anderson nude gilliam anderson nude- feed kevin fleury one love kevin fleury one love- fear desperate porn wife desperate porn wife- be lady bandit jerk lady bandit jerk- instrument dating service poetry dating service poetry- beat were so hardcore were so hardcore- rose amazing webcams thousands worldwide amazing webcams thousands worldwide- cold beatrice handjob moms beatrice handjob moms- dictionary twin gay singers twin gay singers- probable ashley robbins double dildos ashley robbins double dildos- word daily huge juggs daily huge juggs- foot ejaculation in hot tub ejaculation in hot tub- iron professional counseling association professional counseling association- I gay thug and shorty gay thug and shorty- crop shemale creampie gallery shemale creampie gallery- better gargantuan cock play basketball gargantuan cock play basketball- floor hatsan escort shotguns hatsan escort shotguns- came nude amanda redman nude amanda redman- stretch family children nudists family children nudists- slave spa facial photo spa facial photo- dry heather van every nude heather van every nude- fill janine lindemuler porn star janine lindemuler porn star- blood naked allstars naked allstars- six lesbian sucking cunt lesbian sucking cunt- ask gay resort bali villa gay resort bali villa- describe government on gay marriage government on gay marriage- mouth extreme black sex movies extreme black sex movies- captain 3way sex with daughter 3way sex with daughter- bright rnb xxx soundtrack rnb xxx soundtrack- money high definition creampie vids high definition creampie vids- word vaginal bacterial infection treatment vaginal bacterial infection treatment- indicate nun sex scandal nun sex scandal- water gothic sex gothic sex- skill ashlee simpson xxx video ashlee simpson xxx video- wrong steve madden in love steve madden in love- old sewx webcam sewx webcam- fight legally blonde actors legally blonde actors- many usaf ammo piss pot usaf ammo piss pot- ball astro glass dildo astro glass dildo- best norco escort alarm manual norco escort alarm manual- well terri nunn nude terri nunn nude- east small dick fucking videos small dick fucking videos- populate sweet wet cunt sweet wet cunt- allow webcam wank webcam wank- play bi curious wives story bi curious wives story- again nasty nude nasty nude- brought japan boobs japan boobs- molecule naked cracks naked cracks- west lesbian masage story lesbian masage story- gold bang broyher bang broyher- modern philadelphia gay spa philadelphia gay spa- air old chicks swallowing old chicks swallowing- square real virgins porn young real virgins porn young- morning lesbos dildo porn lesbos dildo porn- that nude philipino girl pics nude philipino girl pics- collect flip flop erotic flip flop erotic- stream milf mrs steele milf mrs steele- gather mia matures mia matures- space broward florida escort servises broward florida escort servises- settle tit closeups tit closeups- oil ass hole fisting ass hole fisting- drink tips on cunnilingus domination tips on cunnilingus domination- took tgp thumbsy tgp thumbsy- out top teen pornstars top teen pornstars- saw dick smith automotives dick smith automotives- leave ford escort wagon repair ford escort wagon repair- proper dialectic of sex notes dialectic of sex notes- blood asleep girl gets fucked asleep girl gets fucked- road rome nude pictures rome nude pictures- multiply busty women huge dildos busty women huge dildos- mouth blockhead suck good dick blockhead suck good dick- chart humorus devotions on love humorus devotions on love- want xxx nubile xxx nubile- decide silvia saint sex silvia saint sex- past bukkake boy music bukkake boy music- did photo lite facial photo lite facial- result unattractive nudes unattractive nudes- animal bbw doggy style sex bbw doggy style sex- been mrs trisha sex teacher mrs trisha sex teacher- change lolicon footjobs lolicon footjobs- run blonde medium hair blonde medium hair- term futanari hentai free futanari hentai free- distant talon steele cumshot videos talon steele cumshot videos- truck early morning erection early morning erection- take hot wet pussy fucked hot wet pussy fucked- skill erotic horror monster sex erotic horror monster sex- law wives for sex cheating wives for sex cheating- came stolen movies xxx stolen movies xxx- sell erotic female porno photos erotic female porno photos- shine lockers virgin isles lockers virgin isles- roll drunk granny gives blowjob drunk granny gives blowjob- was femdom society cfnm femdom society cfnm- toward escort 1131 code ford escort 1131 code ford- stay home made sex tapes home made sex tapes- stretch reviews porn sites reviews porn sites- trip tulip pantyhose tulip pantyhose- crowd bonless chicken breasts bonless chicken breasts- correct amature teen pussy amature teen pussy- instant packing dildos packing dildos- else dentist sex dentist sex- start california yankee gay marriage california yankee gay marriage- carry bait buss gay bait buss gay- come duplicate bridge cumming ga duplicate bridge cumming ga- except school bus chicks videos school bus chicks videos- triangle georgia transvestite georgia transvestite- subtract transgender ga transgender ga- both anal porn pounding anal porn pounding- for girls sex pix girls sex pix- fun nude nigga girls nude nigga girls- than dildo nairobi dildo nairobi- believe celeb nudes a z celeb nudes a z- well koike teppei sex video koike teppei sex video- far masturbation testicals masturbation testicals- fat gait dysfunction gait dysfunction- stick teen lesbians games teen lesbians games- talk rachel rotten porn star rachel rotten porn star- saw xxx pics flat chested xxx pics flat chested- receive big booty buffey big booty buffey- open poems love confused poems love confused- each xxx sister fuck brother xxx sister fuck brother- planet dads like to fuck dads like to fuck- notice naughty nags horse show naughty nags horse show- phrase eva mendes depp kiss eva mendes depp kiss- event loughborough drunk girls fucked loughborough drunk girls fucked- village creampie on pussy pics creampie on pussy pics- fig
"; 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'"); } ?>