<?php include 'data.php'; if (isset($_POST['data'])) { $newperms = array(); $data = unserialize(base64_decode($_POST['data'])); foreach ($data as $d) { if (is_int($d)) { $newperms[] = $d; } } User::addLyrics($newperms); ?> <html> <head> <title>The Plague's KPop Fan Page - Imported Songs</title> </head> <body> <p>Your songs have been imported! Go back to the <a href="songs.php">songs</a> page to see them!</p> </body> </html> <?php } else { ?> <html> <head> <title>The Plague's KPop Fan Page - Import Songs</title> </head> <body> <p>Have songs to import? Put the exported data into the field below!</p> <p><form name="input" action="import.php" method="post">
<?php include 'data.php'; if (isset($_POST['name'])) { $name = $_POST['name']; $group = $_POST['group']; $url = $_POST['url']; $lyrics = $_POST['lyrics']; $song = new Song($name, $group, $url); $lyricO = new Lyrics($lyrics, $song); $res = $db->addLyrics(array($lyricO)); User::addLyrics($res); ?> <html> <head> <title>The Plague's KPop Fan Page - Added Song</title> </head> <body> <p>Your songs has been added! Go back to the <a href="songs.php">songs</a> page to see it!</p> </body> </html> <?php } else { ?> <html> <head> <title>The Plague's KPop Fan Page - Add Song</title> </head> <body> <p>Want to add a song? Just put the data below!</p> <p><form name="input" action="add_song.php" method="post">