?? webdoc1.c
字號:
//-----------------------------------------------------------------------------
// Net WEBDOC.C
//
// This module contains web pages and headers
//-----------------------------------------------------------------------------
#include "general.h"
// This is the header for web text pages. LENGTH is the body
// length, needed because in HTTP 1.1 we leave connection open
// Includes control statements to prevent browser from caching page
char FLASHDATA html_header[] = {
"HTTP/1.1 200 OK\n"
"Cache-control: no-cache\n"
"Connection: Keep-Alive\n"
"Content-Length: TAG:LEN1\n"
"Content-Type: text/html\r\n\r\n" };
// This page displays a table with weather data and a switch
// to turn a port pin on and off.
char FLASHDATA web_page[] = {
"<HTML><HEAD><TITLE> 單片機上網開發板Web Server</TITLE>\n"
"<META http-equiv=Content-Type content=\"text/html; charset=gb2312\">\n"
/*"<META http-equiv=\"refresh\" content=\"5\">"*/
"<META content=\"Microsoft FrontPage 5.0\" name=GENERATOR></HEAD>\n"
"<BODY>\n"
"<FORM action=/index.html method=post>\n"
"<TABLE border=0 width=\"786\">\n"
"<TBODY>\n"
"<TR>\n"
"<TD width=\"739\">\n"
"<H1> \n"
"<a href=\"http://www.jsmart.com\" target=\"_blank\">"
"<IMG src=\"photo1.jpg\" width=\"272\" height=\"58\"></H1></a>\n"
"<H1><font size=\"4\"></font><font face=\"宋體\" size=\"4\"> \n"
" 單片機上網開發板Web Server演示程序</font></H1>\n"
"<TABLE border=2 width=\"419\">\n"
"<TBODY>\n"
"<TR>\n"
"<TD width=235 height=25>\n"
"<p align=\"center\"><font face=\"仿宋\">系統CPU溫度</font></TD>\n"
"<TD width=166 height=25 align=\"center\">TAG:TMP1℃</TD></TR>\n"
"<TR>\n"
"<TD width=235 height=25>\n"
"<p align=\"center\">ADC輸入電壓</TD>\n"
"<TD width=166 height=25 align=\"center\">TAG:VOL1V</TD></TR>\n"
"</TABLE><BR><BR> 控制信號指示: \n"
" <INPUT type=radio CHECKED value=1 name=switch>滅 <INPUT type=radio \n"
"value=0 name=switch TAG:CHK2>亮 <INPUT type=submit value=發送> </TD></TR>\n"
"<TR><TD><BR> IP地址: <INPUT type=text name=ip></TD></TR>\n"
"<TD width=\"37\"><BR> \n"
"</TD></TR>\n"
"<TR>\n"
"<TD width=\"739\">\n"
"</TD>\n"
"<TD width=\"37\"> </TD></TR></TBODY></TABLE></FORM></BODY></HTML>\n"
};
// This is the header for jpeg graphic pages. TAG2 is the body
// length, needed because in HTTP 1.1 we leave connection open
// Includes control statements to prevent browser from caching page
char FLASHDATA jpeg_header[] = {
"HTTP/1.1 200 OK\n"
"Cache-control: no-cache\n"
"Connection: Keep-Alive\n"
"Content-Length: TAG:LEN2\n"
"Content-Type: image/jpeg\r\n\r\n"};
// This is jpeg image of the board which gets displayed on the web
// page - to exercise capabilities of this server to send files
// which span multple TCP segments. This image is 6757 bytes.
char FLASHDATA photo1_jpeg[] = {
255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,96,
0,96,0,0,255,219,0,67,0,8,6,6,7,6,5,8,
7,7,7,9,9,8,10,12,20,13,12,11,11,12,25,18,
19,15,20,29,26,31,30,29,26,28,28,32,36,46,39,32,
34,44,35,28,28,40,55,41,44,48,49,52,52,52,31,39,
57,61,56,50,60,46,51,52,50,255,219,0,67,1,9,9,
9,12,11,12,24,13,13,24,50,33,28,33,50,50,50,50,
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,
50,50,50,50,50,50,50,50,50,50,50,50,50,50,255,192,
0,17,8,0,69,0,246,3,1,34,0,2,17,1,3,17,
1,255,196,0,31,0,0,1,5,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,
10,11,255,196,0,181,16,0,2,1,3,3,2,4,3,5,
5,4,4,0,0,1,125,1,2,3,0,4,17,5,18,33,
49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,
66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,
24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,
67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,
99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,
131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,
154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,
184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,
214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,
242,243,244,245,246,247,248,249,250,255,196,0,31,1,0,3,
1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,
2,3,4,5,6,7,8,9,10,11,255,196,0,181,17,0,
2,1,2,4,4,3,4,7,5,4,4,0,1,2,119,0,
1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,
34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,
98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,
40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,
74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,
106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,
137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,
167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,
197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,
227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,
250,255,218,0,12,3,1,0,2,17,3,17,0,63,0,239,
250,126,60,81,85,86,250,54,60,130,191,90,81,119,15,93,
213,244,92,175,177,241,233,162,205,20,193,50,30,142,191,157,
59,60,103,131,83,102,59,138,79,233,73,158,226,147,183,167,
245,163,52,5,197,163,156,241,205,29,169,9,160,3,63,133,
40,52,135,158,212,12,99,222,152,14,36,103,154,7,94,212,
207,188,77,40,52,128,119,30,212,148,220,241,64,39,165,49,
143,207,189,25,166,100,228,251,81,159,94,13,32,29,197,25,
32,244,200,166,134,24,244,163,118,122,26,44,3,142,122,210,
142,125,42,35,50,12,230,69,24,247,164,51,70,57,50,39,
253,245,78,204,9,115,239,70,112,15,173,70,37,140,128,124,
197,250,230,131,60,64,243,34,15,248,21,22,98,186,37,36,
26,9,24,28,243,80,155,136,7,89,83,243,168,31,81,137,
87,32,22,246,20,40,55,178,14,100,93,207,112,115,69,102,
29,83,229,226,3,159,66,213,25,212,165,207,27,71,181,90,
163,54,79,180,137,174,57,224,117,163,36,10,197,58,133,201,
57,14,163,254,2,41,166,242,224,168,13,41,35,216,1,79,
216,72,94,209,35,115,62,189,105,50,51,215,154,196,23,151,
35,164,199,143,165,61,117,9,194,252,196,19,238,41,251,9,
7,182,137,176,78,59,209,89,139,170,62,57,136,31,198,138,
159,101,62,197,123,68,87,7,35,138,50,57,221,212,250,83,
120,6,151,57,235,218,186,142,113,84,227,4,84,162,234,85,
24,15,250,10,131,112,247,160,176,110,7,90,151,20,198,157,
139,177,95,54,113,55,62,155,69,92,14,24,100,17,147,210,
177,183,42,156,118,20,9,0,245,205,67,165,125,138,83,177,
178,11,30,132,123,210,150,6,178,5,244,171,31,14,112,61,
133,40,212,100,29,88,159,248,8,168,246,50,45,84,70,182,
114,104,206,9,234,107,37,181,9,155,27,91,3,190,64,168,
154,238,82,121,111,208,83,84,36,47,104,141,190,71,106,51,
201,3,173,96,121,242,12,182,127,74,12,178,49,57,63,165,
87,176,125,195,218,27,172,225,62,241,21,92,234,17,41,35,
230,207,225,89,28,129,131,210,147,119,24,21,75,14,186,146,
234,179,89,181,40,128,39,99,254,95,253,122,171,37,252,236,
73,86,192,62,194,169,6,35,154,11,156,156,119,170,84,98,
137,115,108,178,110,167,97,134,126,62,130,144,78,235,146,15,
94,188,85,125,196,138,66,220,96,213,251,52,43,178,82,192,
231,39,147,77,44,56,168,143,35,29,168,28,28,138,165,16,
108,155,126,23,4,210,100,17,81,143,210,157,236,56,163,149,
10,226,238,198,8,20,166,70,52,204,142,252,129,74,58,83,
178,1,114,105,59,243,215,181,34,176,44,71,122,143,205,70,
156,195,252,64,102,139,8,155,35,222,128,220,84,38,225,4,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -