We normally add the new listings around the middle of the month. Please check back for the most recent openings or use the link below to go to the previous months listings.

0) { echo '

Champaign


'; display_results ($result, $num_rows); } else { echo '

We normally add the new listings around the middle of the month. Please check back for the most recent openings or use the link below to go to the previous months listings.

'; } // get urbana listings $query = "SELECT * FROM restaurants WHERE month = '$display_month' AND year = '$display_year' AND city = 'Urbana' ORDER BY name"; $result = mysql_query($query); // result set $num_rows = mysql_numrows($result); // number of records in result set if ($num_rows > 0) { echo '

Urbana


'; display_results ($result, $num_rows); } // get county listings $query = "SELECT * FROM restaurants WHERE month = '$display_month' AND year = '$display_year' AND city != 'Champaign' AND city != 'Urbana' ORDER BY city, name"; $result = mysql_query($query); // result set $num_rows = mysql_numrows($result); // number of records in result set if ($num_rows > 0) { echo '

Champaign County


'; display_results ($result, $num_rows); } function display_results ($result, $num_rows) { for ($i = 0; $i < $num_rows; $i++) { $key = mysql_result($result, $i, "key"); $month = mysql_result($result, $i, "month"); $year = mysql_result($result, $i, "year"); $name = mysql_result($result, $i, "name"); $address = mysql_result($result, $i, "address"); $city = mysql_result($result, $i, "city"); $state = mysql_result($result, $i, "state"); $zip = mysql_result($result, $i, "zip"); $url = mysql_result($result, $i, "url"); $comment = mysql_result($result, $i, "comment"); echo $name."
"; echo $address.', '.$city.', '.$zip."
"; if ($comment) echo $comment."
"; if ($url) echo "Google map
"; echo "
"; } // end display } $previous_month = $display_month-1; if ($previous_month < 1) { $previous_month = 12; $previous_year = $display_year-1; } else $previous_year = $display_year; //echo "previous month = $previous_month
current month = $current_month
previous year = $previous_year
current year = $current_year
display year = $display_year
first year = $first_year"; if ($previous_year == $first_year && $previous_month >= $first_month) { echo "$months[$previous_month] $previous_year"; } else if ($previous_year > $first_year) { echo "$months[$previous_month] $previous_year"; } else echo "No previous data"; $next_month = $display_month+1; if ($next_month == 13) { $next_month = 1; $next_year = $display_year+1; } else $next_year = $display_year; echo '    '; if ($next_year < $current_year || ($next_year == $current_year && $next_month < $current_month)) { echo "$months[$next_month] $next_year"; } //else // echo "End of data"; ?>