/[mldonkey]/mldonkey/src/daemon/driver/driverControlers.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/driver/driverControlers.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by spiralvoice, Fri Jul 29 20:42:48 2005 UTC revision 1.41 by spiralvoice, Sun Aug 7 10:57:34 2005 UTC
# Line 849  let html_open_page buf t r open_body = Line 849  let html_open_page buf t r open_body =
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
# Line 874  let html_open_page buf t r open_body = Line 875  let html_open_page buf t r open_body =
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 =
# Line 884  let clear_page buf = Line 885  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
# Line 967  let http_handler o t r = Line 969  let http_handler o t r =
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" ->
# Line 1395  let http_handler o t r = Line 1408  let http_handler o t r =
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)

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26