CSE
CSE
CSE CSE
1998 && $year<=$startdate0) { $year = (int)$year; $enddate = $year + 1; if($year < 1999 || $year > $startdate0) { $year = $startdate0; } $startdate = $year . "-01-01"; $enddate = $enddate . "-01-01"; $sql = "SELECT * FROM news WHERE (division = \"CSE\" OR division = \"EECS\") " . "AND date_entered >= \"$startdate\" AND date_entered < \"$enddate\" ORDER BY date_entered DESC, news_id DESC"; } if($year && ($year > $startdate0 || $year < 1999)) { $location = "https://www.eecs.umich.edu/eecs/etc/news/csenews.html"; header("Location: $location"); exit; } //Get news by category if($cat) { $string_ok = ""; $allowed = array("External","Research","News","Awards","Student","Alumni","Grad","Undergrad","Diversity","Class"); foreach($allowed as $member) { if($member == $cat) { $string_ok = "yes"; } } if(!$string_ok) { $location = "https://www.eecs.umich.edu/eecs/etc/news/csenews.html"; header("Location: $location"); exit; } $sql = "SELECT * FROM news WHERE (division = \"CSE\" OR division = \"EECS\") " . "AND news_type = \"$cat\" ORDER BY date_entered DESC, news_id DESC $limit"; } /* //New as of 1/15/2018 - slows things down if($cat == "Alumni") { $sql = "SELECT DISTINCT * FROM news " . "RIGHT JOIN tags ON news.news_id=tags.news_id " . "WHERE (news_type = \"Alumni\" OR tags.tagname_id = 250) " . "AND (division = \"CSE\" OR division = \"EECS\") " . "ORDER BY news.news_id DESC $limit"; $result = mysql_query($sql) or die (mysql_error()); } */ //Get Undergrad news if($cat == "Undergrad") { $sql = "SELECT DISTINCT * FROM news " . "RIGHT JOIN tags ON news.news_id=tags.news_id " . "WHERE news_type = \"Student\" " . "AND (division = \"CSE\" OR division = \"EECS\") " . "AND tags.tagname_id = 233 " . "ORDER BY news.news_id DESC $limit"; $result = mysql_query($sql) or die (mysql_error()); } //Get Grad news if($cat == "Grad") { $sql = "SELECT DISTINCT * FROM news " . "RIGHT JOIN tags ON news.news_id=tags.news_id " . "WHERE news_type = \"Student\" " . "AND (division = \"CSE\" OR division = \"EECS\") " . "AND tags.tagname_id = 234 " . "ORDER BY news.news_id DESC $limit"; $result = mysql_query($sql) or die (mysql_error()); } //Get Diversity news if($cat == "Diversity") { $sql = "SELECT DISTINCT * FROM news " . "RIGHT JOIN tags ON news.news_id=tags.news_id " . "WHERE tags.tagname_id = 232 " . "AND (division = \"CSE\" OR division = \"EECS\") " . "ORDER BY news.news_id DESC $limit"; $result = mysql_query($sql) or die (mysql_error()); } if($cat == "News") { $title = "CSE Department News"; } elseif($cat == "External") { $title = "CSE in the News"; } elseif($cat == "Awards") { $title = "CSE Faculty and Staff News"; } elseif($cat == "Student") { $title = "CSE Student News"; } elseif($cat == "Undergrad") { $title = "CSE Undergraduate Student News"; } elseif($cat == "Grad") { $title = "CSE Graduate Student News"; } elseif($cat == "Diversity") { $title = "CSE Diversity and Outreach News"; } elseif($cat == "Class") { $title = "CSE Course Announcements"; } elseif(!$cat) { $title = "CSE News"; } else { $title = "CSE $cat News"; } if($year) { $title = "CSE News for $year"; } if($id) { $title = "CSE News Story"; } print "\n"; print "\n"; print "\n"; if(!$id && !$cat && !$year) { $thisyr = date("Y"); print "\n"; } if($cat && !$showall) { print "\n"; } print "

$title

\n"; include("get_records.php"); print "
All CSE News for $thisyr
Show All
\n"; ?>