diff options
Diffstat (limited to 'src/IO.c')
-rw-r--r-- | src/IO.c | 40 |
1 files changed, 23 insertions, 17 deletions
@@ -224,7 +224,9 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); - + + Send_HTTP(request, "</head>\n<body>\n"); + /* HTTP_Write out the header part. */ SetHTML_ContentHeader(GH, 0, message, NULL); Send_HTTP_String(request, message); @@ -243,9 +245,11 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) "allow you to e.g. add fields and customise behaviour.\n" "Depending on your authorisation, you can access the \n" "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n" - "<center>\n" - "<table cellspacing=\"5\" cellpadding=\"5\"\n>" - "<tr><th>File Name</th><th>Variable</th><th>Description</th></tr>\n"); + "<div class=\"centered\">\n" + "<table cellspacing=\"5\" cellpadding=\"5\" rules=\"cols\">\n" + "<thead>\n" + "<tr><th>File Name</th><th>Variable</th><th>Description</th></tr>\n" + "</thead>\n<tbody>\n"); for (list = filelist; list; list = list->next) { @@ -263,7 +267,7 @@ static int AdvertisedFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP_String(request, message); } - Send_HTTP(request,"</table></center>"); + Send_HTTP(request,"</tbody></table>\n</div>"); /* Write out the footer part. */ SetHTML_ContentFooter(GH, 0, message); @@ -315,9 +319,9 @@ static int SendFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP(request, "<html>\n<head>\n"); Send_HTTP(request, "<title>Error 500: Internal Error</title>\n"); Send_HTTP(request, "</head>\n<body>\n"); - Send_HTTP(request, "<center><p>Unable to open " ); + Send_HTTP(request, "<div class=\"centered\"><p>Unable to open " ); Send_HTTP(request, list->filename ); - Send_HTTP(request, "</p></center>\n"); + Send_HTTP(request, "</p></div>\n"); Send_HTTP(request, "</body>\n</html>\n" ); } break; @@ -333,9 +337,9 @@ static int SendFilePage(const cGH *GH, httpRequest *request, void *data) Send_HTTP(request, "<html>\n<head>\n" ); Send_HTTP(request, "<title>Error 404: Not Found</title>\n" ); Send_HTTP(request, "</head>\n<body>\n" ); - Send_HTTP(request, "<center><p>" ); + Send_HTTP(request, "<div class=\"centered\"><p>" ); Send_HTTP(request, request->uri ); - Send_HTTP(request, " does not exist</p></center>\n" ); + Send_HTTP(request, " does not exist</p></div>\n" ); Send_HTTP(request, "</body>\n</html>\n" ); } return 0; @@ -373,21 +377,24 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) SetHTML_HeadHeader( message); Send_HTTP_String(request, message ); + Send_HTTP(request, "</head>\n<body>\n"); + /* HTTP_Write out the header part. */ SetHTML_ContentHeader(GH, 0, message, NULL); Send_HTTP_String(request, message); - Send_HTTP(request, "<h1>Viewport</h1>"); + Send_HTTP(request, "<h1>Viewport</h1>\n"); Send_HTTP(request, "<p>This page displays certain types of the output files \n" "from the <a href=\"/Output/index.html\">download</a> page \n" - "as images (currently only jpegs [mime type image/jpeg]).</p>\n" + "as images (currently only JPEGs [mime type image/jpeg]).</p>\n" "<p>Many IO methods have <dfn>steerable</dfn> parameters which \n" "allow you to e.g. add fields and customise behaviour.\n" "Depending on your authorisation, you can access the \n" - "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n"); + "<a href=\"/Parameters/index.html\">parameter steering page</a></p>\n" + "<div class=\"centered\">\n"); for (list = filelist; list; list = list->next) { @@ -396,8 +403,7 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) if (!foundone) { Send_HTTP(request, - "<center>" - "<table cellspacing=\"5\" cellpadding=\"5\" border=\"0\"\n>" + "<table cellspacing=\"5\" cellpadding=\"5\">\n" "<tr><th>Variable<br>File Name</th>\n" "<th>Description</th><th>Image</th></tr>\n"); foundone = 1; @@ -428,12 +434,12 @@ static int ViewportFilePage(const cGH *GH, httpRequest *request, void *data) if (!foundone) { - Send_HTTP(request, "<center><strong><p>No viewable images registered!</p>" - "<strong></center>\n"); + Send_HTTP(request, "<strong>\n<p>No viewable images registered!</p>\n" + "</strong>\n"); } - Send_HTTP(request, "</table>\n</center>\n"); + Send_HTTP(request, "</div>\n"); /* Write out the footer part. */ |