Example #1
0
    }
    //------
    Flight::render('playlist', array('playlist' => $playlist, 'tracks' => $tracks), 'body_content');
    Flight::render('layout', array('Titre' => $playlist[0]->titre, 'include_in_header' => $include_in_header, 'footer_content' => $footer_content));
});
/**
****
******
******
****** routing proposedTracks
******
******
****
**/
Flight::route('GET /proposedtrack/create', function () {
    $playlists = getPlaylists();
    Flight::render('createProposedTrack', array('playlists' => $playlists));
});
Flight::route('GET /playlist/@id/destroy', function ($id) {
    $response = json_decode(deletePlayList($id));
    if ($response->stat) {
        Flight::redirect('http://localhost/php/App/playlists');
    } else {
        Flight::redirect('http://localhost/php/App/');
    }
});
Flight::route('GET /track/@id/destroy', function ($id) {
    $response = json_decode(deleteTrack($id));
    $request = Flight::request();
    if ($response->stat) {
        Flight::redirect($request->referrer);
Example #2
0
                    <ul>
                        <?php 
echo getChartCategories();
?>
                    </ul>
                </li> <!-- Submenu -->
                <li><a href="songs.php">SONGS</a></li>
                <li class="current-page"><a href="playlists.php">PLAYLISTS</a></li>
                <li><a href="contacts.php">CONTACTS</a></li>
            </ul>
        </nav>
        <section class="content-wrapper">
        <section class="album-section">
            <!-- Albums Section -->
            <p></p>
            <?php 
getPlaylists();
?>
        </section>
    </section>
    </section>
    <footer>
        <p>&copy; All Rights Reserved</p>
    </footer>
</div>

<script>
    document.getElementById('background').style.height = window.innerHeight;
</script>
</body>
</html>