/** * Displays the block for the album on the Artist page * * @author Ben Dodson, Ross Carlson * @since 9/13/05 * @version 9/13/05 * **/ function artistAlbumsBlock($node = false) { global $jzUSER, $album_name_truncate, $img_play, $img_random_play, $img_play_dis, $img_random_play_dis, $sort_by_year, $web_root, $root_dir, $this_page, $show_album_clip_play, $img_clip; $display = new jzDisplay(); // Are they sorting? if (isset($_GET['sort'])) { $_SESSION['jz_purge_file_cache'] = "true"; $jzUSER->setSetting("sort", $_GET['sort']); } $mysort = $jzUSER->getSetting("sort"); // Does the cache file exist? if ($display->startCache("artistAlbumsBlock", $node, $mysort)) { return; } if (!defined('NO_AJAX_LINKS') && $node === false) { $node = new jzMediaNode($_SESSION['jz_path']); } // Let's create our buttons for later // Now let's create the sort link if ($node->getSubNodeCount() > 1) { $url_array = array(); $url_array['jz_path'] = $node->getPath("String"); $url_array['sort'] = "alpha"; $url_name = urlize($url_array); $url_array['sort'] = "year"; $url_year = urlize($url_array); $form = '<form action="' . $this_page . '" method="GET">' . "\n"; $form .= '<input type="hidden" name="' . jz_encode("jz_path") . '" value="' . jz_encode($node->getPath("String")) . '">'; $form .= $display->hiddenPageVars(true); $form .= '<select style="width:52px; height:15px; font-size:9px;" name="' . jz_encode("sort") . '" class="jz_select" onChange="form.submit();">' . "\n"; $form .= '<option '; if ($mysort == "year") { $form .= " selected "; } $form .= ' value="' . jz_encode("year") . '">Year</option>'; $form .= '<option '; if ($mysort == "alpha") { $form .= " selected "; } $form .= 'value="' . jz_encode("alpha") . '">Name</option>'; $form .= '</select></form>'; $playButtons .= $form . " "; } if ($jzUSER->getSetting('stream')) { $playButtons .= $display->playLink($node, $img_play, false, false, true) . " " . $display->playLink($node, $img_random_play, false, false, true, true) . " "; } else { $playButtons .= $img_play_dis . $img_random_play_dis . " "; } // Let's startup Smarty $smarty = smartySetup(); // Now let's assign our variables to smarty $smarty->assign('title', word("Albums") . ": " . $node->getName() . " (" . $node->getSubNodeCount() . ")"); $smarty->assign('playButtons', $playButtons); $smarty->assign('formaction', urlize()); $smarty->assign('formhandler', $display->embeddedFormHandler()); $smarty->assign('action', jz_encode("action")); $smarty->assign('action_value', jz_encode("mediaAction")); $smarty->assign('jz_path', jz_encode("jz_path")); $smarty->assign('jz_path_value', htmlentities(jz_encode($node->getPath("String")))); $smarty->assign('jz_list_type', jz_encode("jz_list_type")); $smarty->assign('jz_list_type_value', jz_encode("nodes")); // Now let's display the template $smarty->display(SMARTY_ROOT . 'templates/slick/artist-albums-block.tpl'); // Now lets finish out the cache $display->endCache(); }
function systemToolsDropdown($node) { global $this_page; if (!is_object($node)) { $node = new jzMediaNode(); } ?> <form action="<?php echo $this_page; ?> " method="GET" name="toolsform"> <select class="jz_select" name="action" style="width:125px" onChange="openPopup(this.form.action.options[this.selectedIndex].value, 450, 450, false, 'SystemTools')"> <?php // Now let's setup the values $url_array = array(); $url_array['jz_path'] = $node->getPath("String"); $url_array['action'] = "popup"; ?> <option value="">System Tools</option> <option value="<?php $url_array['ptype'] = "mediamanager"; echo urlize($url_array); ?> "><?php echo word("Media Manager"); ?> </option> <option value="<?php $url_array['ptype'] = "usermanager"; echo urlize($url_array); ?> "><?php echo word("User Manager"); ?> </option> <option value="<?php $url_array['ptype'] = "sitesettings"; echo urlize($url_array); ?> "><?php echo word("Settings Manager"); ?> </option> <option value="<?php $url_array['ptype'] = "sitenews"; echo urlize($url_array); ?> "><?php echo word("Manage Site News"); ?> </option> <option value="<?php $url_array['ptype'] = "nodestats"; unset($url_array['jz_path']); echo urlize($url_array); ?> "><?php echo word("Show Full Site Stats"); ?> </option> <option value="<?php $url_array['ptype'] = "dupfinder"; echo urlize($url_array); ?> "><?php echo word("Duplicate Finder"); ?> </option> </select> </form> <?php }
?> 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");
**/ global $include_path, $jzUSER, $allow_filesystem_modify, $enable_podcast_subscribe, $path; $node = new jzMediaNode($path); $display = new jzDisplay(); // Let's start the page header $this->displayPageTop("", word("Admin Tools")); $this->openBlock(); if ($jzUSER->getSetting('admin') != true) { echo "<br><br><br><center>PERMISSION DENIED!!!"; $this->closeBlock(); } // Let's start our tabs $display->displayTabs(array("Media Management", "Meta Data", "System Tools")); // Let's setup our links $url_array = array(); $url_array['jz_path'] = $node->getPath("String"); $url_array['action'] = "popup"; // Now let's build an array of all the values for below if (checkPermission($jzUSER, "upload", $node->getPath("String")) and $allow_filesystem_modify == "true") { $url_array['ptype'] = "uploadmedia"; $valArr[] = '<a href="' . urlize($url_array) . '">' . word("Add Media") . '</a>'; } $url_array['ptype'] = "addlinktrack"; $valArr[] = '<a href="' . urlize($url_array) . '">' . word("Add Link Track") . '</a>'; $url_array['ptype'] = "setptype"; $valArr[] = '<a href="' . urlize($url_array) . '">' . word("Set Page Type") . '</a>'; $url_array['ptype'] = "scanformedia"; $valArr[] = '<a href="' . urlize($url_array) . '">' . word("Rescan Media") . '</a>'; $url_array['ptype'] = "artfromtags"; $valArr[] = '<a href="' . urlize($url_array) . '">' . word("Pull art from Tag Data") . '</a>'; if ($node->getPType() == "artist" or $node->getPType() == "album") {