header.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. require_once __DIR__.DIRECTORY_SEPARATOR.'common.php';
  3. ?>
  4. <!doctype html>
  5. <html class="no-js" lang="">
  6. <head>
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <title><?php echo PROGRAM_NAME.' V'.SOURCE_VERSION.'.'.BASE_VERSION ?></title>
  10. <meta name="description" content="">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12. <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,800,700,400italic,600italic,700italic,800italic,300italic" rel="stylesheet" type="text/css">
  13. <link rel="stylesheet" href="css/bootflat.min.css">
  14. <link rel="stylesheet" href="css/font-awesome.min.css">
  15. <link rel="stylesheet" href="css/codemirror.css">
  16. <link rel="stylesheet" href="css/monokai.css">
  17. <link rel="stylesheet" href="css/main.css">
  18. </head>
  19. <body>
  20. <!-- menu -->
  21. <nav role="navigation" class="navbar navbar-inverse">
  22. <div class="container-fluid">
  23. <!-- Brand and toggle get grouped for better mobile display -->
  24. <div class="navbar-header">
  25. <button data-target="#bs-example-navbar-collapse-5" data-toggle="collapse" class="navbar-toggle" type="button">
  26. <span class="sr-only">Toggle navigation</span>
  27. <span class="icon-bar"></span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. </button>
  31. <a href="index.php" class="navbar-brand">Hackpoint</a>
  32. </div>
  33. <!-- Collect the nav links, forms, and other content for toggling -->
  34. <?php if($myUser->connected()): ?>
  35. <div id="bs-example-navbar-collapse-5" class="collapse navbar-collapse">
  36. <ul class="nav navbar-nav">
  37. <li <?php echo $page=='index.php'?'class="active"':''; ?>><a href="index.php">Sketch</a></li>
  38. <li <?php echo $page=='component.php'?'class="active"':''; ?>><a href="component.php">Composants</a></li>
  39. <!--
  40. <li class="dropdown">
  41. <a data-toggle="dropdown" class="dropdown-toggle" href="#">Réglages <b class="caret"></b></a>
  42. <ul role="menu" class="dropdown-menu">
  43. <li class="dropdown-header">Setting</li>
  44. <li><a href="#">Action</a></li>
  45. <li><a href="#">Another action</a></li>
  46. <li><a href="#">Something else here</a></li>
  47. <li class="divider"></li>
  48. <li class="active"><a href="#">Separated link</a></li>
  49. <li class="divider"></li>
  50. <li class="disabled"><a href="#">One more separated link</a></li>
  51. </ul>
  52. </li>
  53. -->
  54. <li class="dropdown <?php echo $page=='account.php'?'active':''; ?>" >
  55. <a data-toggle="dropdown" class="dropdown-toggle" href="#"> Connecté avec <?php echo $myUser->login; ?> <b class="caret"></b></a>
  56. <ul role="menu" class="dropdown-menu">
  57. <li class="dropdown-header">Profil</li>
  58. <li ><a href="account.php">Modifier</a></li>
  59. <li class="divider"></li>
  60. <li><a href="action.php?action=logout">Déconnexion</a></li>
  61. </ul>
  62. </li>
  63. </ul>
  64. <!--<button class="btn btn-danger navbar-btn" onclick="window.location='action.php?action=logout';" type="button">MAJ</button>-->
  65. </div><!-- /.navbar-collapse -->
  66. <?php endif; ?>
  67. </div><!-- /.container-fluid -->
  68. </nav>
  69. <!-- menu -->
  70. <!-- body -->
  71. <div class="container-fluid">
  72. <!-- messages -->
  73. <?php if(isset($_SESSION['error'])): ?>
  74. <div class="alert alert-danger">
  75. <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
  76. <strong>Oops!</strong> <?php echo $_SESSION['error']; unset($_SESSION['error']); ?>
  77. </div>
  78. <?php endif; ?>
  79. <?php if(isset($_SESSION['success'])): ?>
  80. <div class="alert alert-success alert-dismissable">
  81. <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
  82. <strong>Succès !</strong> <?php echo $_SESSION['success']; unset($_SESSION['success']); ?>
  83. </div>
  84. <?php endif; ?>
  85. <!-- messages -->