webserver_handlePages.ino 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. void httpServerHandlePage_main()
  2. {
  3. httpServerSendHtmlHeadChunked();
  4. httpServer.sendContent_P(html_main_script);
  5. httpServer.sendContent_P(html_head_end);
  6. httpServer.sendContent_P(html_bodytag_jsinit);
  7. httpServerSendHtmlBodyPageheadChunked();
  8. httpServer.sendContent_P(html_main_body_app);
  9. httpServer.sendContent_P(html_main_body_sysinfo);
  10. if (httpIsAuthenticatedAdmin())
  11. {
  12. httpServer.sendContent_P(html_main_body_adminonly);
  13. //#ifdef ENABLE_FEATURE_HTTP_UPDATER
  14. // if (confWeb.enableOTA)
  15. // httpServer.sendContent_P(html_main_body_adminonly_ota);
  16. //#endif
  17. //#ifdef ENABLE_FEATURE_FILESYSTEM_BROWSER
  18. // if (confWeb.FSbrowser)
  19. // httpServer.sendContent_P(html_main_body_adminonly_fsbrowser);
  20. //#endif
  21. #ifdef ENABLE_FEATURE_WEB_CONSOLE
  22. if (confWeb.wConsole)
  23. httpServer.sendContent_P(html_main_body_adminonly_console);
  24. #endif
  25. #ifdef ENABLE_FEATURE_WSCONSOLE
  26. if (confWeb.wsConsole)
  27. httpServer.sendContent_P(html_main_body_adminonly_wsconsole);
  28. #endif
  29. }
  30. httpServer.sendContent_P(html_main_body2);
  31. httpServerSendHtmlFooterChunked();
  32. }
  33. void httpServerHandlePage_restart()
  34. {
  35. httpServerSendHtmlHeadChunked();
  36. httpServer.sendContent_P(html_head_end);
  37. httpServer.sendContent_P(html_bodytag);
  38. configChangedRestartRequired = false;
  39. httpServerSendHtmlBodyPageheadChunked();
  40. httpServer.sendContent_P(html_restarting_body);
  41. httpServerSendHtmlFooterChunked();
  42. }
  43. void httpServerHandlePage_sysInfo()
  44. {
  45. httpServerSendHtmlHeadChunked();
  46. httpServer.sendContent_P(html_sysinfo_script);
  47. httpServer.sendContent_P(html_head_end);
  48. httpServer.sendContent_P(html_bodytag_jsinit);
  49. httpServerSendHtmlBodyPageheadChunked();
  50. httpServer.sendContent_P(html_sysinfo_body);
  51. httpServerSendHtmlFooterChunked();
  52. }