diff -Naur nagios-1.2.orig/cgi/cgiutils.h.in nagios-1.2/cgi/cgiutils.h.in
--- nagios-1.2.orig/cgi/cgiutils.h.in	2002-07-27 21:24:13.000000000 -0700
+++ nagios-1.2/cgi/cgiutils.h.in	2004-07-28 16:01:53.000000000 -0700
@@ -258,6 +258,8 @@
 
 /****************** HOST AND SERVICE FILTER PROPERTIES  *******************/
 
+#define ANY_PROPERTY			1073741824
+
 #define HOST_SCHEDULED_DOWNTIME		1
 #define HOST_NO_SCHEDULED_DOWNTIME	2
 #define HOST_STATE_ACKNOWLEDGED		4
diff -Naur nagios-1.2.orig/cgi/status.c nagios-1.2/cgi/status.c
--- nagios-1.2.orig/cgi/status.c	2003-11-22 17:37:22.000000000 -0800
+++ nagios-1.2/cgi/status.c	2004-07-28 15:23:24.000000000 -0700
@@ -98,6 +98,7 @@
 void show_host_status_totals(void);
 void show_service_status_totals(void);
 void show_service_detail(void);
+void show_problems(void);
 void show_host_detail(void);
 void show_hostgroup_overviews(void);
 void show_hostgroup_overview(hostgroup *);
@@ -126,6 +127,7 @@
 char alert_message[MAX_MESSAGE_BUFFER];
 char *host_name=NULL;
 char *hostgroup_name=NULL;
+char *problem_name=NULL;
 int host_alert=FALSE;
 int show_all_hosts=TRUE;
 int show_all_hostgroups=TRUE;
@@ -133,6 +135,10 @@
 int overview_columns=3;
 int max_grid_width=8;
 int hostgroup_style_type=STYLE_OVERVIEW;
+int display_problems=0;
+int display_filters=1;
+int display_title=1;
+int display_sort_arrows=1;
 
 int service_status_types=SERVICE_PENDING|SERVICE_RECOVERY|SERVICE_OK|SERVICE_UNKNOWN|SERVICE_WARNING|SERVICE_CRITICAL|SERVICE_HOST_DOWN|SERVICE_UNREACHABLE;
 int all_service_status_types=SERVICE_PENDING|SERVICE_RECOVERY|SERVICE_OK|SERVICE_UNKNOWN|SERVICE_WARNING|SERVICE_CRITICAL|SERVICE_HOST_DOWN|SERVICE_UNREACHABLE;
@@ -321,7 +327,7 @@
 
 		/* end of top table */
 		printf("</tr>\n");
-		printf("</table>\n");
+		printf("</table><p>\n");
 	        }
 
 
@@ -343,7 +349,9 @@
 
 
 	/* bottom portion of screen - service or hostgroup detail */
-	if(display_type==DISPLAY_HOSTS)
+	if(display_problems)
+		show_problems();
+	else if(display_type==DISPLAY_HOSTS)
 		show_service_detail();
 	else{
 		if(hostgroup_style_type==STYLE_OVERVIEW)
@@ -477,6 +485,24 @@
 				show_all_hosts=FALSE;
 		        }
 
+		/* we found the problem argument */
+		else if(!strcmp(variables[x],"problem")){
+			display_type=DISPLAY_HOSTGROUPS;
+			hostgroup_name = "all";
+			x++;
+			if(variables[x]==NULL){
+				error=TRUE;
+				break;
+			        }
+
+			problem_name=strdup(variables[x]);
+
+			if(problem_name!=NULL && !strcmp(problem_name,"all")) {
+				display_problems=1;
+			} else {
+			}
+		        }
+
 		/* we found the columns argument */
 		else if(!strcmp(variables[x],"columns")){
 			x++;
@@ -991,7 +1017,161 @@
 	return;
         }
 
+/* display all of the current problems */
+void show_problems(void) {
+	int user_has_seen_something=FALSE;
+	int unhandled_host_problems=0;
+	int handled_host_problems=0;
+	int unhandled_service_problems=0;
+	int handled_service_problems=0;
+
+	display_sort_arrows=0;
+	display_title=0;
+	display_filters=0;
+
+	/* display hosts */
+	host_name = NULL;
+	hostgroup_name = "all";
+	show_all_hosts=TRUE;
+	show_all_hostgroups=TRUE;
+	host_status_types=all_host_problems;
+	service_status_types=all_service_status_types;
+	display_type=DISPLAY_HOSTGROUPS;
+
+	/* unhandled host problems */
+	host_properties=HOST_NO_SCHEDULED_DOWNTIME|HOST_STATE_UNACKNOWLEDGED|HOST_IS_NOT_FLAPPING;
+	if(count_hosts_to_show()) {
+		printf("<DIV CLASS='unhandled_problem'>Unhandled Host Problems<br>\n");
+		show_host_detail();
+		printf("</DIV>");
+
+		user_has_seen_something=TRUE;
+		}
+	
+	/* handled host problems */
+	host_properties=ANY_PROPERTY|HOST_SCHEDULED_DOWNTIME|HOST_STATE_ACKNOWLEDGED|HOST_IS_FLAPPING;
+	if(count_hosts_to_show()) {
+		printf("<DIV CLASS='handled_problem'>Handled Host Problems<br>\n");
+		show_host_detail();
+		printf("</DIV>");
+
+		user_has_seen_something=TRUE;
+		}
+	
+	/* display services */
+	host_properties=0L;
+	host_name = "all";
+	hostgroup_name = NULL;
+	show_all_hosts=TRUE;
+	show_all_hostgroups=TRUE;
+	host_status_types=HOST_PENDING|HOST_UP;
+	service_status_types=all_service_problems;
+	display_type=DISPLAY_HOSTS;
+
+	/* unhandled service problems */
+	service_properties=SERVICE_NO_SCHEDULED_DOWNTIME|SERVICE_STATE_UNACKNOWLEDGED|SERVICE_IS_NOT_FLAPPING;
+	if(count_services_to_show()) {
+		printf("<DIV CLASS='unhandled_problem'>Unhandled Service Problems<br>\n");
+		show_service_detail();
+		printf("</DIV>");
+
+		user_has_seen_something=TRUE;
+		}
+
+	/* handled service problems */
+	service_properties=ANY_PROPERTY|SERVICE_SCHEDULED_DOWNTIME|SERVICE_STATE_ACKNOWLEDGED|SERVICE_IS_FLAPPING;
+	if(count_services_to_show()) {
+		printf("<DIV CLASS='handled_problem'>Handled Service Problems<br>\n");
+		show_service_detail();
+		printf("</DIV>");
+
+		user_has_seen_something=TRUE;
+		}
+
+	if(user_has_seen_something == FALSE) {
+		printf("No problems to display\n");
+		}
+	}
+
+int count_hosts_to_show(void) {
+	hoststatus *temp_status=NULL;
+	host *temp_host=NULL;
+	int count=0;
+	
+	/* count up how many problems we have */
+	for(temp_status=hoststatus_list;temp_status!=NULL;temp_status=temp_status->next){
+		/* find the host  */
+		temp_host=find_host(temp_status->host_name,NULL);
+
+		/* if we couldn't find the host, go to the next status entry */
+		if(temp_host==NULL)
+			continue;
+
+		/* make sure user has rights to see this... */
+		if(is_authorized_for_host(temp_host,&current_authdata)==FALSE)
+			continue;
+
+		/* see if we should display services for hosts with tis type of status */
+		if(!(host_status_types & temp_status->status))
+			continue;
+
+		/* check host properties filter */
+		if(passes_host_properties_filter(temp_status)==FALSE)
+			continue;
+
+		count++;
+		}
+
+	return(count);
+	}
+
+int count_services_to_show(void) {
+	servicestatus *temp_status=NULL;
+	hoststatus *temp_hoststatus=NULL;
+	service *temp_service=NULL;
+	host *temp_host=NULL;
+	int count=0;
+
+	/* count up how many problems we have */
+	for(temp_status=servicestatus_list;temp_status!=NULL;temp_status=temp_status->next){
+		/* find the service  */
+		temp_service=find_service(temp_status->host_name,temp_status->description,NULL);
+
+		/* if we couldn't find the service, go to the next service */
+		if(temp_service==NULL)
+			continue;
+
+		/* find the host */
+		temp_host=find_host(temp_service->host_name,NULL);
+
+		/* make sure user has rights to see this... */
+		if(is_authorized_for_service(temp_service,&current_authdata)==FALSE)
+			continue;
+
+		/* get the host status information */
+		temp_hoststatus=find_hoststatus(temp_service->host_name);
+
+		/* see if we should display services for hosts with tis type of status */
+		if(!(host_status_types & temp_hoststatus->status))
+			continue;
+
+		/* see if we should display this type of service status */
+		if(!(service_status_types & temp_status->status))
+			continue;	
+
+		/* check host properties filter */
+		if(passes_host_properties_filter(temp_hoststatus)==FALSE)
+			continue;
+
+		/* check service properties filter */
+		if(passes_service_properties_filter(temp_status)==FALSE)
+			continue;
+
+		count++;
+		}
 
+	return(count);
+	}
 
 /* display a detailed listing of the status of all services... */
 void show_service_detail(void){
@@ -1040,61 +1220,65 @@
 		use_sort=FALSE;
 
 
-	printf("<P>\n");
-
-	printf("<table border=0 width=100%%>\n");
-	printf("<tr>\n");
+	if(display_filters) {
+		printf("<table border=0 width=100%%>\n");
+		printf("<tr>\n");
 
-	printf("<td valign=top align=left width=33%%>\n");
+		printf("<td valign=top align=left width=33%%>\n");
 
-	if(display_header==TRUE)
-		show_filters();
+		if(display_header==TRUE)
+			show_filters();
 
-	printf("</td>");
-
-	printf("<td valign=top align=center width=33%%>\n");
+		printf("</td>");
 
-	printf("<DIV ALIGN=CENTER CLASS='statusTitle'>Service Status Details For ");
-	if(display_type==DISPLAY_HOSTS){
-		if(show_all_hosts==TRUE)
-			printf("All Hosts");
-		else
-			printf("Host '%s'",host_name);
-	        }
-	else{
-		if(show_all_hostgroups==TRUE)
-			printf("All Host Groups");
-		else
-			printf("Host Group '%s'",hostgroup_name);
-	        }
-	printf("</DIV>\n");
+		printf("<td valign=top align=center width=33%%>\n");
+		}
 
-	if(use_sort==TRUE){
-		printf("<DIV ALIGN=CENTER CLASS='statusSort'>Entries sorted by <b>");
-		if(sort_option==SORT_HOSTNAME)
-			printf("host name");
-		else if(sort_option==SORT_SERVICENAME)
-			printf("service name");
-		else if(sort_option==SORT_SERVICESTATUS)
-			printf("service status");
-		else if(sort_option==SORT_LASTCHECKTIME)
-			printf("last check time");
-		else if(sort_option==SORT_CURRENTATTEMPT)
-			printf("attempt number");
-		else if(sort_option==SORT_STATEDURATION)
-			printf("state duration");
-		printf("</b> (%s)\n",(sort_type==SORT_ASCENDING)?"ascending":"descending");
+	if(display_title) {
+		printf("<DIV ALIGN=CENTER CLASS='statusTitle'>Service Status Details For ");
+		if(display_type==DISPLAY_HOSTS){
+			if(show_all_hosts==TRUE)
+				printf("All Hosts");
+			else
+				printf("Host '%s'",host_name);
+			}
+		else{
+			if(show_all_hostgroups==TRUE)
+				printf("All Host Groups");
+			else
+				printf("Host Group '%s'",hostgroup_name);
+			}
 		printf("</DIV>\n");
-	        }
 
-	printf("<br>");
+		if(use_sort==TRUE){
+			printf("<DIV ALIGN=CENTER CLASS='statusSort'>Entries sorted by <b>");
+			if(sort_option==SORT_HOSTNAME)
+				printf("host name");
+			else if(sort_option==SORT_SERVICENAME)
+				printf("service name");
+			else if(sort_option==SORT_SERVICESTATUS)
+				printf("service status");
+			else if(sort_option==SORT_LASTCHECKTIME)
+				printf("last check time");
+			else if(sort_option==SORT_CURRENTATTEMPT)
+				printf("attempt number");
+			else if(sort_option==SORT_STATEDURATION)
+				printf("state duration");
+			printf("</b> (%s)\n",(sort_type==SORT_ASCENDING)?"ascending":"descending");
+			printf("</DIV>\n");
+			}
 
-	printf("</td>\n");
+		printf("<br>");
+		}
 
-	printf("<td valign=top align=right width=33%%></td>\n");
-	
-	printf("</tr>\n");
-	printf("</table>\n");
+	if(display_filters) {
+		printf("</td>\n");
+
+		printf("<td valign=top align=right width=33%%></td>\n");
+		
+		printf("</tr>\n");
+		printf("</table>\n");
+		}
 
 
 
@@ -1138,17 +1322,35 @@
 	printf("<TABLE BORDER=0 width=100%% CLASS='status'>\n");
 	printf("<TR>\n");
 
-	printf("<TH CLASS='status'>Host&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_HOSTNAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTNAME,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Service&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service name (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_SERVICENAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_SERVICENAME,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Status&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service status (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service status (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_SERVICESTATUS,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_SERVICESTATUS,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Last Check&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_LASTCHECKTIME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_LASTCHECKTIME,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Duration&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration time (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_STATEDURATION,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_STATEDURATION,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Attempt&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by current attempt (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by current attempt (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_CURRENTATTEMPT,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_CURRENTATTEMPT,url_images_path,DOWN_ARROW_ICON);
+	printf("<TH CLASS='status'>Host&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (descending)'></A>",temp_url,SORT_ASCENDING,SORT_HOSTNAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTNAME,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Service&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service name (descending)'></A>",temp_url,SORT_ASCENDING,SORT_SERVICENAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_SERVICENAME,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Status&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service status (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by service status (descending)'></A>",temp_url,SORT_ASCENDING,SORT_SERVICESTATUS,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_SERVICESTATUS,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Last Check&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (descending)'></A>",temp_url,SORT_ASCENDING,SORT_LASTCHECKTIME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_LASTCHECKTIME,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Duration&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration time (descending)'></A>",temp_url,SORT_ASCENDING,SORT_STATEDURATION,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_STATEDURATION,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Attempt&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by current attempt (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by current attempt (descending)'></A>",temp_url,SORT_ASCENDING,SORT_CURRENTATTEMPT,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_CURRENTATTEMPT,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
 
 	printf("<TH CLASS='status'>Status Information</TH>\n");
 	printf("</TR>\n");
@@ -1523,9 +1725,11 @@
 		        }
 	        }
 
-	else
+	else if(display_filters)
 		printf("<BR><DIV CLASS='itemTotalsTitle'>%d Matching Service Entries Displayed</DIV>\n",total_entries);
 
+	printf("<P>\n");
+
 	return;
         }
 
@@ -1573,34 +1777,38 @@
 		use_sort=FALSE;
 
 
-	printf("<P>\n");
-
-	printf("<table border=0 width=100%%>\n");
-	printf("<tr>\n");
+	if(display_filters) {
+		printf("<table border=0 width=100%%>\n");
+		printf("<tr>\n");
 
-	printf("<td valign=top align=left width=33%%>\n");
+		printf("<td valign=top align=left width=33%%>\n");
 
-	show_filters();
+		show_filters();
 
-	printf("</td>");
+		printf("</td>");
 
-	printf("<td valign=top align=center width=33%%>\n");
+		printf("<td valign=top align=center width=33%%>\n");
+		}
 
-	printf("<DIV ALIGN=CENTER CLASS='statusTitle'>Host Status Details For ");
-	if(show_all_hostgroups==TRUE)
-		printf("All Host Groups");
-	else
-		printf("Host Group '%s'",hostgroup_name);
-	printf("</DIV>\n");
+	if(display_title) {
+		printf("<DIV ALIGN=CENTER CLASS='statusTitle'>Host Status Details For ");
+		if(show_all_hostgroups==TRUE)
+			printf("All Host Groups");
+		else
+			printf("Host Group '%s'",hostgroup_name);
+		printf("</DIV>\n");
 
-	printf("<br>");
+		printf("<br>");
+		}
 
-	printf("</td>\n");
+	if(display_filters) {
+		printf("</td>\n");
 
-	printf("<td valign=top align=right width=33%%></td>\n");
-	
-	printf("</tr>\n");
-	printf("</table>\n");
+		printf("<td valign=top align=right width=33%%></td>\n");
+		
+		printf("</tr>\n");
+		printf("</table>\n");
+		}
 
 
 
@@ -1639,17 +1847,28 @@
 
 
 	/* the main list of hosts */
-	printf("<DIV ALIGN='center'>\n");
 	printf("<TABLE BORDER=0 CLASS='status' WIDTH=100%%>\n");
 	printf("<TR>\n");
 
-	printf("<TH CLASS='status'>Host&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_HOSTNAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTNAME,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Status&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host status (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host status (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_HOSTSTATUS,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTSTATUS,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Last Check&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_LASTCHECKTIME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_LASTCHECKTIME,url_images_path,DOWN_ARROW_ICON);
-
-	printf("<TH CLASS='status'>Duration&nbsp;<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration time (descending)'></A></TH>",temp_url,SORT_ASCENDING,SORT_STATEDURATION,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_STATEDURATION,url_images_path,DOWN_ARROW_ICON);
+	printf("<TH CLASS='status'>Host&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host name (descending)'></A>",temp_url,SORT_ASCENDING,SORT_HOSTNAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTNAME,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Status&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host status (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by host status (descending)'></A>",temp_url,SORT_ASCENDING,SORT_HOSTSTATUS,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTSTATUS,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Last Check&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by last check time (descending)'></A>",temp_url,SORT_ASCENDING,SORT_LASTCHECKTIME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_LASTCHECKTIME,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
+
+	printf("<TH CLASS='status'>Duration&nbsp;");
+	if(display_sort_arrows)
+		printf("<A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration (ascending)'></A><A HREF='%s&sorttype=%d&sortoption=%d'><IMG SRC='%s%s' BORDER=0 ALT='Sort by state duration time (descending)'></A>",temp_url,SORT_ASCENDING,SORT_STATEDURATION,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_STATEDURATION,url_images_path,DOWN_ARROW_ICON);
+	printf("</TH>");
 
 	printf("<TH CLASS='status'>Status Information</TH>\n");
 	printf("</TR>\n");
@@ -1859,7 +2078,6 @@
 	        }
 
 	printf("</TABLE>\n");
-	printf("</DIV>\n");
 
 	/* if user couldn't see anything, print out some helpful info... */
 	if(user_has_seen_something==FALSE){
@@ -1875,9 +2093,11 @@
 		        }
 	        }
 
-	else
+	else if(display_filters)
 		printf("<BR><DIV CLASS='itemTotalsTitle'>%d Matching Host Entries Displayed</DIV>\n",total_entries);
 
+	printf("<P>\n");
+
 	return;
         }
 
@@ -1898,7 +2118,8 @@
 
 	printf("<td valign=top align=left width=33%%>\n");
 
-	show_filters();
+	if(display_filters)
+		show_filters();
 
 	printf("</td>");
 
@@ -2249,7 +2470,8 @@
 
 	printf("<td valign=top align=left width=33%%>\n");
 
-	show_filters();
+	if(display_filters)
+		show_filters();
 
 	printf("</td>");
 
@@ -2547,7 +2769,8 @@
 
 	printf("<td valign=top align=left width=33%%>\n");
 
-	show_filters();
+	if(display_filters)
+		show_filters();
 
 	printf("</td>");
 
@@ -3122,112 +3345,162 @@
 
 /* check host properties filter */
 int passes_host_properties_filter(hoststatus *temp_hoststatus){
+	int passed=0;
+	int failed=0;
 
-	if((host_properties & HOST_SCHEDULED_DOWNTIME) && temp_hoststatus->scheduled_downtime_depth<=0)
-		return FALSE;
-
-	if((host_properties & HOST_NO_SCHEDULED_DOWNTIME) && temp_hoststatus->scheduled_downtime_depth>0)
-		return FALSE;
-
-	if((host_properties & HOST_STATE_ACKNOWLEDGED) && temp_hoststatus->problem_has_been_acknowledged==FALSE)
+	if(host_properties & HOST_SCHEDULED_DOWNTIME)
+	       if(temp_hoststatus->scheduled_downtime_depth<=0) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_NO_SCHEDULED_DOWNTIME)
+	       if(temp_hoststatus->scheduled_downtime_depth>0) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_STATE_ACKNOWLEDGED)
+	       if(temp_hoststatus->problem_has_been_acknowledged==FALSE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_STATE_UNACKNOWLEDGED)
+	       if(temp_hoststatus->problem_has_been_acknowledged==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_CHECKS_DISABLED)
+	       if(temp_hoststatus->checks_enabled==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_CHECKS_ENABLED)
+	       if(temp_hoststatus->checks_enabled==FALSE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_EVENT_HANDLER_DISABLED)
+	       if(temp_hoststatus->event_handler_enabled==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_EVENT_HANDLER_ENABLED)
+	       if(temp_hoststatus->event_handler_enabled==FALSE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_FLAP_DETECTION_DISABLED)
+	       if(temp_hoststatus->flap_detection_enabled==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_FLAP_DETECTION_ENABLED)
+	       if(temp_hoststatus->flap_detection_enabled==FALSE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_IS_FLAPPING)
+	       if(temp_hoststatus->is_flapping==FALSE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_IS_NOT_FLAPPING)
+	       if(temp_hoststatus->is_flapping==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_NOTIFICATIONS_DISABLED)
+	       if(temp_hoststatus->notifications_enabled==TRUE) failed++;
+	       else passed++;
+
+	if(host_properties & HOST_NOTIFICATIONS_ENABLED)
+		if(temp_hoststatus->notifications_enabled==FALSE) failed++;
+		else passed++;
+
+	if(host_properties & ANY_PROPERTY && passed)
+		return TRUE;
+	else if(host_properties & ANY_PROPERTY && !passed)
 		return FALSE;
-
-	if((host_properties & HOST_STATE_UNACKNOWLEDGED) && temp_hoststatus->problem_has_been_acknowledged==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_CHECKS_DISABLED) && temp_hoststatus->checks_enabled==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_CHECKS_ENABLED) && temp_hoststatus->checks_enabled==FALSE)
-		return FALSE;
-
-	if((host_properties & HOST_EVENT_HANDLER_DISABLED) && temp_hoststatus->event_handler_enabled==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_EVENT_HANDLER_ENABLED) && temp_hoststatus->event_handler_enabled==FALSE)
-		return FALSE;
-
-	if((host_properties & HOST_FLAP_DETECTION_DISABLED) && temp_hoststatus->flap_detection_enabled==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_FLAP_DETECTION_ENABLED) && temp_hoststatus->flap_detection_enabled==FALSE)
-		return FALSE;
-
-	if((host_properties & HOST_IS_FLAPPING) && temp_hoststatus->is_flapping==FALSE)
-		return FALSE;
-
-	if((host_properties & HOST_IS_NOT_FLAPPING) && temp_hoststatus->is_flapping==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_NOTIFICATIONS_DISABLED) && temp_hoststatus->notifications_enabled==TRUE)
-		return FALSE;
-
-	if((host_properties & HOST_NOTIFICATIONS_ENABLED) && temp_hoststatus->notifications_enabled==FALSE)
+	else if(!failed)
+		return TRUE;
+	else
 		return FALSE;
-
-	return TRUE;
         }
 
 
 
 /* check service properties filter */
 int passes_service_properties_filter(servicestatus *temp_servicestatus){
+	int passed=0;
+	int failed=0;
 
-	if((service_properties & SERVICE_SCHEDULED_DOWNTIME) && temp_servicestatus->scheduled_downtime_depth<=0)
-		return FALSE;
-
-	if((service_properties & SERVICE_NO_SCHEDULED_DOWNTIME) && temp_servicestatus->scheduled_downtime_depth>0)
-		return FALSE;
-
-	if((service_properties & SERVICE_STATE_ACKNOWLEDGED) && temp_servicestatus->problem_has_been_acknowledged==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_STATE_UNACKNOWLEDGED) && temp_servicestatus->problem_has_been_acknowledged==TRUE)
+	if(service_properties & SERVICE_SCHEDULED_DOWNTIME)
+		if(temp_servicestatus->scheduled_downtime_depth<=0) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_NO_SCHEDULED_DOWNTIME)
+		if(temp_servicestatus->scheduled_downtime_depth>0) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_STATE_ACKNOWLEDGED)
+		if(temp_servicestatus->problem_has_been_acknowledged==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_STATE_UNACKNOWLEDGED)
+		if(temp_servicestatus->problem_has_been_acknowledged==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_CHECKS_DISABLED)
+		if(temp_servicestatus->checks_enabled==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_CHECKS_ENABLED)
+		if(temp_servicestatus->checks_enabled==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_EVENT_HANDLER_DISABLED)
+		if(temp_servicestatus->event_handler_enabled==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_EVENT_HANDLER_ENABLED)
+		if(temp_servicestatus->event_handler_enabled==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_FLAP_DETECTION_DISABLED)
+		if(temp_servicestatus->flap_detection_enabled==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_FLAP_DETECTION_ENABLED)
+		if(temp_servicestatus->flap_detection_enabled==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_IS_FLAPPING)
+		if(temp_servicestatus->is_flapping==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_IS_NOT_FLAPPING)
+		if(temp_servicestatus->is_flapping==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_NOTIFICATIONS_DISABLED)
+		if(temp_servicestatus->notifications_enabled==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_NOTIFICATIONS_ENABLED)
+		if(temp_servicestatus->notifications_enabled==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_PASSIVE_CHECKS_DISABLED)
+		if(temp_servicestatus->accept_passive_service_checks==TRUE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_PASSIVE_CHECKS_ENABLED)
+		if(temp_servicestatus->accept_passive_service_checks==FALSE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_PASSIVE_CHECK)
+		if(temp_servicestatus->check_type==SERVICE_CHECK_ACTIVE) failed++;
+		else passed++;
+
+	if(service_properties & SERVICE_ACTIVE_CHECK)
+		if(temp_servicestatus->check_type==SERVICE_CHECK_PASSIVE) failed++;
+		else passed++;
+
+	if(service_properties & ANY_PROPERTY && passed)
+		return TRUE;
+	else if(service_properties & ANY_PROPERTY && !passed)
 		return FALSE;
-
-	if((service_properties & SERVICE_CHECKS_DISABLED) && temp_servicestatus->checks_enabled==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_CHECKS_ENABLED) && temp_servicestatus->checks_enabled==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_EVENT_HANDLER_DISABLED) && temp_servicestatus->event_handler_enabled==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_EVENT_HANDLER_ENABLED) && temp_servicestatus->event_handler_enabled==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_FLAP_DETECTION_DISABLED) && temp_servicestatus->flap_detection_enabled==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_FLAP_DETECTION_ENABLED) && temp_servicestatus->flap_detection_enabled==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_IS_FLAPPING) && temp_servicestatus->is_flapping==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_IS_NOT_FLAPPING) && temp_servicestatus->is_flapping==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_NOTIFICATIONS_DISABLED) && temp_servicestatus->notifications_enabled==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_NOTIFICATIONS_ENABLED) && temp_servicestatus->notifications_enabled==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_PASSIVE_CHECKS_DISABLED) && temp_servicestatus->accept_passive_service_checks==TRUE)
-		return FALSE;
-
-	if((service_properties & SERVICE_PASSIVE_CHECKS_ENABLED) && temp_servicestatus->accept_passive_service_checks==FALSE)
-		return FALSE;
-
-	if((service_properties & SERVICE_PASSIVE_CHECK) && temp_servicestatus->check_type==SERVICE_CHECK_ACTIVE)
-		return FALSE;
-
-	if((service_properties & SERVICE_ACTIVE_CHECK) && temp_servicestatus->check_type==SERVICE_CHECK_PASSIVE)
+	else if(!failed)
+		return TRUE;
+	else
 		return FALSE;
-
-	return TRUE;
         }
 
 
diff -Naur nagios-1.2.orig/html/side.html.in nagios-1.2/html/side.html.in
--- nagios-1.2.orig/html/side.html.in	2002-04-18 19:45:49.000000000 -0700
+++ nagios-1.2/html/side.html.in	2004-07-28 15:20:18.000000000 -0700
@@ -113,6 +113,10 @@
     <td colspan="2" height="10"></td>
   </tr>
   <tr> 
+    <td width=13><img src="images/greendot.gif" width="13" height="14" name="allproblems-dot"></td>
+    <td nowrap><a href="@cgiurl@/status.cgi?problem=all" target="main" onMouseOver="switchdot('allproblems-dot',1)" onMouseOut="switchdot('allproblems-dot',0)" class="NavBarItem">All Problems</a></td>
+  </tr>
+  <tr> 
     <td width=13><img src="images/greendot.gif" width="13" height="14" name="svcproblems-dot"></td>
     <td nowrap><a href="@cgiurl@/status.cgi?host=all&servicestatustypes=248" target="main" onMouseOver="switchdot('svcproblems-dot',1)" onMouseOut="switchdot('svcproblems-dot',0)" class="NavBarItem">Service Problems</a></td>
   </tr>
diff -Naur nagios-1.2.orig/html/stylesheets/status.css nagios-1.2/html/stylesheets/status.css
--- nagios-1.2.orig/html/stylesheets/status.css	2002-07-09 16:31:28.000000000 -0700
+++ nagios-1.2/html/stylesheets/status.css	2004-07-28 15:20:33.000000000 -0700
@@ -95,4 +95,8 @@
 	.miniStatusDOWN { font-family: arial,serif; font-size: 8pt; background-color: #F83838; text-align: center; }
 	.miniStatusUNREACHABLE { font-family: arial,serif; font-size: 8pt; background-color: #F83838; text-align: center; }
 	
+  .comment { font-family: arial,serif;  font-size: 8pt; }
+
+  .unhandled_problem { font-family: arial,serif;  font-size:11pt; color: #FF0000; font-weight: bold; }
+  .handled_problem   { font-family: arial,serif;  font-size:11pt; color: #000000; font-weight: bold; }
 
