Lines 821-831
void show_service_status_totals(void){
Link Here
|
821 |
printf("<TH CLASS='serviceTotals'>"); |
821 |
printf("<TH CLASS='serviceTotals'>"); |
822 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
822 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
823 |
if(display_type==DISPLAY_HOSTS) |
823 |
if(display_type==DISPLAY_HOSTS) |
824 |
printf("host=%s",host_name); |
824 |
printf("host=%s",url_encode(host_name)); |
825 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
825 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
826 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
826 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
827 |
else |
827 |
else |
828 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
828 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
829 |
printf("&servicestatustypes=%d",SERVICE_OK); |
829 |
printf("&servicestatustypes=%d",SERVICE_OK); |
830 |
printf("&hoststatustypes=%d'>",host_status_types); |
830 |
printf("&hoststatustypes=%d'>",host_status_types); |
831 |
printf("Ok</A></TH>\n"); |
831 |
printf("Ok</A></TH>\n"); |
Lines 833-843
void show_service_status_totals(void){
Link Here
|
833 |
printf("<TH CLASS='serviceTotals'>"); |
833 |
printf("<TH CLASS='serviceTotals'>"); |
834 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
834 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
835 |
if(display_type==DISPLAY_HOSTS) |
835 |
if(display_type==DISPLAY_HOSTS) |
836 |
printf("host=%s",host_name); |
836 |
printf("host=%s",url_encode(host_name)); |
837 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
837 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
838 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
838 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
839 |
else |
839 |
else |
840 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
840 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
841 |
printf("&servicestatustypes=%d",SERVICE_WARNING); |
841 |
printf("&servicestatustypes=%d",SERVICE_WARNING); |
842 |
printf("&hoststatustypes=%d'>",host_status_types); |
842 |
printf("&hoststatustypes=%d'>",host_status_types); |
843 |
printf("Warning</A></TH>\n"); |
843 |
printf("Warning</A></TH>\n"); |
Lines 845-855
void show_service_status_totals(void){
Link Here
|
845 |
printf("<TH CLASS='serviceTotals'>"); |
845 |
printf("<TH CLASS='serviceTotals'>"); |
846 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
846 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
847 |
if(display_type==DISPLAY_HOSTS) |
847 |
if(display_type==DISPLAY_HOSTS) |
848 |
printf("host=%s",host_name); |
848 |
printf("host=%s",url_encode(host_name)); |
849 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
849 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
850 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
850 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
851 |
else |
851 |
else |
852 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
852 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
853 |
printf("&servicestatustypes=%d",SERVICE_UNKNOWN); |
853 |
printf("&servicestatustypes=%d",SERVICE_UNKNOWN); |
854 |
printf("&hoststatustypes=%d'>",host_status_types); |
854 |
printf("&hoststatustypes=%d'>",host_status_types); |
855 |
printf("Unknown</A></TH>\n"); |
855 |
printf("Unknown</A></TH>\n"); |
Lines 857-867
void show_service_status_totals(void){
Link Here
|
857 |
printf("<TH CLASS='serviceTotals'>"); |
857 |
printf("<TH CLASS='serviceTotals'>"); |
858 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
858 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
859 |
if(display_type==DISPLAY_HOSTS) |
859 |
if(display_type==DISPLAY_HOSTS) |
860 |
printf("host=%s",host_name); |
860 |
printf("host=%s",url_encode(host_name)); |
861 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
861 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
862 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
862 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
863 |
else |
863 |
else |
864 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
864 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
865 |
printf("&servicestatustypes=%d",SERVICE_CRITICAL); |
865 |
printf("&servicestatustypes=%d",SERVICE_CRITICAL); |
866 |
printf("&hoststatustypes=%d'>",host_status_types); |
866 |
printf("&hoststatustypes=%d'>",host_status_types); |
867 |
printf("Critical</A></TH>\n"); |
867 |
printf("Critical</A></TH>\n"); |
Lines 869-879
void show_service_status_totals(void){
Link Here
|
869 |
printf("<TH CLASS='serviceTotals'>"); |
869 |
printf("<TH CLASS='serviceTotals'>"); |
870 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
870 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
871 |
if(display_type==DISPLAY_HOSTS) |
871 |
if(display_type==DISPLAY_HOSTS) |
872 |
printf("host=%s",host_name); |
872 |
printf("host=%s",url_encode(host_name)); |
873 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
873 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
874 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
874 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
875 |
else |
875 |
else |
876 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
876 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
877 |
printf("&servicestatustypes=%d",SERVICE_PENDING); |
877 |
printf("&servicestatustypes=%d",SERVICE_PENDING); |
878 |
printf("&hoststatustypes=%d'>",host_status_types); |
878 |
printf("&hoststatustypes=%d'>",host_status_types); |
879 |
printf("Pending</A></TH>\n"); |
879 |
printf("Pending</A></TH>\n"); |
Lines 910-920
void show_service_status_totals(void){
Link Here
|
910 |
printf("<TH CLASS='serviceTotals'>"); |
910 |
printf("<TH CLASS='serviceTotals'>"); |
911 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
911 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
912 |
if(display_type==DISPLAY_HOSTS) |
912 |
if(display_type==DISPLAY_HOSTS) |
913 |
printf("host=%s",host_name); |
913 |
printf("host=%s",url_encode(host_name)); |
914 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
914 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
915 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
915 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
916 |
else |
916 |
else |
917 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
917 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
918 |
printf("&servicestatustypes=%d",SERVICE_UNKNOWN|SERVICE_WARNING|SERVICE_CRITICAL); |
918 |
printf("&servicestatustypes=%d",SERVICE_UNKNOWN|SERVICE_WARNING|SERVICE_CRITICAL); |
919 |
printf("&hoststatustypes=%d'>",host_status_types); |
919 |
printf("&hoststatustypes=%d'>",host_status_types); |
920 |
printf("<I>All Problems</I></A></TH>\n"); |
920 |
printf("<I>All Problems</I></A></TH>\n"); |
Lines 922-932
void show_service_status_totals(void){
Link Here
|
922 |
printf("<TH CLASS='serviceTotals'>"); |
922 |
printf("<TH CLASS='serviceTotals'>"); |
923 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
923 |
printf("<A CLASS='serviceTotals' HREF='%s?",STATUS_CGI); |
924 |
if(display_type==DISPLAY_HOSTS) |
924 |
if(display_type==DISPLAY_HOSTS) |
925 |
printf("host=%s",host_name); |
925 |
printf("host=%s",url_encode(host_name)); |
926 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
926 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
927 |
printf("servicegroup=%s&style=detail",servicegroup_name); |
927 |
printf("servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
928 |
else |
928 |
else |
929 |
printf("hostgroup=%s&style=detail",hostgroup_name); |
929 |
printf("hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
930 |
printf("&hoststatustypes=%d'>",host_status_types); |
930 |
printf("&hoststatustypes=%d'>",host_status_types); |
931 |
printf("<I>All Types</I></A></TH>\n"); |
931 |
printf("<I>All Types</I></A></TH>\n"); |
932 |
|
932 |
|
Lines 1035-1045
void show_host_status_totals(void){
Link Here
|
1035 |
printf("<TH CLASS='hostTotals'>"); |
1035 |
printf("<TH CLASS='hostTotals'>"); |
1036 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1036 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1037 |
if(display_type==DISPLAY_HOSTS) |
1037 |
if(display_type==DISPLAY_HOSTS) |
1038 |
printf("host=%s",host_name); |
1038 |
printf("host=%s",url_encode(host_name)); |
1039 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1039 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1040 |
printf("servicegroup=%s",servicegroup_name); |
1040 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1041 |
else{ |
1041 |
else{ |
1042 |
printf("hostgroup=%s",hostgroup_name); |
1042 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1043 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1043 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1044 |
printf("&style=detail"); |
1044 |
printf("&style=detail"); |
1045 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1045 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1053-1063
void show_host_status_totals(void){
Link Here
|
1053 |
printf("<TH CLASS='hostTotals'>"); |
1053 |
printf("<TH CLASS='hostTotals'>"); |
1054 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1054 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1055 |
if(display_type==DISPLAY_HOSTS) |
1055 |
if(display_type==DISPLAY_HOSTS) |
1056 |
printf("host=%s",host_name); |
1056 |
printf("host=%s",url_encode(host_name)); |
1057 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1057 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1058 |
printf("servicegroup=%s",servicegroup_name); |
1058 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1059 |
else{ |
1059 |
else{ |
1060 |
printf("hostgroup=%s",hostgroup_name); |
1060 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1061 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1061 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1062 |
printf("&style=detail"); |
1062 |
printf("&style=detail"); |
1063 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1063 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1071-1081
void show_host_status_totals(void){
Link Here
|
1071 |
printf("<TH CLASS='hostTotals'>"); |
1071 |
printf("<TH CLASS='hostTotals'>"); |
1072 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1072 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1073 |
if(display_type==DISPLAY_HOSTS) |
1073 |
if(display_type==DISPLAY_HOSTS) |
1074 |
printf("host=%s",host_name); |
1074 |
printf("host=%s",url_encode(host_name)); |
1075 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1075 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1076 |
printf("servicegroup=%s",servicegroup_name); |
1076 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1077 |
else{ |
1077 |
else{ |
1078 |
printf("hostgroup=%s",hostgroup_name); |
1078 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1079 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1079 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1080 |
printf("&style=detail"); |
1080 |
printf("&style=detail"); |
1081 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1081 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1089-1099
void show_host_status_totals(void){
Link Here
|
1089 |
printf("<TH CLASS='hostTotals'>"); |
1089 |
printf("<TH CLASS='hostTotals'>"); |
1090 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1090 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1091 |
if(display_type==DISPLAY_HOSTS) |
1091 |
if(display_type==DISPLAY_HOSTS) |
1092 |
printf("host=%s",host_name); |
1092 |
printf("host=%s",url_encode(host_name)); |
1093 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1093 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1094 |
printf("servicegroup=%s",servicegroup_name); |
1094 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1095 |
else{ |
1095 |
else{ |
1096 |
printf("hostgroup=%s",hostgroup_name); |
1096 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1097 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1097 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1098 |
printf("&style=detail"); |
1098 |
printf("&style=detail"); |
1099 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1099 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1132-1142
void show_host_status_totals(void){
Link Here
|
1132 |
printf("<TH CLASS='hostTotals'>"); |
1132 |
printf("<TH CLASS='hostTotals'>"); |
1133 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1133 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1134 |
if(display_type==DISPLAY_HOSTS) |
1134 |
if(display_type==DISPLAY_HOSTS) |
1135 |
printf("host=%s",host_name); |
1135 |
printf("host=%s",url_encode(host_name)); |
1136 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1136 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1137 |
printf("servicegroup=%s",servicegroup_name); |
1137 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1138 |
else{ |
1138 |
else{ |
1139 |
printf("hostgroup=%s",hostgroup_name); |
1139 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1140 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1140 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1141 |
printf("&style=detail"); |
1141 |
printf("&style=detail"); |
1142 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1142 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1150-1160
void show_host_status_totals(void){
Link Here
|
1150 |
printf("<TH CLASS='hostTotals'>"); |
1150 |
printf("<TH CLASS='hostTotals'>"); |
1151 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1151 |
printf("<A CLASS='hostTotals' HREF='%s?",STATUS_CGI); |
1152 |
if(display_type==DISPLAY_HOSTS) |
1152 |
if(display_type==DISPLAY_HOSTS) |
1153 |
printf("host=%s",host_name); |
1153 |
printf("host=%s",url_encode(host_name)); |
1154 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1154 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1155 |
printf("servicegroup=%s",servicegroup_name); |
1155 |
printf("servicegroup=%s",url_encode(servicegroup_name)); |
1156 |
else{ |
1156 |
else{ |
1157 |
printf("hostgroup=%s",hostgroup_name); |
1157 |
printf("hostgroup=%s",url_encode(hostgroup_name)); |
1158 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1158 |
if((service_status_types!=all_service_status_types) || group_style_type==STYLE_DETAIL) |
1159 |
printf("&style=detail"); |
1159 |
printf("&style=detail"); |
1160 |
else if(group_style_type==STYLE_HOST_DETAIL) |
1160 |
else if(group_style_type==STYLE_HOST_DETAIL) |
Lines 1261-1267
void show_service_detail(void){
Link Here
|
1261 |
if(show_all_servicegroups==TRUE) |
1261 |
if(show_all_servicegroups==TRUE) |
1262 |
printf("All Service Groups"); |
1262 |
printf("All Service Groups"); |
1263 |
else |
1263 |
else |
1264 |
printf("Service Group '%s'",servicegroup_name); |
1264 |
printf("Service Group '%s'",url_encode(servicegroup_name)); |
1265 |
} |
1265 |
} |
1266 |
else{ |
1266 |
else{ |
1267 |
if(show_all_hostgroups==TRUE) |
1267 |
if(show_all_hostgroups==TRUE) |
Lines 1308-1318
void show_service_detail(void){
Link Here
|
1308 |
snprintf(temp_url,sizeof(temp_url)-1,"%s?",STATUS_CGI); |
1308 |
snprintf(temp_url,sizeof(temp_url)-1,"%s?",STATUS_CGI); |
1309 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1309 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1310 |
if(display_type==DISPLAY_HOSTS) |
1310 |
if(display_type==DISPLAY_HOSTS) |
1311 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"host=%s",host_name); |
1311 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"host=%s",url_encode(host_name)); |
1312 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1312 |
else if(display_type==DISPLAY_SERVICEGROUPS) |
1313 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"servicegroup=%s&style=detail",servicegroup_name); |
1313 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"servicegroup=%s&style=detail",url_encode(servicegroup_name)); |
1314 |
else |
1314 |
else |
1315 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"hostgroup=%s&style=detail",hostgroup_name); |
1315 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"hostgroup=%s&style=detail",url_encode(hostgroup_name)); |
1316 |
temp_buffer[sizeof(temp_buffer)-1]='\x0'; |
1316 |
temp_buffer[sizeof(temp_buffer)-1]='\x0'; |
1317 |
strncat(temp_url,temp_buffer,sizeof(temp_url)-strlen(temp_url)-1); |
1317 |
strncat(temp_url,temp_buffer,sizeof(temp_url)-strlen(temp_url)-1); |
1318 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1318 |
temp_url[sizeof(temp_url)-1]='\x0'; |
Lines 1859-1865
void show_host_detail(void){
Link Here
|
1859 |
|
1859 |
|
1860 |
snprintf(temp_url,sizeof(temp_url)-1,"%s?",STATUS_CGI); |
1860 |
snprintf(temp_url,sizeof(temp_url)-1,"%s?",STATUS_CGI); |
1861 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1861 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1862 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"hostgroup=%s&style=hostdetail",hostgroup_name); |
1862 |
snprintf(temp_buffer,sizeof(temp_buffer)-1,"hostgroup=%s&style=hostdetail",url_encode(hostgroup_name)); |
1863 |
temp_buffer[sizeof(temp_buffer)-1]='\x0'; |
1863 |
temp_buffer[sizeof(temp_buffer)-1]='\x0'; |
1864 |
strncat(temp_url,temp_buffer,sizeof(temp_url)-strlen(temp_url)-1); |
1864 |
strncat(temp_url,temp_buffer,sizeof(temp_url)-strlen(temp_url)-1); |
1865 |
temp_url[sizeof(temp_url)-1]='\x0'; |
1865 |
temp_url[sizeof(temp_url)-1]='\x0'; |