849 |
(Buffer.add_string buf |
(Buffer.add_string buf |
850 |
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" |
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" |
851 |
\"http://www.w3.org/TR/html4/frameset.dtd\">\n<HTML>\n<HEAD>\n";) |
\"http://www.w3.org/TR/html4/frameset.dtd\">\n<HTML>\n<HEAD>\n";) |
852 |
else Buffer.add_string buf "<html>\n<head>\n"; |
else Buffer.add_string buf "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n"; |
|
|
|
853 |
if !CommonInteractive.display_vd then begin |
if !CommonInteractive.display_vd then begin |
854 |
let this_page = "dheader.html" in |
let this_page = "dheader.html" in |
855 |
Buffer.add_string buf |
Buffer.add_string buf |
856 |
( |
( |
857 |
if !!html_mods_theme != "" && theme_page_exists this_page then |
if !!html_mods_theme != "" && theme_page_exists this_page then |
858 |
read_theme_page this_page else |
read_theme_page this_page else |
859 |
if !!html_mods then !!CommonMessages.download_html_header_mods0 |
if !!html_mods then !!CommonMessages.download_html_header_mods0 |
860 |
else !!CommonMessages.download_html_header_old); |
else !!CommonMessages.download_html_header_old); |
861 |
Printf.bprintf buf "<meta http-equiv=Refresh |
Printf.bprintf buf "<meta http-equiv=\"refresh\" content=\"%d\">" !!vd_reload_delay; |
|
content=\"%d\">" !!vd_reload_delay; |
|
862 |
end else |
end else |
863 |
|
if !CommonInteractive.display_bw_stats then |
864 |
|
Printf.bprintf buf "<meta http-equiv=\"refresh\" content=\"%d\">" !!html_mods_bw_refresh_delay; |
865 |
|
|
866 |
let this_page = "header.html" in |
let this_page = "header.html" in |
867 |
Buffer.add_string buf ( |
Buffer.add_string buf ( |
868 |
if !!html_mods_theme != "" && theme_page_exists this_page then |
if !!html_mods_theme != "" && theme_page_exists this_page then |
875 |
if not !!use_html_frames then add_simple_commands buf; |
if not !!use_html_frames then add_simple_commands buf; |
876 |
() |
() |
877 |
|
|
878 |
let html_close_page buf = |
let html_close_page buf close_body = |
879 |
Buffer.add_string buf "</body>\n"; |
if close_body then Buffer.add_string buf "</body>\n"; |
880 |
Buffer.add_string buf "</html>\n" |
Buffer.add_string buf "</html>\n" |
881 |
|
|
882 |
let clear_page buf = |
let clear_page buf = |
885 |
|
|
886 |
let http_handler o t r = |
let http_handler o t r = |
887 |
CommonInteractive.display_vd := false; |
CommonInteractive.display_vd := false; |
888 |
|
CommonInteractive.display_bw_stats := false; |
889 |
clear_page buf; |
clear_page buf; |
890 |
|
|
891 |
let user = if r.options.login = "" then "admin" else r.options.login in |
let user = if r.options.login = "" then "admin" else r.options.login in |
969 |
if !!html_mods_theme != "" && theme_page_exists this_page then |
if !!html_mods_theme != "" && theme_page_exists this_page then |
970 |
Buffer.add_string buf (read_theme_page this_page) else |
Buffer.add_string buf (read_theme_page this_page) else |
971 |
if !!html_mods then |
if !!html_mods then |
972 |
Printf.bprintf buf " |
(if !!html_frame_border then |
973 |
<frameset src=\"index\" rows=\"%d,25,*\"> |
Printf.bprintf buf |
974 |
<frame name=\"commands\" NORESIZE SCROLLING=\"NO\" NOSHADE marginwidth=0 marginheight=0 BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 src=\"commands.html\"> |
"<frameset src=\"index\" rows=\"%d,25,*\"> |
975 |
<frame name=\"fstatus\" NORESIZE SCROLLING=\"NO\" NOSHADE marginwidth=0 marginheight=0 BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 src=\"noframe.html\"> |
<frame name=\"commands\" noresize scrolling=\"no\" noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"commands.html\"> |
976 |
<frame name=\"output\" NORESIZE NOSHADE marginwidth=0 marginheight=0 BORDER=0 FRAMESPACING=0 FRAMEBORDER=0 src=\"oneframe.html\"> |
<frame name=\"fstatus\" noresize scrolling=\"no\" noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"noframe.html\"> |
977 |
</frameset>" !!commands_frame_height |
<frame name=\"output\" noresize noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"oneframe.html\"> |
978 |
|
</frameset> |
979 |
|
" !!commands_frame_height |
980 |
|
else |
981 |
|
Printf.bprintf buf |
982 |
|
"<frameset src=\"index\" rows=\"%d,25,*\" frameborder=\"no\"> |
983 |
|
<frame name=\"commands\" noresize scrolling=\"no\" noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"commands.html\"> |
984 |
|
<frame name=\"fstatus\" noresize scrolling=\"no\" noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"noframe.html\"> |
985 |
|
<frame name=\"output\" noresize noshade marginwidth=0 marginheight=0 border=0 framespacing=0 src=\"oneframe.html\"> |
986 |
|
</frameset> |
987 |
|
" !!commands_frame_height) |
988 |
else |
else |
989 |
Printf.bprintf buf " |
Printf.bprintf buf |
990 |
<frameset src=\"index\" rows=\"%d,2*\"> |
"<frameset src=\"index\" rows=\"%d,2*\"> |
991 |
<frameset src=\"index\" cols=\"5*,1*\"> |
<frameset src=\"index\" cols=\"5*,1*\"> |
992 |
<frame name=\"commands\" src=\"commands.html\"> |
<frame name=\"commands\" src=\"commands.html\"> |
993 |
<frame name=\"fstatus\" src=\"noframe.html\"> |
<frame name=\"fstatus\" src=\"noframe.html\"> |
994 |
</frameset> |
</frameset> |
995 |
<frame name=\"output\" src=\"oneframe.html\"> |
<frame name=\"output\" src=\"oneframe.html\"> |
996 |
</frameset>" !!commands_frame_height; |
</frameset> |
997 |
|
" !!commands_frame_height; |
998 |
end else |
end else |
999 |
html_open_page buf t r true |
html_open_page buf t r true |
1000 |
| "complex_search.html" -> |
| "complex_search.html" -> |
1408 |
|
|
1409 |
let s = |
let s = |
1410 |
match !http_file_type with |
match !http_file_type with |
1411 |
HTM -> html_close_page buf; dollar_escape o !!use_html_frames (Buffer.contents buf) |
HTM -> html_close_page buf false; dollar_escape o !!use_html_frames (Buffer.contents buf) |
1412 |
| MLHTM -> html_close_page buf; dollar_escape o !!use_html_frames (Buffer.contents buf) |
| MLHTM -> html_close_page buf true; dollar_escape o !!use_html_frames (Buffer.contents buf) |
1413 |
| TXT |
| TXT |
1414 |
| BIN -> Buffer.contents buf |
| BIN -> Buffer.contents buf |
1415 |
| UNK -> "Unknown type for content :" ^ (Buffer.contents buf) |
| UNK -> "Unknown type for content :" ^ (Buffer.contents buf) |