Пример #1
0
			<li><a href="#">Menu 1</a></li>
			<li><a href="#">Menu 2</a></li>
			<li><a href="#">Menu 3</a></li>
			<li><a href="#">Menu 4</a></li>

		</ul>
		<div class="btn">
			<?php 
if (Session::get('id') == null) {
    echo HTML::lien(DIR . "utilisateur/login", "Connectez-vous");
    echo HTML::lien(DIR . "utilisateur/inscription", "Inscrivez-vous");
} else {
    //je suis connecte
    echo "<a href='#' id='photo_btn'>Ajouter photo</a>";
    echo "<a href='#' id='album_btn'>Ajouter album</a>";
    echo HTML::lien(DIR . "utilisateur/logout", "Deconnexion");
}
?>
		</div>

		<form class="search" action="#">
			<input class="search-bar" type="text" placeholder="Rechercher...">
			<input class="submit" type="submit" value="Go">
		</form>
	</div>
</div>
<div class="ajout-album">
	<?php 
if (Session::get('id') != null) {
    ?>
		<form action="<?php 
Пример #2
0
<?php

use Helpers\Session;
use Helpers\HTML;
//print_r($_SESSION);
?>
<main class="container-fluid">

<?php 
echo "<div class='imgs col-md-3 shadow'>";
foreach ($data['photo'] as $p) {
    echo "<div class='imgseparate col-md-6' data-id='" . $p->getId() . "'>\n            <div class='avatar'>";
    echo HTML::img(DIR . $p->fichier, 'rien');
    echo "</div>\n        <div class='nom-photo'>\n            {$p->nom}";
    if (Session::get('id') == $p->utilisateur_id) {
        echo HTML::lien(DIR . "supprimer/" . $p->getId(), " - X");
    }
    echo "</div>\n    </div>";
}
echo "</div>";
?>

<?php 
echo "<div class='col-md-9'>";
if ($data['albums'] != false) {
    foreach ($data['albums'] as $a) {
        echo "<div class='drag-zone shadow' data-id='" . $a->getId() . "'>";
        echo "<h2 class='album-title'>{$a->nom}</h2>";
        echo "</div>";
    }
}