function standardPage(&$node) { global $jinzora_skin, $root_dir, $row_colors, $image_size, $desc_truncate, $image_dir, $jzSERVICES, $show_frontpage_items, $show_artist_alpha, $sort_by_year; // Let's setup the objects $blocks =& new jzBlocks(); $display =& new jzDisplay(); $fe =& new jzFrontend(); // Let's display the header $this->pageTop($node); // Now let's get the sub nodes to where we are if (isset($_GET['jz_letter'])) { $root = new jzMediaNode(); $nodes = $root->getAlphabetical($_GET['jz_letter'], "nodes", distanceTo("artist")); } else { if ($node->getLevel() == 0 && $show_frontpage_items == "false") { $nodes = array(); } else { $nodes = $node->getSubNodes("nodes"); } } // Now let's sort if ($sort_by_year == "true" and $node->getPType() == "artist") { sortElements($nodes, "year"); } else { sortElements($nodes, "name"); } echo '<form name="albumForm" method="POST" action="' . urlize() . '">'; echo '<input type="hidden" name="' . jz_encode('jz_list_type') . '" value="' . jz_encode('nodes') . '">'; // Now let's loop through the nodes $i = 0; foreach ($nodes as $item) { ?> <table width="100%" cellspacing="0" cellpadding="4"> <tr class="<?php $i = 1 - $i; echo $row_colors[$i]; ?> "> <td width="1%" valign="middle"> <input type="checkbox" name="jz_list[]" value="<?php echo jz_encode($item->getPath("String")); ?> "> </td> <td width="1%" valign="middle"> <?php $display->link($item, '<img src="' . $image_dir . 'folder.gif" border="0">'); ?> </td> <td width="96%" valign="middle"> <?php // Now let's link to this item $name = $item->getName(); if (!isNothing($item->getYear()) and $item->getPType() == "album") { $name .= " (" . $item->getYear() . ")"; } $display->link($item, $name); ?> </td> <td width="1%" valign="middle" nowrap align="right"> <?php // Now let's show the sub items if (($count = $item->getSubNodeCount("nodes")) != 0) { if ($count > 1) { $folder = word("folders"); } else { $folder = word("folder"); } $display->link($item, $count . " " . $folder); } else { if (($count = $item->getSubNodeCount("tracks")) != 0) { if ($count > 1) { $files = word("files"); } else { $files = word("file"); } $display->link($item, $count . " " . $files); } } ?> </td> <td width="1%" valign="middle" nowrap align="right"> <?php // Let's show a play button $display->playButton($item); echo " "; $display->randomPlayButton($item); ?> </td> </tr> <?php // Now do we hvae another row? if (($art = $item->getMainArt($image_size . "x" . $image_size)) != false or ($desc = $item->getDescription()) != "") { // Ok, we had stuff let's do a new row ?> <tr class="<?php echo $row_colors[$i]; ?> "> <td width="1%" valign="middle"> </td> <td width="99%" valign="middle" colspan="4"> <?php if ($art) { $display->link($item, $display->returnImage($art, $node->getName(), $image_size, $image_size, "limit", false, false, "left", "4", "4")); } echo $display->returnShortName($item->getDescription(), $desc_truncate); // Do we need the read more link? if (strlen($item->getDescription()) > $desc_truncate) { $url_array = array(); $url_array['jz_path'] = $item->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>'; } ?> </td> </tr> <?php } ?> </table> <table width="100%" cellspacing="0" cellpadding="0"><tr bgcolor="#D2D2D2"><td width="100%"></td></tr></table> <?php } // Now are there any tracks? if (isset($_GET['jz_letter'])) { $root = new jzMediaNode(); //$tracks = $root->getAlphabetical($_GET['jz_letter'],"tracks",-1); $tracks = array(); } else { $tracks = $node->getSubNodes("tracks"); } if (count($tracks) != 0) { $blocks->trackTable($tracks); } if (sizeof($nodes) > 0 || sizeof($tracks) > 0) { ?> <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="100%"> <a style="cursor:hand" onClick="CheckBoxes('albumForm',true); return false;" href="javascript:;"><img src="<?php echo $image_dir; ?> check.gif" border="0"></a><a style="cursor:hand" onClick="CheckBoxes('albumForm',false); return false;" href="javascript:;"><img src="<?php echo $image_dir; ?> check-none.gif" border="0"></a> <?php $display->addListButton(); ?> <?php $display->hiddenVariableField('action', 'mediaAction'); ?> <?php $display->hiddenVariableField('path', $_GET['jz_path']); ?> <?php $url_array = array(); $url_array['action'] = "popup"; $url_array['ptype'] = "playlistedit"; echo '<a href="javascript:;" onClick="openPopup(' . "'" . urlize($url_array) . "'" . ',600,600); return false;"><img src="' . $image_dir . 'playlist.gif" border="0"></a>'; echo ' '; $display->playlistSelect(115, false, "all"); ?> </form> </td> </tr> </table> <?php } echo '</form>'; // Now let's close out $this->footer($node); }
<?php if (!defined(JZ_SECURE_ACCESS)) { die('Security breach detected.'); } // Now let's get the sub nodes to where we are global $img_folder; if (isset($_GET['jz_letter'])) { $root = new jzMediaNode(); $nodes = $root->getAlphabetical($_GET['jz_letter'], "nodes", distanceTo("artist")); } else { if ($node->getLevel() == 0 && $show_frontpage_items == "false") { $nodes = array(); } else { $nodes = $node->getSubNodes("nodes"); } } // Now let's sort if ($sort_by_year == "true" and $node->getPType() == "artist") { sortElements($nodes, "year"); } else { sortElements($nodes, "name"); } $smarty->assign('form_action', urlize()); $smarty->assign('hidden_field', '<input type="hidden" name="' . jz_encode('jz_list_type') . '" value="' . jz_encode('nodes') . '">'); // Now let's loop through the nodes $i = 0; $c = 0; foreach ($nodes as $item) { $array[$i]['name'] = $item->getName(); $array[$i]['path'] = $item->getPath('string');
function standardPage(&$node) { global $show_artist_alpha, $truncate_length, $sort_by_year; // Let's setup the objects $blocks =& new jzBlocks(); $display =& new jzDisplay(); // Let's display the header $this->pageTop($node); // ARTIST ALPHA: in header or only for root? Put the following in pageTop for the first... if ($node->getLevel() == 0 && $show_artist_alpha == "true") { $blocks->alphabeticalList($node, "artist", 0); } // Now let's get the sub nodes to where we are if (isset($_GET['jz_letter'])) { $root = new jzMediaNode(); $nodes = $root->getAlphabetical($_GET['jz_letter'], "nodes", distanceTo("artist")); } else { $nodes = $node->getSubNodes("nodes"); } if ($sort_by_year == "true") { sortElements($nodes, "year"); } else { sortElements($nodes, "name"); } // Now let's loop through the nodes foreach ($nodes as $item) { // Now let's link to this item $name = $item->getName(); if (strlen($name) > $truncate_length) { $name = substr($name, 0, $truncate_length) . ".."; } if (!isNothing($item->getYear()) and $item->getPType() == "album") { $name .= " (" . $item->getYear() . ")"; } // Let's show a play button echo " ("; $display->playLink($item, "P", word("Play"), false, false, false); echo "-"; $display->playLink($item, "R", word("Play Random"), false, false, true); echo ") "; $display->link($item, $name); echo "<br>"; } // Now are there any tracks? $tracks = $node->getSubNodes("tracks"); if (count($tracks) != 0) { $blocks->trackTable($tracks); } // Now let's close out $this->footer($node); }
function getCurNodeList() { global $sort_by_year, $node; $display =& new jzDisplay(); if (isset($_GET['jz_letter'])) { $root = new jzMediaNode(); $nodes = $root->getAlphabetical($_GET['jz_letter'], "nodes", distanceTo("artist")); } else { if (isset($_SESSION['JZ_CURRENT_MEDIA_LIST'])) { // Removed while coding //return $_SESSION['JZ_CURRENT_MEDIA_LIST']; } $nodes = $node->getSubNodes("nodes"); } if ($sort_by_year == "true") { sortElements($nodes, "year"); } else { sortElements($nodes, "name"); } $itemArray = array(); // Now let's loop through the nodes foreach ($nodes as $item) { $itemArray[] = array("name" => $item->getName(), "path" => $item->getPath(), "link" => $display->link($item, "VIEW", false, false, true), "playlink" => $display->playLink($item, "PLAY", false, false, true)); } $_SESSION['JZ_CURRENT_MEDIA_LIST'] = $itemArray; return $itemArray; }
function drawPage(&$node) { global $cellspacing, $this_page, $img_play, $artist_truncate, $main_table_width, $img_random_play, $directory_level, $web_root, $root_dir, $img_more, $media_dir, $show_sub_numbers, $show_all_checkboxes, $img_more_dis, $img_play_dis, $img_random_play_dis, $url_seperator, $days_for_new, $img_rate, $enable_ratings, $enable_discussion, $img_discuss, $show_sub_numbers, $disable_random, $info_level, $enable_playlist, $track_play_only, $css, $skin, $bg_c, $text_c, $img_discuss_dis, $hierarchy, $random_albums, $frontend, $include_path, $show_frontpage_items, $show_alphabet, $chart_types, $fe, $num_artist_cols, $show_artist_art, $art_size, $artist_art_size; // Let's see if the theme is set or not, and if not set it to the default //if (isset($_SESSION['cur_theme'])){ $_SESSION['cur_theme'] = $skin; } // if you were looking this, sorry for the hack ;) // Override icons and other styles: handleFrontendOverrides(); // Let's setup the display object $blocks =& new jzBlocks(); $display =& new jzDisplay(); $fe =& new jzFrontend(); ?> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <td align="center" valign="top"> <?php // Now let's display the site description /*$news = $blocks->siteNews($node); if ($news <> ""){ ?> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <tr> <td class="jz_block_td" colspan="3"> <strong><?php echo word("Site News"); ?></strong> </td> </tr> <tr> <td class="jz_nj_block_body" width="33%"> <?php echo $news; ?> </td> </tr> </table> <br> <?php }*/ $lvl = isset($_GET['jz_letter']) ? $_GET['jz_level'] + $node->getLevel() - 1 : $node->getLevel(); $show_art = false; switch ($hierarchy[$lvl]) { case "genre": $pg_title = word("ALL GENRES"); break; case "artist": $pg_title = word("ALL ARTISTS"); if ($show_artist_art == "true") { $show_art = true; $my_art_size = $artist_art_size; } break; case "album": $pg_title = word("ALL ALBUMS"); if ($show_album_art == "true") { $show_art = true; $my_art_size = $art_size; } break; default: $pg_title = word("ALL GENRES"); break; } ?> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <tr> <?php if (isset($_GET['jz_charts'])) { $node = new jzMediaNode(); chartHelper("newalbums"); chartHelper("recentplayalbum"); echo '</tr>'; echo '<tr><td colspan="2">'; include jzBlock('randomAlbums'); echo '</td></tr>'; return; } echo '<td class="jz_block_td" colspan="3">'; if (isset($_GET['jz_letter'])) { $genres = $node->getAlphabetical($_GET['jz_letter'], "nodes", $_GET['jz_level']); } else { $genres = $node->getSubNodes("nodes"); } // Now for the title if ($_GET['jz_path'] == "") { echo '<strong>' . $pg_title . "</strong>"; } else { echo '<strong>ARTISTS IN '; $display->link($node, $node->getName()); echo ' (' . $node->getSubNodeCount("nodes") . ")</strong>"; } ?> </td> </tr> <?php $colwidth = floor(100 / $num_artist_cols); $c = 0; foreach ($genres as $genre) { // Now let's start our row if ($c % $num_artist_cols == 0) { if ($c > 0) { echo '</tr>'; } echo '<tr>'; } echo '<td class="jz_nj_block_body" width="' . $colwidth . '%" valign="top">'; $display->playButton($genre); echo " "; $linktext = $display->returnShortName($genre->getName(), 25); if ($show_art) { if ($art = $genre->getMainArt($my_art_size . 'x' . $my_art_size)) { $linktext .= '<br/>'; $linktext .= $display->returnImage($art); } } $display->link($genre, $linktext, word("Browse: ") . $genre->getName()); //echo " (". $genre->getSubNodeCount("both"). ")"; echo '</td>'; $c++; } // Now let's finish out while ($c % $num_artist_cols != 0) { echo '<td class="jz_nj_block_body"> </td>'; $c++; } ?> </tr> </table> </td> <td align="center"> </td> <?php // Now what to show? if ($_GET['jz_path'] != "") { /* ?> <td align="center" valign="top"> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <tr> <td class="jz_block_td" colspan="3"> <strong>ALBUMS IN THIS GENRE [<?php $display->link($node,$node->getName()); ?>] (<?php echo $node->getSubNodeCount("nodes",2); ?>)</strong> </td> </tr> <?php $albums = $node->getSubNodes("nodes",distanceTo("album",$node)); $c=0; foreach($albums as $album){ // Now let's start our row if ($c == 0){echo '<tr>';} echo '<td class="jz_nj_block_body" nowrap width="33%">'; $display->playButton($album); echo " "; $display->randomPlayButton($album); echo " "; $display->link($album, $display->returnShortName($album->getName(),15), word("Browse: "). $album->getName()); echo " (". $album->getSubNodeCount("tracks"). ")"; echo '</td>'; $c++; if ($c==3){$c=0;} } // Now let's finish out if ($c <> 0){ while($c<3){ echo '<td class="jz_nj_block_body"> </td>'; $c++; } } ?> </table> </td> <?php */ } else { /* ?> <td align="center" valign="top"> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <tr> <td class="jz_block_td"> <strong>LATEST ARTISTS</strong> </td> </tr> <tr> <td class="jz_nj_block_body"> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <?php // Now how many should we show? $show = round(((count($genres) / 3)) * 1.5); $blocks->showCharts($node,"newartists",$show,false,false); ?> </table> </td> </tr> </table> </td> <td align="center"> </td> <td align="center" valign="top"> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <tr> <td class="jz_block_td"> <strong>LATEST ALBUMS</strong> </td> </tr> <tr> <td class="jz_nj_block_body"> <table width="100%" cellpadding="3" cellspacing="0" border="0"> <?php $show = round(((count($genres) / 3)) * 1.5); $blocks->showCharts($node,"newalbums",$show,false,false); ?> </table> </td> </tr> </table> </td> <?php */ } ?> </tr> </table> <br> <?php }