if(!defined("CONFIG.INC")) require_once($_SERVER['DOCUMENT_ROOT'] . '/../lib/lib/config.inc'); require_once("$libdir/connect.inc"); require_once("$libdir/playlist.inc"); require_once("$libdir/pdf.inc"); if(!count($_SESSION['playlist'])){ $_ERROR[] = 'Your playlist is empty. Add items to your playlist, then click "Print" to print it!'; } else { $playlist_object = new Playlist($_SESSION['playlist']); if($playlist_object->outputPDF()){ $link = $playlist_object->displayLink('pdf'); } else { $_ERROR[] = 'Playlist PDF could not be created. Please try again.'; } } $_PAGE['stylesheets'][] = 'listpage.css'; $pagetitle = 'Print Playlist'; include("$incdir/site-top.inc"); print '
Your playlist has been created and is ready for printing. Click the link below to download:
' . "\n"; } if($link){ print "$link
\n"; print 'You can make adjustments to this playlist and print it again.
' . "\n"; } else if($_ERROR){ print 'Learn more about playlists.
' . "\n"; } print "