<?php header('Content-Type: application/xspf+xml'); echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <?php while (have_tracks()) { the_track(); ?> <track> <creator><?php artist_name(); ?> </creator> <location><?php track_stream(); ?> </location> <title><?php track_title(); ?> </title> <image><?php release_cover_tiny(); ?> </image> <identifier><?php track_id(); ?>
/** * Displays form for with tracks, allowing adding or editing. * * @return void */ function ribcage_tracks_form() { global $release, $tracks, $track; ?> <form action="<?php echo str_replace('%7E', '~', $_SERVER['REQUEST_URI']); ?> &ribcage_step=3" method="post" id="ribcage_add_release" name="add_release"> <table width="200px"> <thead> <tr> <td>No</td> <td>Track Name</td> <td>Length</td> </tr> </thead> <?php $track_count = 1; ?> <?php while (have_tracks()) { the_track(); ?> <tr> <th scope="row"> <input type="text" style="width:30px;" class="regular-text" value="<?php track_no(); ?> " name="track_number_<?php echo $track_count; ?> " id="track_number_<?php echo $track_count; ?> " maxlength="200" /> </th> <td> <input type="text" style="width:320px;" class="regular-text" value="<?php track_title(); ?> " name="track_title_<?php echo $track_count; ?> " id="track_title_<?php echo $track_count; ?> " maxlength="200" /> </td> <td> <input type="text" style="width:70px;" class="regular-text" value="<?php echo $track['track_time']; ?> " name="track_time_<?php echo $track_count; ?> " id="track_time_<?php echo $track_count; ?> " maxlength="200" /> <input type="hidden" name="track_mbid_<?php echo $track_count; ?> " value='<?php echo $track['track_mbid']; ?> ' /> </td> </tr> <?php $track_count++; ?> <?php } ?> </table> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="Save Changes" /> </p> </form> <?php }