Fonctions communes aux programmes Nucleo Web ENC28J60...

Dependents:   Nucleo_Web_ENC28J60 Nucleo_Web_ENC28J60_ADC

Revision:
1:b52ad028c502
Parent:
0:36baf2ffa8eb
Child:
2:ba0105da75cd
--- a/Fct_Web.h	Wed Aug 19 09:49:11 2015 +0000
+++ b/Fct_Web.h	Wed Aug 19 16:08:31 2015 +0000
@@ -49,12 +49,10 @@
         httpContent = "/" +  PASSWORD + "/";
     else
         httpContent = "";
- /*
+ 
     httpContent += "<h1>301 Moved Permanently ";
-    httpContent += __image_301_Moved_Permanently__;
+    httpContent += str_moved_perm;
     httpContent += "</h1>\r\n";
-    */
-    httpContent += str_moved_perm;
     
     return (httpContent);
 }
@@ -73,12 +71,16 @@
     if(status == 1)
     {
         httpContent += "<hr><pre>\r\n  <font color=#00FF00>ON</font>";
-        httpContent += " <a href=\"./?sw=0\">[switch off]</a>\r\n";
+        httpContent += " <a href=\"./?sw=0\">[switch off]</a>";
+        httpContent += str_ampoule_OFF;
+        httpContent += "\r\n";
     }
     else
     {
         httpContent += "<hr><pre>\r\n  <font color=#FF0000>OFF</font>";
-        httpContent += " <a href=\"./?sw=1\">[switch on]</a>\r\n";
+        httpContent += " <a href=\"./?sw=1\">[switch on]</a>";
+        httpContent += str_ampoule_ON;
+        httpContent += "\r\n";
     }
 
     httpContent += "  <a href=\".\">[refresh status]</a>\r\n";
@@ -158,11 +160,10 @@
                 if(cmd == -1)
                 {
                     httpHeader = UNAUTHORIZED;
-                    // httpContent = "<h1>401 Unauthorized ";
-                    // httpContent += __image_401_Unauthorized__;
-                    // httpContent += "</h1>\r\n";
+                    httpContent = "<h1>401 Unauthorized ";
+                    httpContent = str_Unauthorized;
+                    httpContent += "</h1>\r\n";
                     
-                    httpContent = str_Unauthorized;
                     http_send(client, httpHeader, httpContent);
                     continue;
                 }