Example #1
0
 /**
  * Transition to blocks/*.php
  *
  **/
 function jukeboxBlock()
 {
     include jzBlock("jukebox");
 }
Example #2
0
    function slickJukeboxBlock()
    {
        global $jzUSER, $jukebox_display, $cms_mode;
        // Ok, now let's put in the Jukebox block if they are in jukebox mode
        if (checkPermission($jzUSER, "jukebox_queue") && $jukebox_display != "small" && $jukebox_display != "off" and $cms_mode == "false") {
            ?>
					<table width="100%" cellpadding="1">
						<tr>
							<td valign="top" width="100%">
						 <?php 
            $this->blockHeader("Jukebox");
            // - ". $link);
            $this->blockBodyOpen();
            echo '<div id="jukebox">';
            include jzBlock('jukebox');
            echo '</div>';
            $this->blockBodyClose();
            ?>
						</td>
					</tr>
				</table>
				<?php 
            //$this->blockSpacer();
        }
    }
Example #3
0
    function pageTop($title = false, $endBreak = "true", $ratingItem = "")
    {
        global $this_page, $img_home, $quick_list_truncate, $img_random_play, $cms_mode, $random_play_amounts, $directory_level, $img_up_arrow, $header_drops, $genre_drop, $artist_drop, $album_drop, $quick_drop, $root_dir, $web_root, $song_drop, $audio_types, $video_types, $media_dir, $img_more, $img_random_play_dis, $url_seperator, $help_access, $jukebox, $jukebox_num, $disable_random, $jz_lang_file, $show_slimzora, $img_slim_pop, $allow_resample, $resampleRates, $default_random_type, $default_random_count, $display_previous, $echocloud, $display_recommended, $enable_requests, $enable_ratings, $enable_search, $enable_meta_search, $user_tracking_display, $user_tracking_admin_only, $site_title, $node, $jzUSER, $img_play, $img_playlist, $jinzora_skin, $include_path, $img_play_dis, $img_random_play_dis, $img_download_dis, $img_add_dis, $img_playlist_dis, $allow_filesystem_modify, $disable_leftbar, $allow_interface_choice, $allow_style_choice, $allow_language_choice, $show_now_streaming, $show_who_is_where, $show_user_browsing, $jukebox_height, $backend, $config_version, $allow_resample, $jukebox_display;
        // First let's include the settings for Netjuke
        include_once $include_path . "frontend/frontends/netjuke/settings.php";
        // Let's see if they wanted to pass a title
        if (!$title) {
            $title = $site_title;
        }
        if (!isset($_GET['jz_path'])) {
            $_GET['jz_path'] = "";
        }
        // Let's setup our objects
        $root =& new jzMediaNode();
        $display =& new jzDisplay();
        $blocks = new jzBlocks();
        // First let's see if our session vars are set for the number of items
        if (!isset($_SESSION['jz_num_genres'])) {
            $_SESSION['jz_num_genres'] = $root->getSubNodeCount("nodes", distanceTo("genre"));
        }
        if (!isset($_SESSION['jz_num_artists'])) {
            $_SESSION['jz_num_artists'] = $root->getSubNodeCount("nodes", distanceTo("artist"));
        }
        if (!isset($_SESSION['jz_num_albums'])) {
            $_SESSION['jz_num_albums'] = $root->getSubNodeCount("nodes", distanceTo("album"));
        }
        if (!isset($_SESSION['jz_num_tracks'])) {
            $_SESSION['jz_num_tracks'] = $root->getSubNodeCount("tracks", -1);
        }
        ?>
			<a name="pageTop"></a>
			<table width="100%" cellpadding="5" cellspacing="0" border="0">
				<tr>
					<td>
						<table width="100%" cellpadding="3" cellspacing="0" border="0">
							<tr>
								<td align="center" class="jz_block_td">
									<?php 
        echo '<a href="' . urlize(array()) . '">';
        echo '<strong>BROWSE</strong>';
        echo '</a>';
        ?>
								</td>
								<td align="center" class="jz_block_td">
									<strong>
								    <?php 
        $urla = array();
        $urla['action'] = "powersearch";
        echo "<a href=\"" . urlize($urla) . "\">SEARCH</a>";
        ?>
										</strong>
								</td>
								<td align="center" class="jz_block_td">
									<strong>
									<?php 
        $display->randomPlayButton($node, false, word("RANDOM"));
        ?>
									</strong>
								</td>
								<td align="center" class="jz_block_td">
									<strong><?php 
        $urla['action'] = "popup";
        $urla['ptype'] = "playlistedit";
        echo "<a href=\"" . urlize($urla) . "\" onclick=\"openPopup(this, 550, 600); return false;\">PLAYLISTS</a>";
        ?>
									</strong>
								</td>
								<td align="center" class="jz_block_td">
									<strong><?php 
        $display->popupLink("preferences", "PREFERENCES");
        ?>
									</strong>
								</td>
								<td align="center" class="jz_block_td">
									<strong><?php 
        $display->loginLink("LOGIN", "LOGOUT");
        ?>
</strong>
								</td>
							</tr>
						</table>
						<br>
						<table width="100%" cellpadding="0" cellspacing="0" border="0">
							<tr>

								<?php 
        // Can this user powersearch?
        if ($jzUSER->getSetting('powersearch')) {
            ?>
								<td align="center" valign="top">
									<table width="100%" cellpadding="3" cellspacing="0" border="0">
										<tr>
											<td class="jz_block_td">
												<?php 
            $url_search = array();
            $url_search['action'] = "powersearch";
            echo '<a href="' . urlize($url_search) . '">';
            ?>
												<strong>QUICK SEARCH</strong></a>
											</td>
										</tr>
										<tr>
								<?php 
            $onSubmit = "";
            if ($jukebox == "true" && !defined('NO_AJAX_JUKEBOX')) {
                $onSubmit = 'onSubmit="return searchKeywords(this,\'' . htmlentities($this_page) . '\');"';
            }
            if ($cms_mode == "true") {
                $method = "GET";
            } else {
                $method = "POST";
            }
            ?>
											<td class="jz_nj_block_body" align="center">
												<form action="<?php 
            echo $this_page;
            ?>
" name="searchForm" method="<?php 
            echo $method;
            ?>
" <?php 
            echo $onSubmit;
            ?>
>
												<?php 
            foreach (getURLVars($this_page) as $key => $val) {
                echo '<input type="hidden" name="' . htmlentities($key) . '" value="' . htmlentities($val) . '">';
            }
            ?>
													<input type="text" name="search_query" class="jz_input" style="width:150px; font-size:10px; margin-bottom:3px;">
													<br>
													<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="hidden" name="doSearch" value="true">
													<input type="submit" class="jz_submit" name="doSearch" value="Go">
												</form>
											</td>
										</tr>
									</table>
								</td>
								<?php 
            // This ends the if they can powersearch statement
        }
        ?>
								
								<?php 
        // Are they resampling?
        if ($display->wantResampleDropdown($node)) {
            $display->displayResampleDropdown($node);
            // PROBLEM: Currently can't use small jukebox and resampling.
        }
        if (checkPermission($jzUSER, "jukebox_queue") && ($jukebox_display == "small" or $jukebox_display == "minimal")) {
            ?>
									<td align="center">&nbsp; &nbsp;</td>
									<td align="center" valign="top">
										<table width="100%" cellpadding="3" cellspacing="0" border="0">
											<tr>
												<td class="jz_block_td" width="100%" nowrap>
													<strong>PLAYBACK</strong>
												</td>
											</tr>
											<tr>
												<td class="jz_nj_block_body" align="left" width="1%" nowrap><div id="smallJukebox">
													<?php 
            $blocks->smallJukebox(false, "top");
            ?>
												</div></td>
											</tr>
										</table>
									</td>
									<?php 
        }
        ?>
								
								
								
								<td align="center">&nbsp; &nbsp;</td>
								<td align="center" valign="top">
									<table width="100%" cellpadding="3" cellspacing="0" border="0">
										<tr>
											<td class="jz_block_td" colspan="3" width="100%" nowrap>
												<strong>CONTENT SUMMARY</strong>
											</td>
										</tr>
										<?php 
        // Let's get the stats
        if (!isset($_SESSION['jz_total_tracks'])) {
            $root = new jzMediaNode();
            $stats = $root->getStats();
            $_SESSION['jz_total_tracks'] = $stats['total_tracks'];
            $_SESSION['jz_total_genres'] = $stats['total_genres'];
            $_SESSION['jz_total_artists'] = $stats['total_artists'];
            $_SESSION['jz_total_albums'] = $stats['total_albums'];
            $_SESSION['jz_total_size'] = $stats['total_size_str'];
            $_SESSION['jz_total_length'] = $stats['total_length'];
        }
        ?>
										<tr>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo number_format($_SESSION['jz_total_tracks']);
        ?>
 Tracks
											</td>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo number_format($_SESSION['jz_total_artists']);
        ?>
 Artists
											</td>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo formatTime($_SESSION['jz_total_length']);
        ?>
											</td>
										</tr>
										<tr>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo number_format($_SESSION['jz_total_albums']);
        ?>
 Albums
											</td>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo number_format($_SESSION['jz_total_genres']);
        ?>
 Genres
											</td>
											<td class="jz_nj_block_body" align="center" width="1%" nowrap>
												<?php 
        echo $_SESSION['jz_total_size'];
        ?>
											</td>
										</tr>
									</table>
								</td>
								<td align="center">&nbsp; &nbsp;</td>
								<td align="center" valign="top">
									<table width="100%" cellpadding="3" cellspacing="0" border="0">
										<tr>
											<td class="jz_block_td">
												<strong>ARTISTS A-Z <?php 
        echo "(" . $_SESSION['jz_num_artists'] . ")";
        ?>
</strong> - 
												<?php 
        $urlar = array();
        //$urlar['jz_path'] = $node->getPath("String");
        $urlar['jz_level'] = distanceTo("artist");
        $urlar['jz_letter'] = "*";
        echo "<a href=\"" . urlize($urlar) . "\">" . word("All") . "</a>";
        ?>
											</td>
										</tr>
										<tr>
											<td class="jz_nj_block_body" align="center">
												<?php 
        for ($let = 'A'; $let != 'Z'; $let++) {
            $urlar['jz_letter'] = $let;
            echo "<a href=\"" . urlize($urlar) . "\">" . $let . "</a> ";
            if ($let == 'L' or $let == 'X') {
                echo "<br>";
            }
        }
        $urlar['jz_letter'] = "Z";
        echo "<a href=\"" . urlize($urlar) . "\">Z</a> ";
        for ($let = '1'; $let != '10'; $let++) {
            $urlar['jz_letter'] = $let;
            echo "<a href=\"" . urlize($urlar) . "\">" . $let . "</a> ";
        }
        $urlar['jz_letter'] = "*";
        echo "<a href=\"" . urlize($urlar) . "\">0</a>&nbsp;";
        ?>
											</td>
										</tr>
									</table>
								</td>
								<td align="center">&nbsp; &nbsp;</td>
								<td align="center" valign="top">
									<table width="100%" cellpadding="3" cellspacing="0" border="0">
										<tr>
											<td class="jz_block_td">
												<strong>ALBUMS A-Z <?php 
        echo "(" . $_SESSION['jz_num_albums'] . ")";
        ?>
</strong> - 
												<?php 
        $urlar['jz_level'] = distanceTo("album");
        $urla['jz_letter'] = "*";
        echo "<a href=\"" . urlize($urlar) . "\">" . word("All") . "</a>";
        ?>
											</td>
										</tr>
										<tr>
											<td class="jz_nj_block_body" align="center">
												<?php 
        for ($let = 'A'; $let != 'Z'; $let++) {
            $urlar['jz_letter'] = $let;
            echo "<a href=\"" . urlize($urlar) . "\">" . $let . "</a> ";
            if ($let == 'L' or $let == 'X') {
                echo "<br>";
            }
        }
        $urlar['jz_letter'] = "Z";
        echo "<a href=\"" . urlize($urlar) . "\">Z</a> ";
        for ($let = '1'; $let != '10'; $let++) {
            $urlar['jz_letter'] = $let;
            echo "<a href=\"" . urlize($urlar) . "\">" . $let . "</a> ";
        }
        $urlar['jz_letter'] = "0";
        echo "<a href=\"" . urlize($urlar) . "\">0</a>&nbsp;";
        ?>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
						
						<?php 
        // Are they in Jukebox mode?
        if (checkPermission($jzUSER, "jukebox_queue") && $jukebox_display != "small" && $jukebox_display != "off") {
            ?>
							<br>
							<table width="100%" cellpadding="3" cellspacing="0" border="0">
								<tr>
									<td align="center" class="jz_block_td">
										<div id="jukebox">
							    <?php 
            include jzBlock('jukebox');
            ?>
							                        </div>
									</td>
								</tr>
							</table>
							<?php 
        }
        ?>
					</td>
				</tr>
			</table>
			
			<?php 
    }
Example #4
0
<?php

$display = new jzDisplay();
$display->preheader();
if (checkPlayback() == "jukebox") {
    echo '<div id="jukebox">';
    include jzBlock('jukebox');
    echo '</div>';
}
Example #5
0
 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();
     $smarty = smartySetup();
     // Let's display the header
     $this->pageTop($node);
     include jzBlock('standard-page');
     // Now are there any tracks?
     if (isset($_GET['jz_letter'])) {
         $root = new jzMediaNode();
         $tracks = array();
     } else {
         $tracks = $node->getSubNodes("tracks");
     }
     if (count($tracks) != 0) {
         $blocks->trackTable($tracks);
     }
     include jzBlock('playlist-bar');
     // Now let's close out
     $this->footer($node);
 }
Example #6
0
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">&nbsp;</td>';
        $c++;
    }
    ?>
					  </tr>
					</table>
				</td>
				<td align="center">&nbsp;</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">&nbsp;</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">&nbsp;</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 
}