STRING, 'cat' => INT, 'ppuser' => INT)); authenticate(); $thisdate = date( "r" ); echo<< {$Globals['webname']} {$Globals['maindir']} $thisdate PhotoPost Pro 6.02 PPPRINT; //$rss->feedURL = $Globals['maindir'].$PHP_SELF; $catcache = array(); if ( $ppuser ) { $cats = "WHERE userid=$ppuser"; } else { if ( $cat ) { list( $children ) = ppmysql_query_onerow("SELECT children FROM {$Globals['pp_db_prefix']}categories WHERE id=$cat LIMIT 1", $link); if ( $children ) { $cat = "$cat,$children"; } $cats = "WHERE cat IN ($cat)"; } } $res = ppmysql_query("SELECT * FROM {$Globals['pp_db_prefix']}photos $cats ORDER BY date DESC LIMIT 50", $link); while ($data = mysql_fetch_array($res)) { $thiscat = $data['cat']; if( $data['storecat'] != 0 ) $data['cat'] = $data['storecat']; if ( $data['cattype'] == "a" ) $CatPerms['ugview'][$thiscat] = $CatPerms['ugview'][500]; if ( $CatPerms['ugview'][$thiscat] == 0 ) { if ( $catcache[$thiscat] == "" ) { $catcache[$thiscat] = is_image_private( $data['cat'] ); } if ( $catcache[$thiscat] == "no" ) { // Add description? if ( !empty($data['description']) ) $data['description'] = "

{$Globals['pp_lang']['desc']}: ". $data['description']; // Get the thumbnail $thumb = get_imagethumb( $data['bigimage'], $data['cat'], $data['userid'], 1 ); if ( $Globals['spider'] == "yes" ) { $thumb = "$thumb"; } else { $thumb = "$thumb"; } // Add comments indicator? if ( $data['numcom'] > 1 ) $data['description'] .= "

{$data['numcom']} {$Globals['pp_lang']['littlecom']}"; elseif ( $data['numcom'] ) $data['description'] .= "

{$data['numcom']} {$Globals['pp_lang']['comsing']}"; $title = htmlspecialchars( $data['title'] ); if ( $Globals['spider'] == "yes" ) { $link = htmlspecialchars( "{$Globals['maindir']}/showphoto.php/photo/{$data['id']}" ); } else { $link = htmlspecialchars( "{$Globals['maindir']}/showphoto.php?photo={$data['id']}" ); } $desc = htmlspecialchars( "$thumb

{$Globals['pp_lang']['by']}: {$data['user']}{$data['description']}" ); $user = htmlspecialchars( $data['user'] ); $date = htmlspecialchars( date('r',$data['date']) ); echo<< {$title} {$link} {$desc} {$user} {$date} PPPRINT; } } } echo<<
PPPRINT; ?>