1109
1109
compressFileFd = gzopen(compressedFilePath, "wb");
1110
1110
if(0) traceEvent(CONST_TRACE_INFO, "gzopen(%s)=%p", compressedFilePath, compressFileFd);
1112
/* traceEvent(CONST_TRACE_ERROR, "[SSL] [%d] %s", theString[0], theString); */
1113
1115
if(gzwrite(compressFileFd, theString, len) == 0) {
1208
1210
void sendJSLibraries(int graph_mode) {
1212
/* Damn Internet explorer... */
1213
// sendString("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n");
1218
sendString("<!--[if lt IE 9]><script language=\"javascript\" type=\"text/javascript\" src=\"/jqplot/excanvas.min.js\"></script><![endif]-->\n");
1212
1221
sendString("<script type=\"text/javascript\" src=\"/jquery-1.7.min.js\"></script>\n");
1214
sendString("<script type=\"text/javascript\" src=\"/highcharts.js\"></script>\n");
1215
sendString("<script type=\"text/javascript\" src=\"/exporting.js\"></script>\n");
1222
/* www.jqplot.com */
1223
sendString("<script type=\"text/javascript\" src=\"/jqplot/jquery.jqplot.min.js\"></script>\n");
1224
sendString("<script type=\"text/javascript\" src=\"/jqplot/plugins/jqplot.pieRenderer.min.js\"></script>\n");
1225
sendString("<script type=\"text/javascript\" src=\"/jqplot/plugins/jqplot.barRenderer.min.js\"></script>\n");
1226
sendString("<script type=\"text/javascript\" src=\"/jqplot/plugins/jqplot.meterGaugeRenderer.min.js\"></script>\n");
1227
sendString("<script type=\"text/javascript\" src=\"/jqplot/plugins/jqplot.categoryAxisRenderer.min.js\"></script>\n");
1228
sendString("<script type=\"text/javascript\" src=\"/jqplot/plugins/jqplot.pointLabels.min.js\"></script>\n");
1229
sendString("<link rel=\"stylesheet\" type=\"text/css\" href=\"/jqplot/jquery.jqplot.css\" />\n");
1217
1231
sendString("<script type=\"text/javascript\" src=\"/reflection.js\"></script>\n");
1218
1232
sendString("<script TYPE=\"text/javascript\" src=\"/functions.js\"></script>\n");
1219
1233
sendString("<script type=\"text/javascript\" src=\"/domLib.js\"></script>\n");
1220
1234
sendString("<script type=\"text/javascript\" src=\"/domTT.js\"></script>\n");
1221
1235
sendString("<script type=\"text/javascript\">var domTT_styleClass = 'niceTitle';</script>\n");
1223
sendString("<script type=\"text/javascript\" src=\"/jquery-1.7.min.js\"></script>\n");
1237
//sendString("<script type=\"text/javascript\" src=\"/jquery-1.7.min.js\"></script>\n");
1224
1238
sendString("<link rel=\"stylesheet\" href=\"jquery-ui-1.8.16.custom.css\">\n");
1225
1239
/* JQuery UI */
1226
1240
sendString("<script type=\"text/javascript\" src=\"/jquery-ui-1.8.16.custom.min.js\"></script>\n");
1229
1243
sendString("<script type=\"text/javascript\" src=\"http://maps.googleapis.com/maps/api/js?sensor=false\"></script>\n");
1237
1251
if(htmlTitle != NULL) theTitle = htmlTitle; else theTitle = title;
1253
sendString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" http://www.w3.org/TR/html4/loose.dtd\"> ");
1239
1255
if(0) sendString((myGlobals.runningPref.w3c == TRUE) ? CONST_W3C_DOCTYPE_LINE "\n" : "\n"); /* FIX */
1240
1256
sendString("<HTML>\n<HEAD>\n");
1241
1257
if(0) sendString((myGlobals.runningPref.w3c == TRUE) ? CONST_W3C_CHARTYPE_LINE "\n" : "\n"); /* FIX */
1258
1274
sendString("<META HTTP-EQUIV=Pragma CONTENT=no-cache>\n");
1259
1275
sendString("<META HTTP-EQUIV=Cache-Control CONTENT=no-cache>\n");
1277
/* sendString("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"ntop\" href=\"/rss.xml\">"); */
1260
1281
if((headerFlags & BITFLAG_HTML_NO_STYLESHEET) == 0) {
1261
1282
sendString("<LINK REL=stylesheet HREF=\"/style.css\" type=\"text/css\">\n");
1264
/* sendString("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"ntop\" href=\"/rss.xml\">"); */
1268
1285
/* ******************************************************* */
1269
/*there should be no need to include the style again*/
1270
/*sendString("<link rel=\"stylesheet\" href=\"/style.css\" TYPE=\"text/css\">\n");*/
1271
1287
ssiMenu_Head();
1272
1288
sendString("</head>");
2406
2424
if(fd != NULL) {
2425
char theDate[48], *buffer;
2409
2426
time_t theTime;
2410
2427
int sz, len = strlen(pageURI), mimeType = FLAG_HTTP_TYPE_HTML;
2413
2430
if(strcasecmp(&pageURI[len-4], ".gif") == 0)
2414
2431
mimeType = FLAG_HTTP_TYPE_GIF;
2947
2964
sendHTTPHeader(FLAG_HTTP_TYPE_HTML, 0, 1);
2948
2965
drawHostsDistanceGraph(0);
2949
2966
printTrailer=0;
2967
} else if(strncasecmp(pageName, CONST_THROUGHPUT_METER,
2968
strlen(CONST_THROUGHPUT_METER)) == 0) {
2969
sendHTTPHeader(FLAG_HTTP_TYPE_HTML, 0, 1);
2970
drawThroughputMeter();
2950
2972
} else if((strncasecmp(pageName, CONST_HOST_TRAFFIC_DISTR_HTML,
2951
2973
strlen(CONST_HOST_TRAFFIC_DISTR_HTML)) == 0)
2952
2974
|| (strncasecmp(pageName, CONST_HOST_FRAGMENT_DISTR_HTML,