Example #1
0
 * Created: 9.24.03 by Ross Carlson
 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
$include_path = getcwd() . "/";
@(include_once 'system.php');
@(include_once 'settings.php');
include_once $include_path . "lib/general.lib.php";
include_once $include_path . 'services/class.php';
include_once 'backend/backend.php';
include_once 'frontend/display.php';
$jzSERVICES = new jzServices();
$jzSERVICES->loadStandardServices();
$display = new jzDisplay();
// Now let's get the node so we can get the tracks
$node = new jzMediaNode($_GET['jz_path']);
$par = $node->getAncestor("artist");
$artist = $par->getName();
$tracks = $node->getSubNodes("tracks", -1);
// Now let's display the header
header("Content-type: application/xml");
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n" . '<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version = "2.0">' . "\n" . '<channel>' . "\n" . '  <atom:link rel="self" type="application/rss+xml" title="Jinzora - ' . str_replace("&", "&amp;", $artist . " - " . $node->getName()) . '" href="' . $this_site . $_SERVER['REQUEST_URI'] . '" xmlns:atom="http://purl.org/atom/ns#" />' . "\n" . '  <title>Jinzora - ' . str_replace("&", "&amp;", $artist . " - " . $node->getName()) . '</title>' . "\n" . '  <link>http://www.jinzora.com/</link>' . "\n" . '  <language>en-us</language>' . "\n" . '  <generator>Jinzora http://www.jinzora.com/</generator>' . "\n";
if (($art = $node->getMainArt("200x200")) != false) {
    echo '  <itunes:image rel="image" type="video/jpeg" href="' . str_replace("&", "&amp;", $display->returnImage($art, false, false, false, "limit", false, false, false, false, false, "0", false, true)) . '">' . $node->getName() . '</itunes:image>' . "\n";
    echo '  <itunes:link rel="image" type="video/jpeg" href="' . str_replace("&", "&amp;", $display->returnImage($art, false, false, false, "limit", false, false, false, false, false, "0", false, true)) . '">' . $node->getName() . '</itunes:link>' . "\n";
}
if (($desc = $node->getDescription()) != false) {
    echo '  <description><![CDATA[' . $desc . ']]></description>' . "\n";
}
// Now let's loop through the tracks
$i = 0;
foreach ($tracks as $track) {
Example #2
0
										seconds = 1;
										updateJukebox(true);
									}
									setTimeout("displayCountdown()",1000);
								} 
								displayCountdown();
								--> 
							</script> 
							<?php 
}
// Now we need to return the path to the track that is playing so we can get the art and description for it
$filePath = $jb->getCurrentTrackPath();
$track = new jzMediaNode($filePath, "filename");
// Now let's make sure we are looking at a track for real
if (false !== $track && $track->getPath() != "") {
    $node = $track->getAncestor("album");
    if ($node) {
        // Now let's set what we'll need
        $album = ucwords($node->getName());
        $parent = $node->getAncestor("artist");
        if ($parent) {
            $artist = ucwords($parent->getName());
        } else {
            $artist = "";
        }
        // Now let's display the art
        if (($art = $node->getMainArt("130x130")) == false) {
            $art = "style/images/default.jpg";
        }
        $display->link($parent, $artist, $artist, false, false, false, false, false, "_top");
        echo " - ";