header.htm 744 B

123456789101112131415161718192021222324
  1. <%#
  2. Copyright 2008 Steven Barth <steven@midlink.org>
  3. Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
  4. Licensed to the public under the Apache License 2.0.
  5. -%>
  6. <%
  7. if not luci.dispatcher.context.template_header_sent then
  8. include("themes/" .. theme .. "/header")
  9. luci.dispatcher.context.template_header_sent = true
  10. end
  11. %>
  12. <script type="text/javascript" src="<%=resource%>/luci.js"></script>
  13. <script type="text/javascript">
  14. L = new LuCI(<%= luci.http.write_json({
  15. token = token,
  16. resource = resource,
  17. scriptname = luci.http.getenv("SCRIPT_NAME"),
  18. pathinfo = luci.http.getenv("PATH_INFO"),
  19. requestpath = luci.dispatcher.context.requestpath,
  20. pollinterval = luci.config.main.pollinterval or 5
  21. }) %>);
  22. </script>