Example #1
0
 function drawBreadcrumbs($return = false)
 {
     global $img_up_arrow, $this_page;
     // Now let's create the breadcrumbs
     $bcArray = explode("/", $_SESSION['jz_path']);
     $node = new jzMediaNode($_SESSION['jz_path']);
     $display = new jzDisplay();
     $bcrumbs = "";
     $bcrumbs = $img_up_arrow . " ";
     $bcrumbs .= '<a href="' . str_replace("ajax_request.php", "index.php", $this_page) . '">' . word("Home") . '</a>';
     $bcrumbs .= "&nbsp;";
     // Now we need to cut the last item off the list
     $bcArray = array_slice($bcArray, 0, count($bcArray) - 1);
     // Now let's display the crumbs
     $path = "";
     for ($i = 0; $i < count($bcArray); $i++) {
         $bcrumbs .= $img_up_arrow . "&nbsp;";
         $path .= $bcArray[$i] . "/";
         $curPath = substr($path, 0, strlen($path) - 1);
         $arr = array();
         $arr['jz_path'] = $curPath;
         $link = str_replace("ajax_request.php", "index.php", urlize($arr));
         $bcrumbs .= '<a href="' . $link . '">' . $bcArray[$i] . '</a>';
         $bcrumbs .= "&nbsp;";
     }
     $mode = "GET";
     $bcrumbs .= '<form action="' . $this_page . '" method="' . $mode . '">';
     $bcrumbs .= '- <select style="width:100px" class="jz_select" name="' . jz_encode('jz_path') . '" onChange="form.submit();">';
     $parent = $node->getParent();
     $nodes = $parent->getSubNodes("nodes");
     foreach ($nodes as $child) {
         $path = $child->getPath("String");
         $bcrumbs .= '<option ';
         // Is this the current one?
         if ($child->getName() == $node->getName()) {
             $bcrumbs .= ' selected ';
         }
         $bcrumbs .= 'value="' . htmlentities(jz_encode($path)) . '">' . $display->returnShortName($child->getName(), 20) . '</option>';
     }
     $bcrumbs .= '</select>';
     $bcrumbs .= "</form>&nbsp;";
     if ($return) {
         return $bcrumbs;
     }
     echo $bcrumbs;
 }
Example #2
0
    /**
     * Displays the block for the album on the Album page
     *
     * @author Ben Dodson, Ross Carlson
     * @since 9/6/05
     * @version 9/6/05
     *
     **/
    function albumAlbumBlock($node = false)
    {
        global $album_name_truncate, $img_play, $cms_mode, $img_random_play, $img_play_dis, $img_random_play_dis, $jzUSER, $short_date, $enable_ratings, $show_album_clip_play, $img_clip;
        $display = new jzDisplay();
        // Does the cache file exist?
        if ($display->startCache("albumAlbumBlock", $node)) {
            return;
        }
        if (!defined('NO_AJAX_LINKS') && $node === false) {
            $node = new jzMediaNode($_SESSION['jz_path']);
        }
        $artSize = 100;
        $desc_truncate = 700;
        $desc = $node->getDescription();
        // Now let's purge the extra returns that might be at the beginning
        while (substr($desc, 0, 4) == "<br>" or substr($desc, 0, 6) == "<br />") {
            if (substr($desc, 0, 4) == "<br>") {
                $desc = substr($desc, 5);
            }
            if (substr($desc, 0, 6) == "<br />") {
                $desc = substr($desc, 7);
            }
        }
        if ($desc == "") {
            $artSize = 200;
        }
        $art = $node->getMainArt($artSize . "x" . $artSize);
        if ($art == false and $desc == "") {
            return;
        }
        // now let's set the title for this block
        $title = returnItemShortName($node->getName(), $album_name_truncate);
        // Now let's get the year
        $year = $node->getYear();
        $dispYear = "";
        if (!isnothing($year)) {
            $dispYear = " (" . $year . ")";
        }
        // Now let's setup our buttons for later
        $playButtons = "";
        $playButtons .= $display->playLink($node, $img_play, false, false, true) . $display->playLink($node, $img_random_play, false, false, true, true);
        // Now let's make sure they can stream
        if (!$jzUSER->getSetting('stream')) {
            $playButtons = $img_play_dis . $img_random_play_dis;
        }
        if ($show_album_clip_play == "true") {
            $playButtons .= $display->playLink($node, $img_clip, false, false, true, false, false, true);
        }
        if ($jzUSER->getSetting('download')) {
            $playButtons .= $display->downloadButton($node, false, true, true);
        } else {
            $playButtons .= $display->downloadButton($node, true, true, true);
        }
        $playButtons .= $display->podcastLink($node);
        if ($enable_ratings == "true") {
            $playButtons .= $display->rateButton($node, true);
        }
        $playButtons .= " &nbsp; ";
        // Let's open the block
        $this->blockHeader(word("Album") . ": " . $title . $dispYear . "&nbsp;", $playButtons);
        $this->blockBodyOpen();
        ?>
		<table width="100%" cellpadding="2" cellspacing="0" border="0">
			<tr>
				<td width="100%" <?php 
        if ($desc == "") {
            echo 'align="center"';
            $align = "";
        } else {
            $align = "left";
        }
        ?>
>
					<?php 
        // If there is no description let's make the art bigger
        $rating = $display->rating($node, true);
        if ($rating != "" and $desc == "") {
            echo $rating . "<br>";
        }
        if ($jzUSER->getSetting('stream')) {
            $display->playLink($node, $display->returnImage($art, $node->getName(), $artSize, $artSize, "fit", false, false, $align, "5", "5"));
        } else {
            $display->Image($art, $node->getName(), $artSize, $artSize, "fit", false, false, $align, "5", "5");
        }
        if ($cms_mode == "false") {
            echo '<span class="jz_artistDesc">';
        }
        if ($rating != "" and $desc != "") {
            echo $rating . "<br>";
        }
        $desc = str_replace("\n", '<p>', $desc);
        echo $display->returnShortName($desc, $desc_truncate);
        if (strlen($desc) > $desc_truncate) {
            $url_array = array();
            $url_array['jz_path'] = $node->getPath("String");
            $url_array['action'] = "popup";
            $url_array['ptype'] = "readmore";
            echo ' <a href="' . urlize($url_array) . '" onclick="openPopup(this, 450, 450); return false;">read more</a>';
        }
        if (!isNothing($node->getDateAdded()) && $node->getDateAdded() != "0") {
            echo "<br>" . word("Added") . ": " . date($short_date, $node->getDateAdded());
        }
        if ($cms_mode == "false") {
            echo '</span>';
        }
        ?>
				</td>
			</tr>
		</table>
		<?php 
        // let's close the block
        $this->blockBodyClose();
        $this->blockSpacer();
        // Now lets finish out the cache
        $display->endCache();
    }
Example #3
0
}
/**
* Scans the users system for newly added media
* 
* @author Ross Carlson
* @version 01/18/05
* @since 01/18/05
* @param $node The node we are looking at
*/
global $backend;
if ($backend == "id3-cache" || $backend == "id3-database") {
    $node = new jzMediaNode();
    // Root only, just to be sure...
}
// First let's display the top of the page and open the main block
$title = $node->getName();
if ($title == "") {
    $title = word("Root Level");
}
$this->displayPageTop("", "Scanning for new media in: " . $title);
$this->openBlock();
// Let's show them the form
if (!isset($_POST['edit_scan_now'])) {
    $url_array = array();
    $url_array['action'] = "popup";
    $url_array['ptype'] = "scanformedia";
    $url_array['jz_path'] = $_GET['jz_path'];
    $i = 0;
    ?>
			<form action="<?php 
    echo urlize($url_array);
Example #4
0
@(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) {
    // Let's get the tracks path
    $meta = $track->getMeta();
    $artist = $track->getAncestor("artist");
    // Now let's create the URL
    $tpArr = explode("?", $track->getFileName("user"));
Example #5
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
/**
* Displays the quick box to add an item to favorites
*
* @author Ross Carlson
* @since 12.17.05
* @version 12.17.05
* @param $path The node that we are viewing
**/
global $include_path, $jzUSER;
$node = new jzMediaNode($path);
$display = new jzDisplay();
$be = new jzBackend();
// Let's start the page header
$this->displayPageTop("", word("Adding to Favorites"));
$this->openBlock();
echo word("Adding") . ": " . $node->getName();
// Now let's add it
$this->closeBlock();