header.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. <div id="wrap">
  21. <!-- menu -->
  22. <nav role="navigation" class="navbar navbar-inverse">
  23. <div class="container-fluid">
  24. <!-- Brand and toggle get grouped for better mobile display -->
  25. <div class="navbar-header">
  26. <button data-target="#bs-example-navbar-collapse-5" data-toggle="collapse" class="navbar-toggle" type="button">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a href="index.php" class="navbar-brand">Hackpoint</a>
  33. </div>
  34. <!-- Collect the nav links, forms, and other content for toggling -->
  35. <?php if($myUser->connected()): ?>
  36. <div id="bs-example-navbar-collapse-5" class="collapse navbar-collapse">
  37. <ul class="nav navbar-nav">
  38. <li <?php echo $page=='index.php'?'class="active"':''; ?>><a href="index.php">Sketch</a></li>
  39. <li <?php echo $page=='component.php'?'class="active"':''; ?>><a href="component.php">Composants</a></li>
  40. <!--
  41. <li class="dropdown">
  42. <a data-toggle="dropdown" class="dropdown-toggle" href="#">Réglages <b class="caret"></b></a>
  43. <ul role="menu" class="dropdown-menu">
  44. <li class="dropdown-header">Setting</li>
  45. <li><a href="#">Action</a></li>
  46. <li><a href="#">Another action</a></li>
  47. <li><a href="#">Something else here</a></li>
  48. <li class="divider"></li>
  49. <li class="active"><a href="#">Separated link</a></li>
  50. <li class="divider"></li>
  51. <li class="disabled"><a href="#">One more separated link</a></li>
  52. </ul>
  53. </li>
  54. -->
  55. </ul>
  56. <ul class="nav navbar-nav navbar-right">
  57. <li class="dropdown <?php echo $page=='account.php'?'active':''; ?>" >
  58. <a data-toggle="dropdown" class="dropdown-toggle" href="#"> Connecté en tant que <?php echo $myUser->login; ?> <b class="caret"></b></a>
  59. <ul role="menu" class="dropdown-menu">
  60. <li class="dropdown-header">Profil</li>
  61. <li ><a href="account.php">Modifier</a></li>
  62. <li class="divider"></li>
  63. <li><a href="action.php?action=logout">Déconnexion</a></li>
  64. </ul>
  65. </li>
  66. </ul>
  67. <!--<button class="btn btn-danger navbar-btn" onclick="window.location='action.php?action=logout';" type="button">MAJ</button>-->
  68. </div><!-- /.navbar-collapse -->
  69. <?php endif; ?>
  70. </div><!-- /.container-fluid -->
  71. </nav>
  72. <!-- menu -->
  73. <!-- body -->
  74. <div class="container-fluid">
  75. <!-- messages -->
  76. <?php if(isset($_SESSION['error'])): ?>
  77. <div class="alert alert-danger">
  78. <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
  79. <strong>Oops!</strong> <?php echo $_SESSION['error']; unset($_SESSION['error']); ?>
  80. </div>
  81. <?php endif; ?>
  82. <?php if(isset($_SESSION['success'])): ?>
  83. <div class="alert alert-success alert-dismissable">
  84. <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
  85. <strong>Succès !</strong> <?php echo $_SESSION['success']; unset($_SESSION['success']); ?>
  86. </div>
  87. <?php endif; ?>
  88. <!-- messages -->