<meta charset="utf-8"> <link rel="stylesheet" href="includes/css/style.css"> <script src="includes/js/jquery-1.11.3.min.js"></script> <script src="includes/js/script.js"></script> <link rel="icon" type="image/png" href="files/favicon.png" /> </head> <body> <?php require_once 'fonctions.php'; echo '<nav> <ul> <li><a href="/"><span class="icon-home"></span> Accueil</a></li>'; if (isset($_SESSION['user'])) { $th = new TouitosHandler($bd); $usr = $th->getByAttr("pseudo", $_SESSION['user'], PDO::PARAM_STR); echo '<li><a href="profile.php?user='******'user']) . '">' . getPhoto($usr, "profile_picture_nav") . '</a></li>'; echo '<li><button id="touiter" type="button"><span class="icon-bubble"></span> Publier un touite</button></li>'; } if (!isset($_SESSION['user'])) { echo '<li><button id="inscription" type="button"><span class="icon-user-plus"></span> S\'inscrire</button> <button id="connexion" type="button">Se connecter</button></li>'; } else { $nb = getNumberOfNotRead($bd); echo '<li><a href="discussion.php"><button type="button"><span class="icon-bubbles2"></span> Message privé'; echo '<span id="notViewedCounter">'; if ($nb != 0) { echo " ({$nb})"; } echo '</span></button>'; echo '</a></li>';
unlink($file); } if (move_uploaded_file($_FILES['profile_pic_upload']['tmp_name'], $FileDir)) { $connectedUser->_setPhoto(true); } } } setcookie("color", $_POST['editColor'], time() + 100000); setcookie("police", $_POST['editPolice'], time() + 100000); updateTouitos($bd, $connectedUser); } include 'nav.php'; ?> <div id="pageDisplay"> <?php if (isset($_GET['user'])) { $th = new TouitosHandler($bd); $usr = $th->getByAttr("pseudo", $_GET['user'], PDO::PARAM_STR); if ($usr != null) { show_profile($usr, $bd); } } else { searchByName("", $bd); } ?> </div> </body> </html>