index.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. include_once("lib/auth.inc");
  3. auth::ensure_auth();
  4. if( empty($_GET['app']) || $_GET['app'] == 'config' ) {
  5. $kontent = "settings.inc";
  6. } elseif ($_GET['app'] == 'blog') {
  7. $kontent = "bengine.inc";
  8. } elseif ($_GET['app'] == 'microblog') {
  9. $kontent = "mbengine.inc";
  10. } elseif ($_GET['app'] == 'users' ) {
  11. $kontent = "users.inc";
  12. } else {
  13. $kontent = "settings.inc";
  14. }
  15. ?>
  16. <!doctype html>
  17. <html dir="ltr" lang="en-US">
  18. <head>
  19. <meta charset="utf-8" />
  20. <meta name="description" content="tCMS Control Panel"/>
  21. <meta name="viewport" content="width=device-width">
  22. <link rel="stylesheet" type="text/css" href="../../css/structure.css" />
  23. <link rel="stylesheet" type="text/css" href="../../css/screen.css" media="screen" />
  24. <link rel="stylesheet" type="text/css" href="../../css/print.css" media="print" />
  25. <?php
  26. if(file_exists('../../css/custom/avatars.css')) {
  27. echo '<link rel="stylesheet" type="text/css" href="../../css/custom/avatars.css" />';
  28. } else {
  29. echo '<link rel="stylesheet" type="text/css" href="../../css/avatars.css" />';
  30. }
  31. ?>
  32. <link rel="icon" type="image/vnd.microsoft.icon" href="../../img/icon/favicon.ico" />
  33. <title>tCMS Admin</title>
  34. <?php
  35. $config = json_decode(file_get_contents('config/main.json'),true);
  36. ?>
  37. </head>
  38. <body>
  39. <div id="topkek" style="text-align: center; vertical-align: middle;">
  40. <button title="Menu" id="clickme">&#9776;</button>
  41. <span id="configbar">
  42. <a class="topbar" title="Edit Various Settings" href="index.php">Settings</a>
  43. <a class="topbar" title="Blog Writer" href="index.php?nav=1">Blog Writer</a>
  44. <a class="topbar" title="Pop off about Stuff" href="index.php?nav=2">MicroBlogger</a>
  45. </span>
  46. </div>
  47. <div id="kontent" style="display: block;">
  48. <?php
  49. include $kontent;
  50. ?>
  51. </div>
  52. </body>
  53. </html>