function pageTop($node) { global $img_home, $jinzora_skin, $root_dir, $css, $this_page, $cms_mode, $jzUSER, $include_path, $desc_truncate, $image_size, $jinzora_url, $image_dir, $jukebox, $jzSERVICES, $jukebox_display, $cms_mode, $show_artist_alpha, $show_artist_list, $allow_resample; // Let's setup our objects $display = new jzDisplay(); $blocks = new jzBlocks(); $smarty = smartySetup(); // Now let's make sure our Node is set and if not set one if (!is_object($node)) { $node = new jzMediaNode(); } // Let's include the settings file include_once $include_path . 'frontend/frontends/mediacenter/settings.php'; // Let's set some variables $smarty->assign('root_dir', $root_dir); // Ok, now let's include the first template $smarty->display(SMARTY_ROOT . 'templates/mediacenter/header.tpl'); exit; $display->preHeader(); $smarty->assign('this_page', $this_page); $smarty->assign('img_home', $img_home); $smarty->assign('cms_mode', $cms_mode); $smarty->assign('image_dir', $image_dir); $smarty->assign('jinzora_url', $jinzora_url); $smarty->display(SMARTY_ROOT . 'templates/mediacenter/header.tpl'); // Now let's see if we should show the jukebox iframe $smarty->assign('jukebox_queue', false); if (checkPermission($jzUSER, "jukebox_queue")) { $smarty->assign('jukebox_queue', true); if ($jukebox_display == "small" or $jukebox_display == "minimal") { $smarty->assign('jukebox_display', "small"); } else { $smarty->assign('jukebox_display', "full"); } } $smarty->display(SMARTY_ROOT . 'templates/mediacenter/jukebox.tpl'); // Let's show the news $siteNews = $blocks->siteNews($node); $smarty->assign('site_news', $siteNews); if ($siteNews != "") { $smarty->display(SMARTY_ROOT . 'templates/mediacenter/site-news.tpl'); } // Now do we have art or image or desc at the album level if ($node->getPType() == "album") { if (($art = $node->getMainArt($image_size . "x" . $image_size)) != false or ($desc = $node->getDescription()) != "") { $desc = $node->getDescription(); // Ok, let's display echo '<table width="100%" cellspacing="0" cellpadding="5">'; echo '<tr class="and_head1">'; echo '<td width="100%" align="left">'; // Let's display the name $artist = $node->getAncestor('artist'); echo "<strong>"; if ($artist !== false) { $display->link($artist, $artist->getName()); echo " - "; } echo $node->getName(); if (!isNothing($node->getYear())) { echo " (" . $node->getYear() . ")"; } echo '</strong><br>'; if ($art) { if ($desc) { $align = "left"; } else { $align = "center"; } $display->image($art, $node->getName(), $image_size, $image_size, "limit", false, false, $align, "4", "4"); } if ($cms_mode == "false") { echo '<div class="jz_artistDesc">'; } echo $display->returnShortName($desc, $desc_truncate); // Do we need the read more link? 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 ($cms_mode == "false") { echo '</div>'; } echo '</td></tr></table>'; } } // Can this user powersearch? $on = true; if ($jzUSER->getSetting('powersearch') and $on == true) { if ($cms_mode == "true") { $method = "GET"; } else { $method = "POST"; } ?> <table width="100%" cellspacing="0" cellpadding="0"><tr height="2" style="background-image: url('<?php echo $image_dir; ?> row-spacer.gif');"><td width="100%"></td></tr></table> <?php } ?> <?php if (isset($_POST['jz_path'])) { $jzPath = $_POST['jz_path']; } else { $jzPath = $_GET['jz_path']; } // Now should we show this bar? $bcArray = explode("/", $jzPath); ?> <table width="100%" cellspacing="0" cellpadding="5"> <tr class="and_head1"> <td width="50%" valign="middle"> <?php $url = array(); echo '<a href="' . urlize($url) . '"><img src="' . $image_dir . 'open-folder.gif" border="0"></a>'; // Now let's see if we need the breadcrumbs unset($bcArray[count($bcArray) - 1]); $path = ""; echo ' <a href="' . urlize($url) . '">' . word("Home") . '</a>'; foreach ($bcArray as $item) { if ($item != "") { $path .= "/" . $item; $arr['jz_path'] = $path; echo ' / <a href="' . urlize($arr) . '">' . $item . '</a>'; } unset($arr); } ?> </td> <td width="50%" valign="middle" align="right" nowrap="nowrap"> <?php if ($show_artist_list == "true") { ?> <?php echo word("Artist") . ": "; ?> <form action="<?php echo $this_page; ?> " method="post"> <?php $display->hiddenPageVars(); $display->dropdown("artist"); ?> </form> | <?php } ?> <?php echo word('Search:'); ?> <form action="<?php echo $this_page; ?> " method="<?php echo $method; ?> "> <?php foreach (getURLVars($this_page) as $key => $val) { echo '<input type="hidden" name="' . htmlentities($key) . '" value="' . htmlentities($val) . '">'; } ?> <select class="jz_select" name="search_type" style="width:85px"> <option value="ALL"><?php echo word("All Media"); ?> </option> <?php if (distanceTo("artist") !== false) { echo '<option value="artists">' . word("Artists") . '</option>' . "\n"; } if (distanceTo("album") !== false) { echo '<option value="albums">' . word("Albums") . '</option>' . "\n"; } ?> <option value="tracks"><?php echo word("Tracks"); ?> </option> <option value="lyrics"><?php echo word("Lyrics"); ?> </option> </select> <input type="text" name="search_query" class="jz_input" style="width:125px; font-size:10px "> <input type="hidden" name="doSearch" value="true"> <input type="submit" class="jz_submit" value="Go"> </form> </td> </tr> </table> <?php // Now let's see if we need the breadcrumbs if ($_GET['jz_path'] != "") { ?> <table width="100%" cellspacing="0" cellpadding="0"><tr height="2" style="background-image: url('<?php echo $image_dir; ?> row-spacer.gif');"><td width="100%"></td></tr></table> <table width="100%" cellspacing="0" cellpadding="3"> <tr class="and_head1"> <td width="1%" valign="middle" nowrap> <?php if ($cms_mode == "true") { $mode = "POST"; } else { $mode = "GET"; } $mode = "GET"; if (isset($_POST['jz_path'])) { $bcArray = explode("/", $_POST['jz_path']); } else { $bcArray = explode("/", $_GET['jz_path']); } // Now we need to cut the last item off the list $bcArray = array_slice($bcArray, 0, count($bcArray) - 1); // Now let's display the dropdown for where we are echo '<form action="' . $this_page . '" method="' . $mode . '">' . "\n"; echo '<select style="width:175px" class="jz_select" name="' . jz_encode('jz_path') . '" onChange="form.submit();">' . "\n"; $parent = $node->getParent(); $nodes = $parent->getSubNodes("nodes"); sortElements($nodes); foreach ($nodes as $child) { $path = $child->getPath("String"); echo '<option '; // Is this the current one? if ($child->getName() == $node->getName()) { echo ' selected '; } echo 'value="' . jz_encode($path) . '">' . $display->returnShortName($child->getName(), 20) . '</option>' . "\n"; } echo '</select>' . "\n"; //$display->hiddenVariableField("jz_path"); $display->hiddenPageVars(); echo '<input type="hidden" name="frontend" value="' . $_GET['frontend'] . '">' . "\n"; echo "</form>"; ?> </td> <td valign="middle" nowrap> <?php $display->playButton($node); echo " "; $display->randomPlayButton($node); $url_array = array(); $url_array['jz_path'] = $node->getPath("String"); $url_array['action'] = "popup"; $url_array['ptype'] = "iteminfo"; echo ' <a onclick="openPopup(this, 450, 450); return false;" href="' . urlize($url_array) . '"><img src="' . $image_dir . 'more.gif" border="0"></a>'; ?> </td> <?php if ($display->wantResampleDropdown($node)) { ?> <td align="right"> <?php $display->displayResampleDropdown($node, word("Resample") . ": "); ?> </td> <?php } ?> </tr> </table> <table width="100%" cellspacing="0" cellpadding="0"><tr height="2" style="background-image: url('<?php echo $image_dir; ?> row-spacer.gif');"><td width="100%"></td></tr></table> <?php } else { if ($display->wantResampleDropdown($node)) { ?> <table width="100%" cellspacing="0" cellpadding="0"><tr> <td align="right"> <?php $display->displayResampleDropdown($node, word("Resample") . ": "); ?> </td> </tr></table> <?php } } // ARTIST ALPHA: in header or only for root? Put the following in pageTop for the first... if ($show_artist_alpha == "true") { $blocks->alphabeticalList($node, "artist", 0); } }
<?php if (!defined(JZ_SECURE_ACCESS)) { die('Security breach detected.'); } /** * Displays the read more information on an artist from a popup * * @author Ross Carlson * @version 01/19/05 * @since 01/19/05 * @param $node The node that we are viewing */ global $cms_mode, $node; // Let's setup our objects $display = new jzDisplay(); // First let's display the top of the page and open the main block $this->displayPageTop("", word("Profile") . ": " . $node->getName()); $this->openBlock(); // Now let's display the artist image and short description if (($art = $node->getMainArt("200x200")) != false) { $display->image($art, $node->getName(), 200, 200, "limit", false, false, "left", "5", "5"); } if ($cms_mode == "false") { echo '<span class="jz_artistDesc">'; } echo fixAMGUrls($node->getDescription()); if ($cms_mode == "false") { echo '</span>'; } $this->closeBlock();
<tr class="<?php echo $row_colors[$i]; $i = 1 - $i; ?> "> <td width="30%" valign="top"> <nobr> <?php echo $third_desc; ?> </nobr> </td> <td width="70%" valign="top"> <?php if (($art = $node->getMainArt()) != false) { $display->image($art, $node->getName(), 150, 150, "limit", false, false, false, "", ""); echo "<br>"; } ?> New Image:<br><input type="file" class="jz_input" name="edit_thumbnail" size="30"><br> <input type="checkbox" name="edit_image_to_id3"> <?php echo word("Apply image to ID3 tags"); ?> <input type="checkbox" name="edit_delete_thumb"> <?php echo word("Delete image"); ?> </td> </tr> <tr class="<?php echo $row_colors[$i]; $i = 1 - $i;
/** * * Echos out the XML header information * * @author Ross Carlson * @since 3/31/05 * **/ function getCurrentTrack() { global $jzUSER, $this_site, $root_dir; // What kind of output? if (isset($_REQUEST['type'])) { $type = $_REQUEST['type']; } else { $type = "xml"; } // Now let's set the width if (isset($_REQUEST['imagesize'])) { $imagesize = $_REQUEST['imagesize'] . "x" . $_REQUEST['imagesize']; } else { $imagesize = "150x150"; } // Now let's see when to stop if (isset($_REQUEST['count'])) { $total = $_REQUEST['count']; } else { $total = 1; } // Let's start the page if ($type == "xml") { echoXMLHeader(); } // Now let's get the data $be = new jzBackend(); $ar = $be->getPlaying(); $display = new jzDisplay(); $fullList = ""; $found = false; foreach ($ar as $user => $tracks) { $name = $jzUSER->getSetting("full_name"); if ($name == "") { $name = $jzUSER->lookupName($user); // that's the user name } $i = 0; foreach ($tracks as $time => $song) { // Now let's make sure this is the right user if ($name == $jzUSER->getName()) { // Now let's make sure we don't list this twice if (stristr($fullList, $song['path'] . "-" . $name . "\n")) { continue; } $fullList .= $song['path'] . "-" . $name . "\n"; // Now let's create the objects we need $node = new jzMediaNode($song['path']); $track = new jzMediaTrack($song['path']); $album = $node->getParent(); $artist = $album->getParent(); $meta = $track->getMeta(); // Now, now let's echo out the data switch ($type) { case "xml": echo " <item>\n"; echo " <title>" . $this_site . xmlUrlClean($meta['title']) . "</title>\n"; echo " <album>\n"; echo " <name>" . $this_site . xmlUrlClean($album->getName()) . "</name>\n"; echo " <image>" . $this_site . xmlUrlClean($display->returnImage($album->getMainArt(false, true, "audio", true), $album->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true)) . "</image>\n"; echo " </album>\n"; echo " <artist>\n"; echo " <name>" . $this_site . xmlUrlClean($artist->getName()) . "</name>\n"; echo " <image>" . $this_site . xmlUrlClean($display->returnImage($artist->getMainArt(false, true, "audio", true), $artist->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true)) . "</image>\n"; echo " </artist>\n"; echo " </item>\n"; break; case "html": if (isset($_REQUEST['align'])) { if ($_REQUEST['align'] == "center") { echo "<center>"; } } echo $meta['title'] . "<br>"; echo $album->getName() . "<br>"; echo $this_site . $display->returnImage($album->getMainArt(false, true, "audio", true), $album->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true) . "<br>"; echo $artist->getName() . "<br>"; echo $display->returnImage($artist->getMainArt(false, true, "audio", true), $artist->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true) . "<br>"; break; case "mt": $art = $album->getMainArt($imagesize, true, "audio", true); if ($art) { // Now let's try to get the link from the amazon meta data service if ($_REQUEST['amazon_id'] != "") { $jzService = new jzServices(); $jzService->loadService("metadata", "amazon"); $id = $jzService->getAlbumMetadata($album, false, "id"); echo '<a target="_blank" href="http://www.amazon.com/exec/obidos/tg/detail/-/' . $id . '/' . $_REQUEST['amazon_id'] . '/">'; } $display->image($art, $album->getName(), 150, false, "limit"); if ($_REQUEST['amazon_id'] != "") { echo '</a>'; } echo "<br>"; } echo $meta['title'] . "<br>"; if ($_REQUEST['amazon_id'] != "") { $jzService = new jzServices(); $jzService->loadService("metadata", "amazon"); $id = $jzService->getAlbumMetadata($album, false, "id"); echo '<a target="_blank" href="http://www.amazon.com/exec/obidos/tg/detail/-/' . $id . '/' . $_REQUEST['amazon_id'] . '/">' . $album->getName() . "</a><br>"; } else { echo $album->getName() . "<br>"; } echo $artist->getName() . "<br>"; break; } $found = true; // Now should we stop? $i++; if ($i >= $total) { break; } } } } if (!$found) { // Ok, we didn't find anything so let's get the last thing they played... $be = new jzBackend(); $history = explode("\n", $be->loadData("playhistory-" . $jzUSER->getID())); $track = new jzMediatrack($history[count($history) - 1]); $album = $track->getParent(); $artist = $album->getParent(); $meta = $track->getMeta(); // Now, now let's echo out the data switch ($type) { case "xml": echo " <item>\n"; echo " <title>" . $this_site . xmlUrlClean($meta['title']) . "</title>\n"; echo " <album>\n"; echo " <name>" . $this_site . xmlUrlClean($album->getName()) . "</name>\n"; echo " <image>" . $this_site . xmlUrlClean($display->returnImage($album->getMainArt(false, true, "audio", true), $album->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true)) . "</image>\n"; echo " </album>\n"; echo " <artist>\n"; echo " <name>" . $this_site . xmlUrlClean($artist->getName()) . "</name>\n"; echo " <image>" . $this_site . xmlUrlClean($display->returnImage($artist->getMainArt(false, true, "audio", true), $artist->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true)) . "</image>\n"; echo " </artist>\n"; echo " </item>\n"; break; case "html": if (isset($_REQUEST['align'])) { if ($_REQUEST['align'] == "center") { echo "<center>"; } } echo $meta['title'] . "<br>"; echo $album->getName() . "<br>"; echo $this_site . $display->returnImage($album->getMainArt(false, true, "audio", true), $album->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true) . "<br>"; echo $artist->getName() . "<br>"; echo $display->returnImage($artist->getMainArt(false, true, "audio", true), $artist->getName(), false, false, "limit", false, false, false, false, false, "0", false, true, true) . "<br>"; break; case "mt": if (isset($_REQUEST['align'])) { if ($_REQUEST['align'] == "center") { echo "<center>"; } } $art = $album->getMainArt($imagesize, true, "audio", true); if ($art) { // Now let's try to get the link from the amazon meta data service if ($_REQUEST['amazon_id'] != "") { $jzService = new jzServices(); $jzService->loadService("metadata", "amazon"); $id = $jzService->getAlbumMetadata($album, false, "id"); echo '<a target="_blank" href="http://www.amazon.com/exec/obidos/tg/detail/-/' . $id . '/' . $_REQUEST['amazon_id'] . '/">'; } $display->image($art, $album->getName(), 150, false, "limit"); if ($_REQUEST['amazon_id'] != "") { echo '</a>'; } echo "<br>"; } echo $meta['title'] . "<br>"; if ($_REQUEST['amazon_id'] != "") { $jzService = new jzServices(); $jzService->loadService("metadata", "amazon"); $id = $jzService->getAlbumMetadata($album, false, "id"); echo '<a target="_blank" href="http://www.amazon.com/exec/obidos/tg/detail/-/' . $id . '/' . $_REQUEST['amazon_id'] . '/">' . $album->getName() . "</a><br>"; } else { echo $album->getName() . "<br>"; } echo $artist->getName() . "<br>"; break; } } // Now let's close out switch ($type) { case "xml": echoXMLFooter(); break; case "html": echo '<a target="_blank" title="Jinzora :: Free Your Media!" href="http://www.jinzora.com"><img src="http://www.jinzora.com/downloads/button-stream.gif" border="0"></a>'; break; case "mt": echo '<a target="_blank" title="Jinzora :: Free Your Media!" href="http://www.jinzora.com"><img src="http://www.jinzora.com/downloads/button-stream.gif" border="0"></a>'; break; } if (isset($_REQUEST['align'])) { if ($_REQUEST['align'] == "center") { echo "</center>"; } } }