Juan A. Rodríguez-Aguilar

 
2) $current_year=$year; // else $current_year=$year-1 . "+"; $current_year=$year . "+"; } if ($today["mon"]>2) { $year++; } $output .='
'; $output .= '
'; $output .= 'Select year '; $output .= ''; $output .= '
'; $output .= '
'; if (strpos($current_year,"+")) $sql="SELECT * from publications_table WHERE drupales_nid LIKE '%;" . $author_id . ";%' and year >= " . ($year-1) . " order by year desc "; else $sql="SELECT * from publications_table WHERE drupales_nid LIKE '%;" . $author_id . ";%' and year = " . ($current_year) . " order by year desc "; $res=mysql_query($sql); for ($i=0;$i'; else $autline[] = '' . ($name) . ''; } $output .= implode($autline,", ") . " "; // Publication Title $output .= '"' . $row["title"] . "\""; $output .=', '; if ($row["second_title"]) { $output .= ''.check_plain($row["second_title"]).''; } $output .=""; if (!empty($row["year"])) { if ($row["year"]=="9998") $output .= ', In Press' ; else if ($row["year"]=="9999") $output .= ', Submitted '; else $output .= ', ' . check_plain($row["year"]) . '' ; } $fquery=mysql_query("select * from file_managed as f left join file_usage as u on f.fid=u.fid where u.id=" . $row["id"]); $result_pdf=mysql_fetch_assoc($fquery); if ($result_pdf["filename"]) { $output .= ' '; } else { $output .= '
 
'; } $output .= '
' ; } echo $output; mysql_close(); ?>