?? htmllib.c
字號:
/***************************************************************文件名: htmllib.c 功能:動態網頁的函數庫(html語言編寫用標準輸入輸出流輸出)HTML common library functions 完成日期:2004.7.18 **************************************************************/#include <stdio.h>#include "htmllib.h"void htmlHeader(int fd){ write(fd,"<HTML><HEAD><meta http-equiv=Content-Type content=\"text/html;\ charset=gb2312-80\"><META content=\"Microsoft Frontpage 4.0\" \ name=GENERATOR><META name=ProgId content=\"FrontPage. \ Editor.Document\"><META http-equiv=Refresh content=15>",226); write(fd,"<script language=\"JavaScript\">",30);
write(fd,"if(document.images){var dot_off=new Image();dot_off. \ src=\"/dot_off.gif\";var dot_on=new Image();dot_on. \ src=\"/dot_on.gif\";}</script>",129); write(fd,"<style type=text/css>A:link{text-decoration: none;}A:visited{ \ text-decoration: none;}A:hover{text-decoration: underline;}",120); write(fd,"</style><TITLE>智園慧家</TITLE></HEAD>",38);} void htmlBody(int fd){ write(fd,"<BODY bgColor=#ffffff><FORM method=\"get\" action=\"/cgi-bin/ \ cgi_home.cgi\">",72); write(fd,"<TABLE height=81 cellSpacing=0 cellPadding=0 width=762 align= \ center border=0>",77); write(fd,"<TBODY><TR vAlign=top><TD vAlign=top width=121 bgColor= \ #ffffff height=81><DIV align=center><img border=\"0\" src= \ \"mylogo.gif\" width=123 height=117></DIV></TD>",156); write(fd,"<TD vAlign=top width=631 height=81><img border=\"0\" src= \ \"headflower.gif\" width=715 height=89>",92); \ write(fd,"<b><font size=\"5\" face=\"新宋體\" color=#000000> \ 歡迎進入智園慧家——智能家居系統</font></b></TD></TR> \ </TBODY></TABLE>",115);}void htmlFormStr(int fd){ write(fd,"<table><tr><td><table border=0 height=297 width=775><tr> \ <td align=middle valign=top width=217 height=357> \ <TABLE border=0 cellPadding=0 cellSpacing=0 width=\"90%\"> \ <TR><TD height=30 width=\"20%\"> ",209); write(fd,"<a href=\"/home.html\" onMouseOver=\"if(document.images) \ document.column1.src=dot_on.src;\" onMouseOut=\" \ if(document.images) document.column1. src=dot_off.src;\"> \ <IMG border=0 height=15 name=column1 src=\"dot_off.gif\" \ width=39>",219); write(fd,"</TD><TD width=\"32%\" height=30><A href=\"/home.html\"> \ <font size=\"3\" color=#008080>家電控制</FONT></A></TD></TR> \ <TR><TD height=30 width=\"20%\"> ",158); write(fd,"<a href=\"/home.html\" onMouseOver=\"if(document.images) \ document.column2.src=dot_on.src;\" onMouseOut=\" \ if(document.images) document.column2.src=dot_off.src;\"> \ <IMG border=0 height=15 name=column2 src=\"dot_off.gif\" \ width=39>",219); write(fd,"</TD><TD width=\"32%\" height=30><A href=\"/home.html\"> \ <font size=\"3\" color=#008080>管理中心</FONT></A></TD></TR> \ <TR><TD height=30 width=\"20%\"> ",158); write(fd,"<a href=\"/home.html\" onMouseOver=\"if(document.images) \ document. column3.src=dot_on.src;\" onMouseOut=\" \ if(document.images) document.column3.src=dot_off.src;\"> \ <IMG border=0 height=15 name=column3 src=\"dot_off.gif\" \ width=39>",219); write(fd,"</TD><TD width=\"32%\" height=30><A href=\"/home.html\"> \ <font size=\"3\" color=#008080>小區論壇</FONT></A></TD></TR> \ </table>",118); write(fd,"<td valign=top width=779 height=357>",36);}void htmlFormEnd(int fd){ write(fd,"</td></tr></table></FORM>",25); write(fd,"<table align=center width=769 border=0 cellspacing=0 \ cellpadding=0><tr><td bgcolor=#ffffff height=22 width=997> \ <marquee scrollamount=2 width=860 height=14>",155); write(fd,"<a href=\"http://ercdc.bjpu.edu.cn\" target=\ \ "_blank\">如您已看過小區給您的信息請按確認按鈕 網關上的信息 \ 指示燈將隨即熄滅 智園慧家謝謝您的使用 如有問題請與我們聯系 \ </a></marquee></td></tr></table>",196); }void htmlAnniuQuit(int fd){ write(fd,"<TABLE align=center border=0 cellPadding=0 cellSpacing=0 \ width=116 height=58><TD height=1 width=114><TR height=222 \ width=\"20%\"><td height=28 width=114> <IMG \ border=0 height=27 name=c1 src=\"dot_red.gif\" width=35>",228); write(fd,"</TR><TR width=\"32%\" height=222><FONT color=#000000><td \ height=29 width=114>緊急按鈕關閉</FONT></TR></table>",108);}void htmlAnniuStr(int fd,unsigned char *text,unsigned int size){ write(fd,"<TABLE align=center border=0 cellPadding=0 cellSpacing=0 \ width=267 height=58><TD height=1 width=265><TR height=222 \ width=\"20%\"><td height=28 width=265> <IMG \ border=0 height=27 name=c1 src=\"dot.gif\" width=35>",224); write(fd,"</TR><TR width=\"32%\" height=222><FONT color=#000000><td \ height=29 width=265>緊急按鈕啟動</FONT><font face=\"宋體\" \ size=\"1\"><b>",125); write(fd,text,size); write(fd,"</b></font></TR></table>",24);}void htmlFooter(int fd){ write(fd,"</TR></TABLE></BODY></HTML>",27);}void htmlText2(int fd){ write(fd,"<table border=\"1\" width=\"101%\" bgcolor=\"#fff4ff\"><tr> \ <td width=\"14%\">子網號</td><td width=\"14%\">節點號</td>",107); write(fd,"<td width=\"14%\">節點數據</td><td width=\"15%\">時間 \ </td> <td width=\"15%\">電池電量(毫伏)</td><td width=\"15%\"> \ 節點功能</td><td width=\"15%\">節點狀態</td></tr>",152); }void htmlText(int fd,char *text,int size){ write(fd,"<P>",3); write(fd,text,size); write(fd,"</P>",4);}void htmlText1(int fd,char *text,int size){ write(fd,"<P><img border=0 src=\"NEW1.gif\" width=25 height=12>",51); write(fd,text,size); write(fd,"</P>",4);}void htmlText3(int fd){ write(fd,"<tr>",4);}void htmlText4(int fd,char *text,int size){ write(fd,"<center><table border=0 cellpadding=0 cellspacing=0 \ width=\"104%\" bgcolor=\"#5b8fda\"><tr>",87); write(fd,text,size); write(fd,"</tr></table></center>",22);}void htmlTextHead(int fd){ write(fd,"<table border=0 cellpadding=0 cellspacing=0 width=\"105%\" \ bgcolor=\"#ECF3FF\"><tr><td width=\"100%\">",96); }void htmlTextEnd(int fd){ write(fd,"</td></tr></table>",18);}void htmlTextHead1(int fd){ write(fd,"<table border=0 cellpadding=0 cellspacing=0 width=\"105%\" \ bgcolor=\"#F4FFF4\"><tr><td width=\"100%\">",96); }void htmlTextEnd1(int fd){ write(fd,"</td></tr></table>",18);}void htmlText5(int fd,char *text,int size){ write(fd,"<td width=\"15%\">",16); write(fd,text,size); write(fd,"</td>",5);}void htmlText6(int fd){ write(fd,"</tr>",5);}void htmlText7(int fd){ write(fd,"</table>",8);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -