SUBDATE( CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY )'; if ( $user['forbidden_categories'] != '' ) { $query.= ' AND c.id NOT IN ('.$user['forbidden_categories'].')'; } $query.= ' ;'; $result = pwg_query( $query ); // template thumbnail initialization if (mysql_num_rows($result) > 0) { $template->assign_block_vars('categories', array()); } // for each category, we have to search a recent picture to display and // the name to display while ( $row = mysql_fetch_array( $result ) ) { $template->assign_block_vars( 'categories.category', array( 'SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']), 'ALT' => $row['file'], 'TITLE' => $lang['hint_category'], 'URL' => make_index_url( array( 'category' => $row['category_id'], ) ), 'NAME' => get_cat_display_name_cache($row['uppercats'], null, false), 'NB_IMAGES' => $row['nb_images'], 'DESCRIPTION' => @$row['comment'], ) ); } ?>