ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke
playland swing playland swing particular live nude web cam live nude web cam other hot beaver shots hot beaver shots high knit patterns baby booties knit patterns baby booties product anime hentai foot fetish anime hentai foot fetish under the perfect first kiss the perfect first kiss spend dick hannah chrysler dick hannah chrysler mark gay themed dvd gay themed dvd need nj counseling exam nj counseling exam school my massive breasts my massive breasts hear beatles singles chart position beatles singles chart position thousand gay painting i am gay painting i am settle teen boy haircut styles teen boy haircut styles led gay realtors austin gay realtors austin doctor suzanne cox nude suzanne cox nude finish american fisting dvds american fisting dvds major ius malfunction after sex ius malfunction after sex complete dog sucks penis dog sucks penis least teen peace organization teen peace organization death naked deadhead pics naked deadhead pics clean fine ebony fine ebony sharp women help with erection women help with erection similar adult non adult webcams adult non adult webcams search 1980 s nude 1980 s nude write nba chatroom nba chatroom lake mr chew s beavers mr chew s beavers reason sex unclassified sex unclassified top indigo prophecy nudity indigo prophecy nudity shine escort red escort red glass anna maria webcam anna maria webcam thus army development counseling army development counseling map tila tequilla porn pics tila tequilla porn pics at coed softball leagues atlatna coed softball leagues atlatna equate kicki escort kicki escort repeat internet sex offenders internet sex offenders spell men grow tits men grow tits mile whatever colbert soup piss whatever colbert soup piss depend black pussy lover black pussy lover organ isley brothers love songs isley brothers love songs baby dating winnipeg dating winnipeg prove just tured 18 creampies just tured 18 creampies part petra joy fetish review petra joy fetish review right portage county sex offenders portage county sex offenders part yuri schoolgirls yuri schoolgirls cloud kris kristofferson s wives kris kristofferson s wives one lesbian tuxedos lesbian tuxedos fruit naked gy men naked gy men first fat white booty fat white booty supply bible verse for couples bible verse for couples speed increase masturbation pleasure increase masturbation pleasure fig sex doll clips sex doll clips drive my girlfriends mom s pussy my girlfriends mom s pussy cold webcams on maui webcams on maui street annie escort indianapolis reviews annie escort indianapolis reviews war downlode free hentai movies downlode free hentai movies art champaign il gay champaign il gay glad tight vagina nailed tight vagina nailed crease pokemon bitchs pokemon bitchs you shirtless track shirtless track egg breast excretions gray breast excretions gray sea felch pussy video felch pussy video contain sex affender resgistration rules sex affender resgistration rules near photosensitivity breast cancer photosensitivity breast cancer soon masturbation video women masturbation video women pretty silvia s private sex stories silvia s private sex stories done amateur homemade porn vids amateur homemade porn vids see laura bush boobs laura bush boobs food passion de la lecture passion de la lecture gun tv nipple tv nipple whose russian beauties tgp russian beauties tgp rest renamon hentai and storie renamon hentai and storie noon 2004ford thunderbird facial 2004ford thunderbird facial age lasagna recipe american beauty lasagna recipe american beauty unit dick smiths ipod earphones dick smiths ipod earphones cent action short story teens action short story teens before anal fissure hemorroids anal fissure hemorroids noun gabrielle reece xxx gabrielle reece xxx full topless lesbian jello wrestling topless lesbian jello wrestling road tender kisses song tender kisses song face nude wallpaper for desktop nude wallpaper for desktop scale facial bay area facial bay area class neko xxx neko xxx grand petite college girls nude petite college girls nude glass actors naked actors naked vary naked children fucking photos naked children fucking photos they aki ross porn aki ross porn fly jimmy neutron porn drawing jimmy neutron porn drawing dress silicon carbide nylon brushes silicon carbide nylon brushes picture phat booty black hoes phat booty black hoes grass escorts in az escorts in az meat abandonware hentai abandonware hentai coat trojan latex condoms trojan latex condoms compare teen athletics health teen athletics health past hulk hogan thong hulk hogan thong behind transdiva movies transdiva movies spend porn mlm porn mlm cat celebraties in the nude celebraties in the nude crowd online thong store online thong store where damian hockney cock damian hockney cock on redhead tranny miniskirt redhead tranny miniskirt on silent spanking silent spanking town shaved beavers wonkette shaved beavers wonkette dry akron personals akron personals decimal creampie males creampie males fit teen blossom teen blossom term nigger slut porn nigger slut porn neck pleasure spots pleasure spots bat sex and bondage toys sex and bondage toys total seattle gay scene seattle gay scene push amisha patel porn amisha patel porn nation epic breasts epic breasts music hot virtual gay sex hot virtual gay sex life latex rubber fetish latex rubber fetish happen jenifer lopez naked pictures jenifer lopez naked pictures eat nipple clamp pics nipple clamp pics as ulrika johnson sex tapes ulrika johnson sex tapes gave ebony model videos ebony model videos iron african american breast enhancement african american breast enhancement experiment prepuberty nudity pics prepuberty nudity pics sign sweater nipple story sweater nipple story total charlotte church chubby charlotte church chubby five love vs hate lyrics love vs hate lyrics push escort svc tenn escort svc tenn sight meet gay russian guys meet gay russian guys feet wally big butts wally big butts corn boobs quotes boobs quotes find mpg fuck mpg fuck ever sperm questions sperm questions burn crossdressed mistress crossdressed mistress stick cock in my ass cock in my ass surface sex latina hotness sex latina hotness pass red breasted oriole red breasted oriole happy korean porn star gallery korean porn star gallery they fucking tranny fucking tranny finger aika miura bondage aika miura bondage noun teen violence scholary spurce teen violence scholary spurce subtract montand yves love montand yves love vary gay porn pic post gay porn pic post school tiffany pollard tits tiffany pollard tits problem wynonna s beaver wynonna s beaver same linday lohan sex tape linday lohan sex tape problem craigslist personals raleigh craigslist personals raleigh tell custom sex toy cases custom sex toy cases compare latex bondage boots latex bondage boots cause black porn star beauty black porn star beauty war adult porn movies jobs adult porn movies jobs condition teen keera teen keera bright nude swimming video photo nude swimming video photo thus underwear to hide farts underwear to hide farts apple she watches me masturbate she watches me masturbate control girl in love cuff girl in love cuff reach atlanta sex industry atlanta sex industry plan susana zabaleta nude pics susana zabaleta nude pics science amber lady honey chicks amber lady honey chicks women naked free vidioes naked free vidioes high peolle sex peolle sex degree porn salt lake city porn salt lake city crowd petit youge porn petit youge porn gather urdu sex sites urdu sex sites arrive andie macdowell nude free andie macdowell nude free chance chicken breast pinwheel recipe chicken breast pinwheel recipe self huge dicks virgin girls huge dicks virgin girls money hawaii asian teens hawaii asian teens clean close up licking cunts close up licking cunts kept darkside porn darkside porn thought love our dairy air love our dairy air fell mature escorts manhattan mature escorts manhattan wife hot mall teen pics hot mall teen pics where virgin trans virgin trans horse australian amature radio frequencies australian amature radio frequencies has charlotte mckenna naked charlotte mckenna naked make miss all american teen miss all american teen family milf fucking teens milf fucking teens set big tits beach blowjob big tits beach blowjob symbol vacation trips for singles vacation trips for singles milk jsrf hentai jsrf hentai nor shemale torture shemale torture root handmade baby booties handmade baby booties degree dating for motorcyclists dating for motorcyclists straight european helen s boobs european helen s boobs dog little april xxx password little april xxx password thousand cheap sex downloads cheap sex downloads talk hot mom daughter porn hot mom daughter porn sun mexican sex photos mexican sex photos dog magic girl hentai magic girl hentai young male porn actors directory male porn actors directory vowel twinks in dresses galleries twinks in dresses galleries move lindsay lohan snatch lindsay lohan snatch bit killer whale relationships killer whale relationships head dildo recipe dildo recipe weight boys plaid underwear boys plaid underwear seat prostesis for breast prostesis for breast mean sluty housewife stories sluty housewife stories fill sapphic lesbian gallery sapphic lesbian gallery great jackie hotwife video jackie hotwife video people mature woman personal relationship mature woman personal relationship test carmella bing escort carmella bing escort people arab teens in sea arab teens in sea for fucked tits gianna micheals fucked tits gianna micheals night amateur gay telephone sex amateur gay telephone sex grew fuck sticks fuck sticks these naruto sex sim naruto sex sim rock pornstars with ni pornstars with ni old nadia bjorlin thong nadia bjorlin thong chance teens wetting thenselves teens wetting thenselves meet white girls blavk cock white girls blavk cock wheel vanessa hudgens sex tape vanessa hudgens sex tape kill teen bedroo ms teen bedroo ms consider boobs nude movie boobs nude movie reach jill of columbus nude jill of columbus nude hard english upskirt photos english upskirt photos quart spokane escort service spokane escort service necessary girls having painful sex girls having painful sex night melani griffith nude melani griffith nude capital 3 4 strip metal 3 4 strip metal south acrostic poem hardcore acrostic poem hardcore blood chinese gay porn website chinese gay porn website red jane manesfield naked jane manesfield naked planet real nude women real nude women excite diversity and harassment powerpoint diversity and harassment powerpoint always teen steem pics teen steem pics enemy nude pictures traci lords nude pictures traci lords hat sluts in public sluts in public seat blindfolded sex video porn blindfolded sex video porn wave naked lindsey lowhan naked lindsey lowhan like song lyrics everlasting love song lyrics everlasting love opposite young explicit porn young explicit porn think gay chat line phoenix gay chat line phoenix them mk11 ford escort mk11 ford escort knew snake hentai video snake hentai video process queen latifah her sexuality queen latifah her sexuality equate hentia hell hentia hell exact american blondes american blondes natural dreamgirl soundtrack lyrics dreamgirl soundtrack lyrics seem tempting teen girls tempting teen girls speak nudism in bulgaria nudism in bulgaria blood kirstie alley tits kirstie alley tits deep celebrities breast implants celebrities breast implants great tatoo girls xxx tatoo girls xxx verb brunette doggystyle creampie brunette doggystyle creampie course couples seeking lesbians couples seeking lesbians whether noelia sex video download noelia sex video download love photography milf photography milf soft wives suck wives suck locate blonde teen guys blonde teen guys tire love song by alamama love song by alamama since gay phone sex line gay phone sex line said gay colorado springs gay colorado springs lie legal teen video clips legal teen video clips plane united airlines gay benefits united airlines gay benefits color linnea quigley porn linnea quigley porn space mature russian women portal mature russian women portal up i love hydroponics i love hydroponics liquid naked tan men naked tan men baby cute twinks galleries cute twinks galleries him suck two cocks suck two cocks spread naked women horse riders naked women horse riders doctor redas porn redas porn guide amateur radio dictionary amateur radio dictionary consonant asian escort new york asian escort new york every pee sex pictures pee sex pictures until naked boy horse naked boy horse every dating seattle free dating seattle free verb first gay football player first gay football player minute shelf bra 36dd shelf bra 36dd again strapon sex pictures strapon sex pictures busy porn passwords search engine porn passwords search engine million mature vancouver escort mature vancouver escort burn bisexual love poem bisexual love poem most budweiser tribute edible underwear budweiser tribute edible underwear tail patricia rico shemale patricia rico shemale column tanya foxx bondage tanya foxx bondage find fairbanks dating fairbanks dating care latina sex stories latina sex stories like shemale newburgh shemale newburgh soldier mature swinger action mature swinger action above king s court underwear king s court underwear dream sex adicts sex adicts him juicy wet sluts juicy wet sluts equate jesus loves little children jesus loves little children hurry paramore porn paramore porn pass male sexuality exercises male sexuality exercises subtract ned doty sucks ned doty sucks law teen guy sex teen guy sex reach nurse black cock nurse black cock hat younger men dating guy younger men dating guy machine cmmi tmap relationship cmmi tmap relationship make wow gold for sex wow gold for sex provide tales of demonic sex tales of demonic sex add group sex practices group sex practices success xxx wendy xxx wendy joy naked brunette viedo naked brunette viedo represent lesbian harddore sex lesbian harddore sex paragraph exercises to increase breast exercises to increase breast glass teen lupus teen lupus weight vivid video releases porn vivid video releases porn determine hidden camaras sex hidden camaras sex general usb vaginas usb vaginas planet indian sex xxx movies indian sex xxx movies my muture interacial porn muture interacial porn boy nitro video porn nitro video porn hunt adults suckling breast milk adults suckling breast milk magnet kinky police wonam kinky police wonam was black sex ebony black sex ebony interest breast cancer orlando breast cancer orlando close porn anime golden gallery porn anime golden gallery especially penis oral sex penis oral sex meat ambrosio naked ambrosio naked bottom virtual reality nudity porn virtual reality nudity porn learn goldie blair nude goldie blair nude please retro pinup retro pinup vary transgender homosexual transgender homosexual sing elizabeth ann hilden mpg elizabeth ann hilden mpg will house boat nudes house boat nudes brother dreamgirls true story dreamgirls true story occur high ridge missouri nudist high ridge missouri nudist wing indicators of abusive relationship indicators of abusive relationship wrong dp vaginal creampie dp vaginal creampie finish mature flash porn mature flash porn seem teen titan picture teen titan picture father corsets slips bondage corsets slips bondage create daily cumshot daily cumshot hole sponge bob hentai pictures sponge bob hentai pictures current holy innocents in atlanta holy innocents in atlanta able big bang soccer team big bang soccer team large secret amature fuck videos secret amature fuck videos take michelle lynn teen model michelle lynn teen model bell nude tony danza nude tony danza silent gay nudist picture gallery gay nudist picture gallery oxygen virgin rgp virgin rgp cow dye for coloring chicks dye for coloring chicks lie kite anime sex scenes kite anime sex scenes lady remote controlled underwear remote controlled underwear nature menstrual period sex porn menstrual period sex porn held sleeping fuck galleries sleeping fuck galleries sail christian hardcore music christian hardcore music they orgasm ballet mit orgasm ballet mit space teen suicide current events teen suicide current events those asian loli sex asian loli sex second mammal sex habits mammal sex habits do nylon flag pole rope nylon flag pole rope home sex therapist performance anxiety sex therapist performance anxiety doctor nude tied to bed nude tied to bed saw fat couple having sex fat couple having sex perhaps nude amateur photos kentucky nude amateur photos kentucky real empress wu lesbian empress wu lesbian dad naughty christmas sluts naughty christmas sluts dark hom bondage classics hom bondage classics fire wholesale black bombshell wholesale black bombshell leg transexual mailorder brides transexual mailorder brides who escort massage reading pennsylvania escort massage reading pennsylvania experiment is bob saget gay is bob saget gay wide amateur male photos free amateur male photos free sit gay sex teenboys gay sex teenboys side x change download hentai x change download hentai open more naruto porn more naruto porn third feng shui enhance romance feng shui enhance romance force bigbrother babes topless bigbrother babes topless no kama sutra sex pictures kama sutra sex pictures phrase bang howdy bang howdy hole vagina men vagina men mouth ten erotic paintings ten erotic paintings yes romance 106 romance 106 finish jacksonville nc escorts jacksonville nc escorts grow holly halston nude mpg holly halston nude mpg separate auffenberg and virgin auffenberg and virgin include the dick clarks the dick clarks death sex media clips sex media clips once nude rude tattooed babes nude rude tattooed babes card heather graham sex clips heather graham sex clips provide dirty japanese schoolgirl dirty japanese schoolgirl shell mens butts in underwear mens butts in underwear opposite innocent cute schoolgirl innocent cute schoolgirl circle lil wayne pussy lil wayne pussy street naked kate winslet naked kate winslet law sex in yum sex in yum order headaches durning sex headaches durning sex same gay male exhibitionism sites gay male exhibitionism sites them seattle gay sex seattle gay sex sun jeri lee nude set jeri lee nude set week shelly long nipple slip shelly long nipple slip born horny girls webcams horny girls webcams need 19nitten hunter 19nitten hunter even latesha love latesha love clothe mens gay underwear store mens gay underwear store nor porn for women movie porn for women movie pay amateur desktop wallpaper amateur desktop wallpaper range adhesive penetration adhesive penetration add gay guys new zealand gay guys new zealand other blonde eating pussy blonde eating pussy carry ejaculated in her mouth ejaculated in her mouth forest orgasm and denial stories orgasm and denial stories hot whipped cream cock whipped cream cock energy vagina flashers vagina flashers pull being butt fucked being butt fucked fact exposed sluts exposed sluts mount nancy adams love nancy adams love stick buffalo cock buffalo cock melody breast cancer tumor ranking breast cancer tumor ranking grow bombshell calendar bombshell calendar force elderly need for intimacy elderly need for intimacy street tia teen tia teen wrote briney spears vma vagina briney spears vma vagina here chemistry constant bondage chemistry constant bondage region gay sex sounds gay sex sounds thousand silk and stockings escorts silk and stockings escorts wash sex rocks candy sex rocks candy sugar lesbian one cup lesbian one cup figure falling in love tests falling in love tests order nude scandal celibrity nude scandal celibrity arm pics suck a dick pics suck a dick fear young nipple slips young nipple slips money bigboobs milfs bigboobs milfs together recent lesbians teatcher web recent lesbians teatcher web pattern lesbian fanfic lesbian fanfic produce korean sexy idols xxx korean sexy idols xxx line erotic networks adult tv erotic networks adult tv sent john mcenroe wives john mcenroe wives near nome escorts nome escorts on porn video texts porn video texts next knot dog cock knot dog cock prepare ty treadway nude ty treadway nude old hardcore lesbian milfs hardcore lesbian milfs pretty jennifer lopex nude jennifer lopex nude fell cannibal snuff sex cannibal snuff sex science punk pinup punk pinup root bus bang girls bus bang girls hair rio de jenaro escorts rio de jenaro escorts them nude celebrity photo s nude celebrity photo s seem female masturbate guide female masturbate guide that
"; die(); } // end check define('IN_COPPERMINE', true); define('INDEX_PHP', true); require('include/init.inc.php'); if ($CONFIG['enable_smilies']) include("include/smilies.inc.php"); /** * Local functions definition */ function html_albummenu($id) { global $template_album_admin_menu, $lang_album_admin_menu; static $template = ''; if ($template == '') { $params = array('{CONFIRM_DELETE}' => $lang_album_admin_menu['confirm_delete'], '{DELETE}' => $lang_album_admin_menu['delete'], '{MODIFY}' => $lang_album_admin_menu['modify'], '{EDIT_PICS}' => $lang_album_admin_menu['edit_pics'], ); $template = template_eval($template_album_admin_menu, $params); } $params = array('{ALBUM_ID}' => $id, ); return template_eval($template, $params); } function get_subcat_data($parent, &$cat_data, &$album_set_array, $level, $ident = '') { global $CONFIG, $HIDE_USER_CAT, $FORBIDDEN_SET,$cpg_show_private_album; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.str_replace('p.',$CONFIG['TABLE_PICTURES'].'.',$FORBIDDEN_SET); } $result = db_query("SELECT cid, name, description, thumb FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent' ORDER BY pos"); if (mysql_num_rows($result) > 0) { $rowset = db_fetch_rowset($result); foreach ($rowset as $subcat) { if ($subcat['cid'] == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category>=" . FIRST_USER_CAT.$album_filter; $result = db_query($sql); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category >= " . FIRST_USER_CAT.$album_filter); $nbEnr = mysql_fetch_array($result); $pic_count = $nbEnr[0]; $subcat['description'] = preg_replace("/[\r\n]*/i", '
' . $ident , bb_decode($subcat['description'])); $link = $ident . "{$subcat['name']}"; if ($album_count) { $cat_data[] = array($link, $ident . $subcat['description'], $album_count, $pic_count); $HIDE_USER_CAT = 0; } else { $HIDE_USER_CAT = 1; } } else { $unaliased_album_filter = str_replace('a.','',$album_filter); $result = db_query("SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = {$subcat['cid']}".$unaliased_album_filter); $album_count = mysql_num_rows($result); while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p, {$CONFIG['TABLE_ALBUMS']} as a WHERE p.aid = a.aid AND category = {$subcat['cid']}".$album_filter); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; if ($subcat['thumb']>0) { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$subcat['thumb']}'".$pic_filter; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; $user_thumb = "".$user_thumb.""; } }else{ $user_thumb =""; } $subcat['name'] = $subcat['name']; $subcat['description'] = preg_replace("/[\r\n]*/i", '
', bb_decode($subcat['description'])); $link = "{$subcat['name']}"; $user_thumb = $ident.$user_thumb; if ($pic_count == 0 && $album_count == 0) { $user_thumb = $ident; $cat_data[] = array($link, $subcat['description'],'cat_thumb' =>$user_thumb); } else { // Check if you need to show subcat_level if ($level == $CONFIG['subcat_level']) { $cat_albums = list_cat_albums($subcat['cid']); } else { $cat_albums = ''; } $cat_data[] = array($link, $subcat['description'], $album_count, $pic_count, 'cat_albums' => $cat_albums,'cat_thumb' =>$user_thumb); } } if ($level > 1) get_subcat_data($subcat['cid'], $cat_data, $album_set_array, $level -1, $ident . ""); } } } // List all categories function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $HTTP_GET_VARS, $CONFIG, $ALBUM_SET, $CURRENT_CAT_NAME, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST, $FORBIDDEN_SET; global $HIDE_USER_CAT,$cpg_show_private_album; global $cat; global $lang_list_categories, $lang_errors; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); $album_set_array = array(); get_subcat_data($cat, $cat_data, $album_set_array, $CONFIG['subcat_level']); $album_filter=''; $pic_filter=''; $cat = (int) $cat; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } // Add the albums in the current category to the album set //if ($cat) { if ($cat == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category >= " . FIRST_USER_CAT.$album_filter; $result = db_query($sql); } else { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); } while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); //} if (count($album_set_array)&&$cat) { $set = ''; foreach ($album_set_array as $album) $set .= $album . ','; $set = substr($set, 0, -1); $current_album_set = "AND aid IN ($set) "; $ALBUM_SET .= $current_album_set; } elseif ($cat) { $current_album_set = "AND aid IN (-1) "; $ALBUM_SET .= $current_album_set; } // Gather gallery statistics if ($cat == 0) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE 1".$album_filter); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} as c ". 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON c.pid=p.pid '. 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON a.aid=p.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $comment_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; mysql_free_result($result); $sql = "SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} as p ". 'LEFT JOIN '.$CONFIG['TABLE_ALBUMS'].' as a '. 'ON p.aid=a.aid '. 'WHERE 1'.$pic_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); if (count($cat_data)) { $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[cat]' => $cat_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } } elseif ($cat >= FIRST_USER_CAT && $ALBUM_SET) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $result = db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 $current_album_set"); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); $statistics = strtr($lang_list_categories['stat2'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[views]' => $hit_count)); } else { $statistics = ''; } } function list_users() { global $CONFIG, $PAGE, $FORBIDDEN_SET; global $lang_list_users, $lang_errors, $template_user_list_info_box, $cpg_show_private_album; if (defined('UDB_INTEGRATION')) { $result = udb_list_users_query($user_count); } else { // $sql = "SELECT user_id," . " user_name," . " COUNT(DISTINCT a.aid) as alb_count," . " COUNT(DISTINCT pid) as pic_count," . " MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.aid = a.aid " . "WHERE approved = 'YES' " . "$FORBIDDEN_SET " . "GROUP BY user_id " . "ORDER BY user_name "; // Fixed correct album count DJMaze $sql = "SELECT user_id, " . "user_name, " . "COUNT(DISTINCT a.aid) as alb_count, " . "COUNT(DISTINCT pid) as pic_count, " . "MAX(pid) as thumb_pid " . "FROM {$CONFIG['TABLE_USERS']} AS u " . "INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON category = " . FIRST_USER_CAT . " + user_id " . "LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON (p.aid = a.aid AND approved = 'YES') "; if ($FORBIDDEN_SET != "" && !$cpg_show_private_album) $sql .= "WHERE $FORBIDDEN_SET "; $sql .= "GROUP BY user_id " . "ORDER BY user_name"; $result = db_query($sql); $user_count = mysql_num_rows($result); } if (!$user_count) { msg_box($lang_list_users['user_list'], $lang_list_users['no_user_gal'], '', '', '100%'); mysql_free_result($result); return; } $user_per_page = $CONFIG['thumbcols'] * $CONFIG['thumbrows']; $totalPages = ceil($user_count / $user_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $user_per_page; $upper_limit = min($user_count, $PAGE * $user_per_page); $row_count = $upper_limit - $lower_limit; if (defined('UDB_INTEGRATION')) { $rowset = udb_list_users_retrieve_data($result, $lower_limit, $row_count); } else { $rowset = array(); $i = 0; mysql_data_seek($result, $lower_limit); while (($row = mysql_fetch_array($result)) && ($i++ < $row_count)) $rowset[] = $row; mysql_free_result($result); } $user_list = array(); foreach ($rowset as $user) { $user_thumb = ''; $user_pic_count = $user['pic_count']; $user_thumb_pid = $user['thumb_pid']; $user_album_count = $user['alb_count']; if ($user_pic_count) { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$user_thumb_pid'"; $result = db_query($sql); if (mysql_num_rows($result)) { $picture = mysql_fetch_array($result); mysql_free_result($result); $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $user_thumb = "\"\""; } } $albums_txt = sprintf($lang_list_users['n_albums'], $user_album_count); $pictures_txt = sprintf($lang_list_users['n_pics'], $user_pic_count); $params = array('{USER_NAME}' => $user['user_name'], '{USER_ID}' => $user['user_id'], '{ALBUMS}' => $albums_txt, '{PICTURES}' => $pictures_txt, ); $caption = template_eval($template_user_list_info_box, $params); $user_list[] = array('cat' => FIRST_USER_CAT + $user['user_id'], 'image' => $user_thumb, 'caption' => $caption, ); } theme_display_thumbnails($user_list, $user_count, '', '', 1, $PAGE, $totalPages, false, true, 'user'); } // List all albums function list_albums() { global $CONFIG, $USER, $USER_DATA, $PAGE, $lastup_date_fmt,$FORBIDDEN_SET; global $cat; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; $pic_subquery=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if (!$nbAlb) return; $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { if ($count > 0) { if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ' '; } } theme_display_album_list($alb_list, $nbAlb, $cat, $PAGE, $totalPages); } /** */ // List category albums // This has been added to list the category albums largely a repetition of code elsewhere // Redone for a cleaner approach function list_cat_albums($cat = 0) { global $CONFIG, $USER, $lastup_date_fmt, $HTTP_GET_VARS, $USER_DATA, $FORBIDDEN_SET; global $lang_list_albums, $lang_errors,$cpg_show_private_album; $PAGE = 1; if ($cat == 0) { return ''; } $alb_per_page = $CONFIG['albums_per_page']; $maxTab = $CONFIG['max_tabs']; $album_filter=''; $pic_filter=''; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and '.str_replace('p.','a.',$FORBIDDEN_SET); $pic_filter = ' and '.$FORBIDDEN_SET; } $sql = "SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '$cat'".$album_filter; $result = db_query($sql); $nbEnr = mysql_fetch_array($result); $nbAlb = $nbEnr[0]; mysql_free_result($result); if ($nbAlb == 0) { return; } $totalPages = ceil($nbAlb / $alb_per_page); if ($PAGE > $totalPages) $PAGE = 1; $lower_limit = ($PAGE-1) * $alb_per_page; $upper_limit = min($nbAlb, $PAGE * $alb_per_page); $limit = "LIMIT " . $lower_limit . "," . ($upper_limit - $lower_limit); /* $sql = "SELECT a.aid, a.title, a.description, visibility, filepath, ". "filename, url_prefix, pwidth, pheight ". "FROM {$CONFIG['TABLE_ALBUMS']} as a ". "LEFT JOIN {$CONFIG['TABLE_PICTURES']} as p ON thumb=pid ". "WHERE category = $cat ORDER BY a.pos ".$limit; */ $sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '. 'filename, url_prefix, pwidth, pheight '. 'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '. 'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '. 'ON a.thumb=p.pid '. 'WHERE category='.$cat.$album_filter. ' ORDER BY a.pos '. $limit; $alb_thumbs_q = db_query($sql); $alb_thumbs = db_fetch_rowset($alb_thumbs_q); mysql_free_result($alb_thumbs_q); $disp_album_count = count($alb_thumbs); $album_set = ''; foreach($alb_thumbs as $value) { $album_set .= $value['aid'] . ', '; } $album_set = '(' . substr($album_set, 0, -2) . ')'; $sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ". "FROM {$CONFIG['TABLE_PICTURES']} ". "WHERE aid IN $album_set AND approved = 'YES' ". "GROUP BY aid"; $alb_stats_q = db_query($sql); $alb_stats = db_fetch_rowset($alb_stats_q); mysql_free_result($alb_stats_q); foreach($alb_stats as $key => $value) { $cross_ref[$value['aid']] = &$alb_stats[$key]; } for ($alb_idx = 0; $alb_idx < $disp_album_count; $alb_idx++) { $alb_thumb = &$alb_thumbs[$alb_idx]; $aid = $alb_thumb['aid']; if (isset($cross_ref[$aid])) { $alb_stat = $cross_ref[$aid]; $count = $alb_stat['pic_count']; } else { $alb_stat = array(); $count = 0; } // Inserts a thumbnail if the album contains 1 or more images $visibility = $alb_thumb['visibility']; if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums'] || $CONFIG['allow_private_albums']==0) { // test for visibility if ($count > 0) { // Inserts a thumbnail if the album contains 1 or more images if ($alb_thumb['filename']) { $picture = &$alb_thumb; } else { $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='{$alb_stat['last_pid']}'"; $result = db_query($sql); $picture = mysql_fetch_array($result); mysql_free_result($result); } $pic_url = get_pic_url($picture, 'thumb'); if (!is_image($picture['filename'])) { $image_info = getimagesize($pic_url); $picture['pwidth'] = $image_info[0]; $picture['pheight'] = $image_info[1]; } $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"{$picture['filename']}\""; } else { // Inserts an empty thumbnail if the album contains 0 images $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } } elseif ($CONFIG['show_private']) { $image_size = compute_img_size(100, 75, $CONFIG['alb_list_thumb_size']); $alb_list[$alb_idx]['thumb_pic'] = "\"\""; } // Prepare everything if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || in_array($visibility, $USER_DATA['groups']) || $USER_DATA['can_see_all_albums']) { $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } elseif ($CONFIG['show_private']) { // uncomment this else block to show private album description $last_upload_date = $count ? localised_date($alb_stat['last_upload'], $lastup_date_fmt) : ''; $alb_list[$alb_idx]['aid'] = $alb_thumb['aid']; $alb_list[$alb_idx]['album_title'] = $alb_thumb['title']; $alb_list[$alb_idx]['album_desc'] = bb_decode($alb_thumb['description']); $alb_list[$alb_idx]['pic_count'] = $count; $alb_list[$alb_idx]['last_upl'] = $last_upload_date; $alb_list[$alb_idx]['album_info'] = sprintf($lang_list_albums['n_pictures'], $count) . ($count ? sprintf($lang_list_albums['last_added'], $last_upload_date) : ""); $alb_list[$alb_idx]['album_adm_menu'] = (GALLERY_ADMIN_MODE || (USER_ADMIN_MODE && $cat == USER_ID + FIRST_USER_CAT)) ? html_albummenu($alb_thumb['aid']) : ''; } } ob_start(); theme_display_album_list_cat($alb_list, $nbAlb, $cat, $PAGE, $totalPages); $cat_albums = ob_get_contents(); ob_end_clean(); return $cat_albums; } /** */ /** * Main code */ if (isset($HTTP_GET_VARS['page'])) { $PAGE = max((int)$HTTP_GET_VARS['page'], 1); $USER['lap'] = $PAGE; } elseif (isset($USER['lap'])) { $PAGE = max((int)$USER['lap'], 1); } else { $PAGE = 1; } if (isset($HTTP_GET_VARS['cat'])) { $cat = (int)$HTTP_GET_VARS['cat']; } // Gather data for categories $breadcrumb = ''; $cat_data = array(); $statistics = ''; $STATS_IN_ALB_LIST = false; $cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true); get_cat_list($breadcrumb, $cat_data, $statistics); pageheader($BREADCRUMB_TEXT ? $BREADCRUMB_TEXT : $lang_index_php['welcome']); $elements = preg_split("|/|", $CONFIG['main_page_layout'], -1, PREG_SPLIT_NO_EMPTY); foreach ($elements as $element) { if (preg_match("/(\w+),*(\d+)*/", $element, $matches)) switch ($matches[1]) { case 'breadcrumb': // Added breadcrumb as a separate listable block from config if (($breadcrumb != '' || count($cat_data) > 0) && $cat !=0 ) theme_display_breadcrumb($breadcrumb, $cat_data); break; case 'catlist': if ($breadcrumb != '' || count($cat_data) > 0) theme_display_cat_list($breadcrumb, $cat_data, $statistics); if (isset($cat) && $cat == USER_GAL_CAT) list_users(); flush(); break; case 'alblist': list_albums(); flush(); break; case 'random': display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastup': display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastalb': display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); break; case 'topn': display_thumbnails('topn', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'toprated': display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lastcom': display_thumbnails('lastcom', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'lasthits': display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false); flush(); break; case 'anycontent': if ($cat == 0) { include('anycontent.php'); } flush(); break; } } pagefooter(); ob_end_flush(); // Speed-up the random image query by 'keying' the image table if (time() - $CONFIG['randpos_interval'] > 86400) { $result = db_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); mysql_free_result($result); $pic_count = $nbEnr[0]; $granularity = floor($pic_count / RANDPOS_MAX_PIC); $result = db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET randpos = ROUND(RAND()*$granularity) WHERE 1"); $result = db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '" . time() . "' WHERE name = 'randpos_interval'"); } ?>