header.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>CCLD Lidar Admin Panel</title>
  5. <meta charset="utf-8" />
  6. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
  7. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto" />
  8. <link rel="stylesheet" type="text/css" href="/css/admin.css?v=<?=CACHEBUST?>" />
  9. <link rel="stylesheet" type="text/css" href="/css/spinkit-loader.css" />
  10. <link rel="shortcut icon" href="daktylos.png" type="image/png" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  12. <meta name="author" content="Justin Gilman" />
  13. <meta name="description" content="The management page for controlling clients and access to the Lidar data" />
  14. <meta name="robots" content="none" />
  15. </head>
  16. <body>
  17. <header id="header">
  18. <div id="navigation">
  19. <ul>
  20. <li><a id="dashboard-tab" href="/dashboard/">Dashboard</a></li>
  21. <li><a id="accounts-tab" href="/dashboard/accounts/">Accounts</a></li>
  22. <li><a id="users-tab" href="/dashboard/users/">Users</a></li>
  23. <li><a id="data-tab" href="/dashboard/data/">Data</a></li>
  24. </ul>
  25. </div>
  26. <div id="login-controls">Logged in as <?=$displayName?>
  27. <button id="logout" alt="Logout"></button>
  28. </div>
  29. </header>
  30. <div id="header-spacer"></div>
  31. <script type="text/javascript" src="/js/ajax.js?v=<?=CACHEBUST?>"></script>
  32. <script type="text/javascript" src="/js/notification.js?v=<?=CACHEBUST?>"></script>
  33. <script type="text/javascript">
  34. var logoutButton = document.getElementById("logout");
  35. logoutButton.addEventListener('click', function() {
  36. var promise = ajaxPost("/api/logout", {});
  37. promise.success = function(response) {
  38. window.location = "/dashboard/";
  39. };
  40. promise.failure = function(response) {
  41. console.warn("Communication failure", response);
  42. }
  43. }, false);
  44. </script>