⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpd_data.c

📁 ENC28J60 System HTTP
💻 C
📖 第 1 页 / 共 2 页
字号:
/*,-----------------------------------------------------------------------------------------.| net/httpd_data|-----------------------------------------------------------------------------------------| this file stored the data used by httpd| - status/response messages| - website templates| - some websites| - some jpgs|| Author   : Simon Schulz / avr{AT}auctionant.de|| ||-----------------------------------------------------------------------------------------| License:| This program is free software; you can redistribute it and/or modify it under| the terms of the GNU General Public License as published by the Free Software| Foundation; either version 2 of the License, or (at your option) any later| version.| This program is distributed in the hope that it will be useful, but|| WITHOUT ANY WARRANTY;|| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR| PURPOSE. See the GNU General Public License for more details.|| You should have received a copy of the GNU General Public License along with| this program; if not, write to the Free Software Foundation, Inc., 51| Franklin St, Fifth Floor, Boston, MA 02110, USA|| http://www.gnu.de/gpl-ger.html`-----------------------------------------------------------------------------------------*/#include "httpd_data.h"PROGMEM unsigned char HTTPD_RESPONSE_OK[] = {"HTTP/1.0 200 Document follows\r\n""Server: avrETH1\r\n""Content-Type: "};PROGMEM unsigned char HTTPD_RESPONSE_401[] = {"HTTP/1.1 401 Authorization Required\r\n""Server: avrETH1\r\n""WWW-Authenticate: Basic realm=\"admin zone\"\r\n""Content-Type: text/html\r\n\r\n""<html>401 auth required</html>"};PROGMEM unsigned char HTTPD_RESPONSE_404[] = {"HTTP/1.0 404 not found\r\n""Server: avrETH1\r\n""Content-Type: text/html"};PROGMEM unsigned char HTTPD_CTYPE_HTML[] = {"text/html"};PROGMEM unsigned char HTTPD_CTYPE_BMP[] = {"image/bmp"};PROGMEM unsigned char HTTPD_CTYPE_JPG[] = {"image/jpeg"};PROGMEM unsigned char HTTPD_CTYPE_PNG[] = {"image/png"};PROGMEM unsigned char HTTPD_CTYPE_GIF[] = {"image/gif"};PROGMEM unsigned char HTTPD_RNRN[] ={"\r\n\r\n"};PROGMEM unsigned char HTTPD_FILE_INDEX_HTML[] = {"<html>""<head>" "<STYLE type=\"text/css\">"  "a.n {"  "width:100px;"  "height:20px;"  "display: block;"  "padding:0px 0px 0px 12px;"  "margin:0px 20px 2px 10px;"  "background-color:#ffffff;"  "border:1px solid black;"  "text-decoration: none;"  "font-family: Verdana, Arial, Helvetica, sans-serif;"  "font-size: 15px;"  "color:#000000;"  "}"  "a.n:hover {"  "padding-left: 3px;"  "border-left:10px solid black;"  "}" "</style>" "<title>avrETH1 webserver</title>""</head>""<body>""<center>""<div style=\"border: 1px solid black; width: 800px; text-align: left;\">"		"<div style=\"background: #930000; color:#ffffff; font-size: 50px; text-align: right; padding-bottom: 15px; padding-top: 15px; border-bottom: 1px solid white;\">avrETH1</div>"//"<div style=\"border-bottom: 1px solid white; border-top: 1px solid white; font-size: 15px; padding-bottom: 5px; padding-top: 5px; background: #000000; color:#ffffff; text-align: center;\">"//"MAIN      |  TEMPERATURE |      WEBCAM         |          ADMIN  (not active !)"//"</div>"		"<div style=\"background: #930000; height: 5px; width: 800px;\"></div>""<div style=\"float: left; background: #c0c0c0; border-right: 1px solid black; width: 135px; height: 560px; color: #ffffff; padding-bottom: 0px;\">""<br>""<a href=\"/\" class=\"n\">main</a><br>""<a href=\"/site/temp.htm\" class=\"n\">templog</a><br>""<a href=\"/site/cam.htm\" class=\"n\">webcam</a><br>"//"<a href=\"/site/servo.htm\" class=\"n\">servo pos</a><br>""<a href=\"/fs/ls.htm\" class=\"n\">file list</a><br>""<a href=\"/site/io.htm\" class=\"n\">set io</a><br>""<br><br>""<center style=\"color:#000;\">admin:</center>""<a href=\"/adm/up.htm\" class=\"n\">upload file</a><br>""<a href=\"/adm/mkfs.htm\" class=\"n\">format fs</a><br><br>"//"<a href=\"/fs/ls\">ls dflash</a><br>""<br><br>""</div>""<div style=\"float: left; width: 650px; height: 550px; padding: 5px;\">""<br>"  "$$FF" //adds include file here"<br>""</div>""<div style=\"clear: both; border-top: 1px solid black;\"><a href=\"http://avr.auctionant.de/avrETH1/?a=cc&b="BUILD_ID"\">avrETH project</a></div><div style=\"float:right;\">$$CK</div>""</div>""</center>""</body>""</html>"};PROGMEM unsigned char HTTPD_FILE_SITE_START_HTML[] = {"<center><br><br><h1>avrETH1 ready...</h1><br><br><h3>$$CK</h3><br>ENC28j60 revision: $$?? <br><br><br>""build: v0.1beta/"BUILD_ID" "BUILD_TIMESTAMP"</center>"};PROGMEM unsigned char HTTPD_FILE_SITE_FSLS_HTML[] = {"$$LF"};PROGMEM unsigned char HTTPD_FILE_SITE_RMOK_HTML[] = {"file removed. <a href=\"/fs/ls.htm\">back to file list</a>"};PROGMEM unsigned char HTTPD_FILE_SITE_UPOK_HTML[] = {"upload done. <a href=\"/fs/ls.htm\">go to file list</a>"};PROGMEM unsigned char HTTPD_FILE_SITE_UPERR_HTML[] = {"upload might have <b>FAILED</b>. please check file & try again. <a href=\"/fs/ls.htm\">go to file list</a>"};PROGMEM unsigned char HTTPD_FILE_SITE_MKFS_HTML[] = {"this will erase all data! sure ? <a href=\"/adm/mkfs2.htm\">yes</a>"};PROGMEM unsigned char HTTPD_FILE_SITE_MKFS2_HTML[] = {"formatting dataflash... this may take a very long time (~30s)!<br>""please wait until status led is switched on...<br>""<br>""the server will not respond to requests during format!"};PROGMEM unsigned char HTTPD_FILE_SITE_TEMP_HTML[] = {"<div style=\"float: left; margin-left: 10px;\">""<br>last 24h:<br>""<img src=\"/graph_0.bmp\" width=\"264\" height=\"136\"><br><br>""</div>""<div style=\"float: right; margin-left: 10px;\">""<br>now:<br>""<div style=\"font-size: 10px; background: #cccccc; color: #0000FF; border: 2px solid black; width: 200px; padding: 5px;\">""$$TN C</div>""<br>today min/max:<br><div style=\"font-size: 10px; background: #cccccc; color: #0000FF; border: 2px solid black; width: 200px; padding: 5px;\">""$$T- / $$T+" //ADD MIN/MAX TEMPERATURE" C</div>""<br>""</div>"};PROGMEM unsigned char HTTPD_FILE_SITE_CAM_HTML[] = {	"<script language=\"JavaScript\" type=\"text/javascript\">"	"var ie = document.all ? 1 : 0;"	"function a(e) {"	"return (e.offsetParent)?e.offsetLeft+a(e.offsetParent) : e.offsetLeft;"	"}"	"function cl(e) {"	"if (!e) var e = window.event;"	"x = e.clientX + document.body.scrollLeft;"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -