Beispiel #1
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, $skin, $bg_c, $text_c, $img_discuss_dis, $hierarchy, $random_albums, $frontend, $include_path, $cols_in_genre, $show_frontpage_items, $show_alphabet, $chart_types;
    // Let's setup the display object
    $smarty = smartySetup();
    $blocks = new jzBlocks();
    // Let's get the site news
    $site_news = $blocks->siteNews($node);
    $smarty->assign('smarty_include', getcwd());
    $smarty->assign('site_news', $site_news);
    $smarty->assign('word_site_news', word("Site News"));
    // Now let's show the feature artist/album
    if ($node->getName() != "") {
        $smarty->assign('editor_pick_title', word("Editors Pick") . ": " . $node->getName());
        $smarty->assign('jz_bg_color', jz_bg_color);
    }
    // Now let's see if we need the featured block or not
    $smarty->assign('show_featured', false);
    if ($node->getLevel() == 0) {
        if ($blocks->showFeaturedBlock($node, true)) {
            $smarty->assign('show_featured', true);
            //$smarty->assign('featured_data', $blocks->showFeaturedBlock($node));
        }
    }
    // Now let's display the templates
    $smarty->display(SMARTY_ROOT . 'templates/slick/genre.tpl');
}
Beispiel #2
0
 function pageTop($title = false, $endBreak = "true", $ratingItem = "")
 {
     global $site_title, $node, $jzUSER, $include_path, $disable_leftbar;
     $smarty = smartySetup();
     $blocks = new jzBlocks();
     // First let's include the settings for Slick
     include_once $include_path . "frontend/frontends/slick/settings.php";
     $smarty->display(SMARTY_ROOT . 'templates/slick/header.tpl');
     $blocks->slickHeaderBlock($node);
     $blocks->slickJukeboxBlock();
 }
Beispiel #3
0
 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, $img_login, $img_prefs, $help_access;
     // Let's setup our objects
     $display = new jzDisplay();
     $blocks = new jzBlocks();
     $smarty = smartySetup();
     include jzBlock('page-header');
     if ($jukebox == "true") {
         include jzBlock('jukebox');
     }
     include jzBlock('site-news');
     include jzBlock('album-info-block');
     include jzBlock('browse-bar');
     include jzBlock('breadcrumbs');
     if ($show_artist_alpha == "true") {
         $blocks->alphabeticalList($node, "artist", 0);
     }
 }
Beispiel #4
0
function drawPage($node)
{
    global $random_albums, $include_path;
    $display = new jzDisplay();
    $blocks = new jzBlocks();
    $nodes = $node->getSubNodes('nodes');
    $tracks = $node->getSubNodes('tracks');
    // Now let's display the site description
    $news = $blocks->siteNews($node);
    if ($news != "") {
        echo "<br><center>" . $news . "<center>";
    }
    $cols = 4;
    $curCol = 1;
    $per_col = round(sizeof($nodes) / $cols);
    $i = 0;
    $percent = round(100 / $cols);
    echo "<table cellpadding=\"4\" width=\"100%\"><tr class=\"jz_col_table_tr\"><td class=\"jz_col_table\" valign=\"top\" width=\"{$percent}%\"><table width=\"100%\"><tr><td>";
    foreach ($nodes as $el) {
        if ($i == $per_col && $curCol != $cols) {
            $curCol++;
            echo "</td></tr></table></td><td class=\"jz_col_table\" valign=\"top\" width=\"{$percent}%\"><table width=\"100%\"><tr><td>";
            $i = 0;
        }
        $display->link($el);
        echo "</td></tr><tr><td>";
        $i++;
    }
    echo "</td></tr></table></td></tr></table>";
    echo "<br>";
    echo "<br>";
    if (sizeof($tracks) > 0) {
        $blocks->trackTable($tracks, false, true);
    }
    if ($random_albums != "0") {
        include_once $include_path . "frontend/blocks/random-albums.php";
        echo "<br>";
        $blocks->randomAlbums(&$node, $node->getName());
        echo "<br>";
    }
}
Beispiel #5
0
function drawPage($node)
{
    global $random_albums, $include_path;
    $display = new jzDisplay();
    $blocks = new jzBlocks();
    echo '<br>';
    $blocks->blockBodyOpen();
    if (isset($_GET['letter'])) {
        $nodes = $node->getAlphabetical($_GET['letter'], 'nodes', 2);
    } else {
        $nodes = $node->getSubNodes('nodes');
    }
    $tracks = $node->getSubNodes('tracks');
    // Now let's display the site description
    $news = $blocks->siteNews($node);
    if ($news != "") {
        echo "<br><center>" . $news . "<center>";
    }
    $cols = 4;
    $curCol = 1;
    $per_col = round(sizeof($nodes) / $cols);
    $i = 0;
    $percent = round(100 / $cols);
    echo "<table cellpadding=\"4\" width=\"100%\"><tr class=\"jz_col_table_tr\"><td class=\"jz_col_table\" valign=\"top\" width=\"{$percent}%\"><table>";
    foreach ($nodes as $el) {
        if ($i == $per_col && $curCol != $cols) {
            $curCol++;
            echo "</table></td><td class=\"jz_col_table\" valign=\"top\" width=\"{$percent}%\"><table width=\"100%\">";
            $i = 0;
        }
        echo "<tr><td>";
        $display->link($el);
        echo "</td></tr>";
        $i++;
    }
    echo "</table></td></tr></table>";
    if (!isset($_GET['letter'])) {
        $url = array();
        $url['letter'] = '#';
        echo "| <a href=\"" . urlize($url) . "\">#</a>";
        for ($let = 'A'; $let != 'Z'; $let++) {
            $url['letter'] = $let;
            echo " | <a href=\"" . urlize($url) . "\">" . $let . "</a>";
        }
        $url['letter'] = "*";
        echo " | <a href=\"" . urlize($url) . "\">ALL</a> |";
        echo "<br>";
        if (sizeof($tracks) > 0) {
            $blocks->trackTable($tracks, false, true);
        }
        if ($random_albums != "0") {
            echo "<br>";
            $blocks->randomAlbums($node, $node->getName());
        }
    }
    $blocks->blockBodyClose();
    echo "<br>";
}
Beispiel #6
0
    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>
								&nbsp; | &nbsp;
							<?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 "&nbsp;";
            $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);
        }
    }
Beispiel #7
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 
    }
Beispiel #8
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
global $jukebox;
// Let's setup our objects
$display = new jzDisplay();
$blocks = new jzBlocks();
$smarty = smartySetup();
if (!is_object($node)) {
    $node = new jzMediaNode();
}
// Let's include the settings file
include_once $include_path . 'frontend/frontends/andro/settings.php';
// TO DO - SMARTY!!!
$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->assign('word_search', word('Search:'));
$smarty->assign('word_all_media', word('All Media'));
if ($cms_mode == "true") {
    $smarty->assign('method', "GET");
} else {
    $smarty->assign('method', "POST");
}
if ($jukebox == "true" && !defined('NO_AJAX_JUKEBOX')) {
    $smarty->assign('searchOnSubmit', 'onSubmit="return searchKeywords(this,\'' . htmlentities($this_page) . '\');"');
Beispiel #9
0
function drawPage(&$node)
{
    global $this_page, $jzUSER;
    $parent = $node->getNaturalParent();
    doNaturalDepth($parent);
    $grandparent = $parent->getNaturalParent();
    doNaturalDepth($grandparent);
    $greatgrandparent = $grandparent->getNaturalParent();
    doNaturalDepth($greatgrandparent);
    $display =& new jzDisplay();
    $blocks = new jzBlocks();
    $root =& new jzMediaNode();
    doNaturalDepth($root);
    // let's display the site description
    $news = $blocks->siteNews($node);
    if ($news != "") {
        echo "<br><center>" . $news . "<center><br>";
    }
    $MAX_TRACKS = 100;
    // if we have POST variable songs[], we need to perform some action on the songs.
    // probably handle this in the header.php file (or even index.php?)
    // TODO:
    // 1) if no art found, display some stats or something.
    // 2) add counts in parenethesis next to nodes.
    // 3) lock page width
    if (isset($_POST['clear'])) {
        unset($_POST['query']);
    }
    if ($node->getLevel() == 0) {
        $left = $node->getSubNodes();
        $right = array();
        $backstring = false;
    } else {
        if ($node->getSubNodes() == array()) {
            // weird but possible case: $node == $parent. Happens in a 2-tier layout.
            if ($parent->getLevel() == $grandparent->getLevel()) {
                $leftpath = $node->getPath();
                $rightpath = array();
                $left = $parent->getSubNodes();
                $right = array();
                $backstring = false;
            } else {
                $leftpath = $parent->getPath();
                // preselect parent on the left
                $rightpath = $node->getPath();
                // preselect me on the right
                if ($grandparent->getLevel() == $greatgrandparent->getLevel()) {
                    $backstring = false;
                } else {
                    $backstring = $grandparent->getPath("String");
                }
                $left = $grandparent->getSubNodes();
                $right = $parent->getSubNodes();
            }
        } else {
            $leftpath = $node->getPath();
            // preselect me on the left
            $rightpath = array();
            // don't select on the right
            if ($grandparent->getLevel() == $parent->getLevel()) {
                $backstring = false;
            } else {
                $backstring = $parent->getPath("String");
            }
            if (isset($_POST['doquery']) && $_POST['query'] != "") {
                $right = $node->search($_POST['query'], "nodes", false, $MAX_TRACKS);
            } else {
                $right = $node->getSubNodes();
            }
            $left = $parent->getSubNodes();
        }
    }
    if (isset($_POST['doquery']) && $_POST['query'] != "") {
        if ($_POST['how'] == "filter") {
            $songs = $node->search($_POST['query'], "tracks", -1, $MAX_TRACKS);
        } else {
            $songs = $root->search($_POST['query'], "tracks", -1, $MAX_TRACKS);
        }
    } else {
        if ($node->getSubNodeCount("leaves", -1) > $MAX_TRACKS) {
            if ($node->getLevel() == 0) {
                $songs = array();
            } else {
                $songs = $node->getSubNodes("leaves", -1, true, $MAX_TRACKS);
            }
        } else {
            $songs = $node->getSubNodes("leaves", -1, false);
        }
    }
    echo '<br>';
    $blocks->blockBodyOpen();
    ?>

<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="32%">
<form id="leftForm" method="GET" action="<?php 
    echo $this_page;
    ?>
">
<?php 
    keepVars($_POST);
    $display->hiddenPageVars();
    if (!defined('NO_AJAX_LINKS')) {
        $display->hiddenVariableField('maindiv', 'true');
    }
    ?>
<div id="left_box">
<select name="<?php 
    echo jz_encode("jz_path");
    ?>
" size="14" class="full jz_select" style="height:210px;" onChange="submitForm(this.form,'<?php 
    echo htmlentities($this_page);
    ?>
')">
<?php 
    if ($backstring !== false) {
        echo "<option value=\"" . htmlentities(jz_encode($backstring)) . "\">" . word('[ Back ]') . "</option";
    }
    foreach ($left as $el) {
        echo "<option value=\"" . htmlentities(jz_encode($el->getPath("String"))) . "\"";
        if ($el->getPath() == $leftpath) {
            echo " selected";
        }
        echo ">" . htmlentities($display->returnShortName($el->getName(), 35)) . "</option>";
    }
    ?>
</select>
</div>
</form>
</td><td width="32%">
<form method="GET" action="<?php 
    echo $this_page;
    ?>
">
<?php 
    keepVars($_POST);
    $display->hiddenPageVars();
    if (!defined('NO_AJAX_LINKS')) {
        $display->hiddenVariableField('maindiv', 'true');
    }
    ?>
<div id="right_box">
<select name="<?php 
    echo jz_encode("jz_path");
    ?>
" size="14" class="full jz_select" style="height:210px;" onChange="submitForm(this.form,'<?php 
    echo htmlentities($this_page);
    ?>
')">
<?php 
    foreach ($right as $el) {
        echo "<option value=\"" . htmlentities(jz_encode($el->getPath("String"))) . "\"";
        if ($el->getPath() == $rightpath) {
            echo " selected";
        }
        echo ">" . htmlentities($display->returnShortName($el->getName(), 35)) . "</option>";
    }
    ?>
</select>
</div>
</form>
</td>
<td width="20%" valign="top">
<?php 
    if (($art = $node->getMainArt("200x200")) !== false) {
        $display->image($art, $node->getName(), 200, 200, "limit");
        // todo: if the description exists, make the image a link to the description.
    } else {
        //$blocks->showCharts($node,'newalbums');
    }
    ?>
</td>
</tr>
<tr><td nowrap colspan="2">
<form method="POST" action="<?php 
    echo $this_page;
    ?>
">
<input type="hidden" name="<?php 
    echo jz_encode("jz_path");
    ?>
" value="<?php 
    echo jz_encode($node->getPath("String"));
    ?>
">
    <?php 
    if (isset($_POST['frontend']) || isset($_GET['frontend'])) {
        echo "<input type=\"hidden\" name=\"" . jz_encode("frontend") . "\" value=\"" . jz_encode("medialibrary") . "\">";
    }
    ?>
<select name="<?php 
    echo jz_encode("how");
    ?>
" class="jz_select">
<option value="<?php 
    echo jz_encode("filter");
    ?>
"
<?php 
    if ($_POST['how'] == "filter") {
        echo "selected";
    }
    ?>
>Filter: </option>
<option value="<?php 
    echo jz_encode("search");
    ?>
"
<?php 
    if ($_POST['how'] == "search") {
        echo "selected";
    }
    ?>
>Search: </option>
</select>
<input name="query" style="width:65%" class="jz_input" 
<?php 
    if (isset($_POST['query'])) {
        echo "value=\"" . htmlentities($_POST['query']) . "\"";
    }
    ?>
>
<input type="submit" name="<?php 
    echo jz_encode("doquery");
    ?>
" value="Go" class="jz_submit">&nbsp;<input type="submit" name="<?php 
    echo jz_encode("clear");
    ?>
" value="Clear" class="jz_submit">
</form>
</td>
<td>
<p>
<?php 
    $pl = $jzUSER->loadPlaylist();
    if (checkPermission($jzUSER, 'play', $node->getPath('string')) === true) {
        $display->playButton($pl);
        $display->randomPlayButton($pl);
    }
    if ($jzUSER->getSetting('download') === true) {
        $display->downloadButton($pl);
    }
    echo "&nbsp;";
    echo $pl->getName() . ":";
    ?>
</p>
</td>
</tr>
<tr><td colspan="2" valign="top">

<table width="100%">
<form name="tracklist" method="POST" action="<?php 
    echo $this_page;
    ?>
">
<tr><td colspan="2">
<?
	if (isset($_POST['query']) && $_POST['query'] != "") {
		echo "<input type=\"hidden\" name=\"query\" value=\"" . htmlentities($_POST['query']) . "\">";
		if ($_POST['how'] == "filter") {
			echo "<input type=\"hidden\" name=\"" . jz_encode("how") . "\" value=\"" . jz_encode("filter") . "\">";
		}
		else {
			echo "<input type=\"hidden\" name=\"" . jz_encode("how") . "\" value=\"" . jz_encode("search") . "\">";
		}
	}
?>
<input type="hidden" name="<?php 
    echo jz_encode("action");
    ?>
" value="<?php 
    echo jz_encode("mediaAction");
    ?>
">
<input type="hidden" name="<?php 
    echo jz_encode("type");
    ?>
" value="<?php 
    echo jz_encode("tracks");
    ?>
">
<div id="track_box">
<input type="hidden" name="<?php 
    echo jz_encode("jz_path");
    ?>
" value="<?php 
    echo htmlentities(jz_encode($node->getPath("String")));
    ?>
">
<select name="jz_list[]" size="18" class="full jz_select" ondblclick="if (submitPlaybackForm(this,'<?php 
    echo htmlentities($this_page);
    ?>
')) submit()" multiple>
<?php 
    // this should be fixed to however playlists get loaded.
    foreach ($songs as $el) {
        echo "<option value=\"" . htmlentities(jz_encode($el->getPath("String"))) . "\">" . htmlentities($display->returnShortName($el->getName(), 75)) . "</option>";
    }
    ?>
</select>
</div>
</td></tr>
<tr><td nowrap><div align="left">
    <?php 
    if (checkPermission($jzUSER, 'play', $node->getPath("String")) === true) {
        ?>
<input type="submit" name="<?php 
        echo jz_encode("sendList");
        ?>
" value="<?php 
        echo word('Play');
        ?>
" onClick="return submitPlaybackForm(this,'<?php 
        echo htmlentities($this_page);
        ?>
')" class="jz_submit">
<input type="submit" name="<?php 
        echo jz_encode("sendPath");
        ?>
" value="<?php 
        echo word('Play All');
        ?>
" onClick="return submitPlaybackForm(this,'<?php 
        echo htmlentities($this_page);
        ?>
')" class="jz_submit">
<input type="submit" name="<?php 
        echo jz_encode("sendPathRandom");
        ?>
" value="<?php 
        echo word('Random Play All');
        ?>
" onClick="return submitPlaybackForm(this,'<?php 
        echo htmlentities($this_page);
        ?>
')" class="jz_submit">
<!--<input type="submit" name="<?php 
        echo jz_encode("info");
        ?>
" value="Get Info" class="jz_submit">--!>
<?php 
    }
    ?>
</div></td>
<td nowrap><div align="right">
<input type="submit" name="<?php 
    echo jz_encode("addList");
    ?>
" value="<?php 
    echo word('Add');
    ?>
" class="jz_submit" onClick="return submitPlaybackForm(this,'<?php 
    echo htmlentities($this_page);
    ?>
')">
<input type="submit" name="<?php 
    echo jz_encode("addPath");
    ?>
" value="<?php 
    echo word('Add All');
    ?>
" class="jz_submit" onClick="return submitPlaybackForm(this,'<?php 
    echo htmlentities($this_page);
    ?>
')">
</div></td></tr>
</form>
</table>
<td>
<form action="<?php 
    echo $this_page;
    ?>
" method="POST" name="playlistForm">
<div id="playlistDisplay">
    <?php 
    $blocks->playlistDisplay();
    ?>
</div>
    <?php 
    $display->playlistSelect('125px', true);
    ?>
</select>
<input type="hidden" name="playlistname" value="">
    <?php 
    $display->hiddenVariableField("action", "playlistAction");
    $display->hiddenVariableField("noaction", "true");
    keepVars($_POST);
    $display->hiddenVariableField("jz_path", $_POST['jz_path']);
    ?>
<input type="submit" name="<?php 
    echo jz_encode("createlist");
    ?>
" value="<?php 
    echo word('New');
    ?>
" class="jz_submit" onClick="variablePrompt('playlistForm','playlistname','<?php 
    echo word('Please enter a name for your playlist.');
    ?>
')">
</form>

</td>
</tr>
<tr>
<td align="left" nowrap>&nbsp;

</td>
<td align="right">&nbsp;

</td>
<td aligh="right">
</td>
</tr>
</table>
<?php 
    $blocks->blockBodyClose();
    echo '<br>';
}
Beispiel #10
0
    /**
     * Displays a table of the given tracks.
     *
     * @author Ross Carlson
     * @version 11/30/04
     * @since 01/11/05
     * @param array $tracks The array of objects of each track
     * @param $purpose The type of this track table. One of:
     * generic|album|search|sample|sample-all
     */
    function trackTable($tracks, $purpose = false)
    {
        global $media_dir, $jinzora_skin, $hierarchy, $album_name_truncate, $row_colors, $img_more, $img_email, $img_rate, $img_discuss, $num_other_albums, $enable_ratings, $this_site, $root_dir;
        if (sizeof($tracks) == 0) {
            return;
        }
        // Let's setup the new display object
        $display =& new jzDisplay();
        // Let's figure out our settings:
        // First, set the defaults.
        $showNumbers = true;
        $showArtist = false;
        $showAlbum = false;
        $showCheck = false;
        $showInfo = false;
        $showEmail = false;
        $showRate = false;
        $showDisc = false;
        $albumArtThumbs = false;
        $showAlbumNames = false;
        $trackTruncate = false;
        $showPlayCount = false;
        // Now adjust as needed:
        switch ($purpose) {
            case "generic":
                $showNumbers = false;
                break;
            case "album":
                $showCheck = true;
                $showNumbers = false;
                $showInfo = true;
                $showPlayCount = true;
                $showEmail = true;
                break;
            case "search":
                $showArtist = true;
                break;
            case "sample":
                // We only want to show album thumbs IF this artist has more than 1 album
                $parent = $tracks[0]->getParent();
                $gParent = $parent->getParent();
                $nodes = $gParent->getSubNodes("nodes");
                if (count($nodes) > 1) {
                    $albumArtThumbs = true;
                }
                $showNumbers = false;
                $showAlbum = true;
                break;
            case "sample-all":
                $showNumbers = false;
                $showCheck = true;
                $showAlbumNames = true;
                $trackTruncate = 20;
                break;
        }
        // Do we need to start the form
        if ($showCheck) {
            $node = $tracks[0]->getParent();
            ?>
			<form name="albumForm" action="<?php 
            echo urlize();
            ?>
" method="POST">
			<input type="hidden" name="<?php 
            echo jz_encode("action");
            ?>
" value="<?php 
            echo jz_encode("mediaAction");
            ?>
">
			<input type="hidden" name="<?php 
            echo jz_encode("jz_path");
            ?>
" value="<?php 
            echo htmlentities(jz_encode($node->getPath("String")));
            ?>
">
			<input type="hidden" name="<?php 
            echo jz_encode("jz_list_type");
            ?>
" value="<?php 
            echo jz_encode("tracks");
            ?>
">
			<?php 
        }
        // Now let's setup the big table to display everything
        $i = 0;
        ?>
		  <table class="jz_track_table" width="100%" cellpadding="3" cellspacing="0" border="0">
		 <?php 
        foreach ($tracks as $child) {
            // First let's grab all the tracks meta data
            $metaData = $child->getMeta();
            $album = $child->getParent();
            if (findPType($album) == "disk") {
                $album = $album->getParent();
            }
            $gParent = $album->getParent();
            $artist = getInformation($album, "artist");
            ?>
		   <tr class="<?php 
            echo $row_colors[$i];
            ?>
">
		   <?php 
            if ($showCheck) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <input type="checkbox" name="jz_list[]" value="<?php 
                echo jz_encode($child->getPath("String"));
                ?>
">
		   </td>
		   
		   
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                echo $display->playButton($child);
                ?>
		   </td>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                echo $display->downloadButton($child);
                ?>
		   </td>
		   
		   
		   <?php 
            }
            // Do they want ratings?
            if ($enable_ratings == "true") {
                echo '<td width="1%" valign="top" class="jz_track_table_songs_td">';
                $display->rateButton($child);
                echo '</td>';
            }
            ?>
		  
		   <?php 
            if ($showInfo) {
                $arr = array();
                $arr['action'] = "popup";
                $arr['ptype'] = "trackinfo";
                $arr['jz_path'] = $child->getPath("String");
                $link = urlize($arr);
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <a href="<?php 
                echo $link;
                ?>
" target="_blank" onclick="openPopup(this, 375, 650); return false;"><?php 
                echo $img_more;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <?php 
            if ($showEmail) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                $arr = array();
                $arr['action'] = "playlist";
                $arr['jz_path'] = $child->getPath("String");
                $arr['type'] = "track";
                $link = $this_site . $root_dir . "/" . str_replace("&", "%26", urlize($arr));
                $mailLink = "mailto:?subject=" . $artist . " - " . $album->getName() . "&body=Click to play " . $artist . " - " . $album->getName() . ":%0D%0A%0D%0A" . $link . "%0D%0A%0D%0APowered%20by%20Jinzora%20%0D%0AJinzora%20::%20Free%20Your%20Media%0D%0Ahttp://www.jinzora.org";
                ?>
		   <a class="jz_track_table_songs_href" href="<?php 
                echo $mailLink;
                ?>
"><?php 
                echo $img_email;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <?php 
            if ($showDisc) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <a class="jz_track_table_songs_href" href=""><?php 
                echo $img_discuss;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <td nowrap width="100%" valign="top" class="jz_track_table_songs_td">
		   <?php 
            // Do they want tiny thumbnails?
            if ($albumArtThumbs) {
                if (($art = $album->getMainArt()) !== false) {
                    $display->link($album, $display->returnImage($art, $album->getName(), 25, 25, "limit", false, false, "left", "2", "2"), $album->getName(), "jz_track_table_songs_href");
                }
            }
            if ($showArtist !== false) {
                $j = 0;
                while ($j < sizeof($hierarchy) && $hierarchy[$j] != 'artist') {
                    $j++;
                }
                if ($j < sizeof($hierarchy)) {
                    $parent = $child;
                    while ($parent->getLevel() > $j + 1) {
                        $parent = $parent->getParent();
                    }
                    $display->link($parent, $parent->getName(), $parent->getName(), "jz_track_table_songs_href");
                    echo " / ";
                }
            }
            if (!$trackTruncate) {
                $tName = $child->getName();
            } else {
                $tName = returnItemShortName($child->getName(), $trackTruncate);
            }
            $display->link($child, $tName, $child->getName(), "jz_track_table_songs_href");
            if ($showAlbum) {
                echo "<br>From: ";
                $display->link($album, returnItemShortName($album->getName(), 20), $album->getName(), "jz_track_table_songs_href");
            }
            // Do they want ratings?
            if ($enable_ratings == "true") {
                $rating = $display->displayRating($child, true);
                if ($rating) {
                    echo "<br>" . $rating;
                }
                unset($rating);
            }
            ?>
		   </td>
		   
		   <?php 
            $lyricsSearch = false;
            if (isset($_POST['search_type'])) {
                if ($_POST['search_type'] == "lyrics") {
                    $lyricsSearch = $_POST['search_query'];
                }
            }
            if (isset($_GET['search_type'])) {
                if ($_GET['search_type'] == "lyrics") {
                    $lyricsSearch = $_GET['search_query'];
                }
            }
            if ($lyricsSearch) {
                // Now let's get the lyrics back
                $lyrics = $child->getLyrics();
                // Now let's parse it out
                $lyrics = str_replace("Lyrics Provided by: Leo's Lyrics\nhttp://www.leoslyrics.com", "", $lyrics);
                $start = strpos(strtolower($lyrics), strtolower($lyricsSearch)) - 20;
                if ($start < 0) {
                    $start = 0;
                }
                $lyrics = "&nbsp; &nbsp; &nbsp; &nbsp;(..." . substr($lyrics, $start, strlen($lyricsSearch) + 40) . "...)";
                $lyrics = highlight($lyrics, $lyricsSearch);
                echo '<td width="6%" align="center" valign="top" class="jz_track_table_songs_td">';
                echo "<nobr>" . $lyrics . "</nobr>";
                echo '</td>';
            }
            ?>
		   
		   
		   <?php 
            if ($showAlbumNames) {
                echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td"><nobr>';
                $display->link($gParent, returnItemShortName($gParent->getName(), 20), $gParent->getName(), "jz_track_table_songs_href");
                echo '</nobr></td>';
            }
            ?>
		   
			<?php 
            if ($showPlayCount) {
                echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td">';
                echo $child->getPlayCount();
                echo '</td>';
            }
            ?>
		   
		   
		   <td width="6%" align="center" valign="top" class="jz_track_table_songs_td">
		   <nobr> &nbsp; <?php 
            echo convertSecMins($metaData['length']);
            ?>
 &nbsp; </nobr>
		   </td>
		   </tr>
		   <?php 
            $i = 1 - $i;
            unset($gParent);
            unset($album);
        }
        // Now let's set a field with the number of checkboxes that were here
        echo "</table>";
        // Now let's show the playlist bar if we should
        if ($showCheck) {
            $blocks = new jzBlocks();
            $blocks->blockSpacer();
            $blocks->playlistBar();
            echo "</form>";
        }
    }
Beispiel #11
0
/** 
 * Returns the AJAX code for the small jukebox
 *
 * @author Ben Dodson
 * @since 8/21/05
 * @param new_jb: the jukebox to change to.
 **/
function ajaxSmallJukebox($new_jb = false, $text = false, $buttons = false, $linebreaks = false)
{
    global $include_path;
    writeLogData("messages", "Jukebox: Displaying the small jukebox interface");
    $blocks = new jzBlocks();
    if ($new_jb !== false) {
        // Change the jukebox
        include_once $include_path . "jukebox/class.php";
        $jbArr = jzJukebox::getJbArr();
        for ($i = 0; $i < count($jbArr); $i++) {
            if ($jbArr[$i]['description'] == $new_jb) {
                $_SESSION['jb_id'] = $i;
            }
        }
        $_POST['jbplaywhere'] = $new_jb;
        ajaxJukeboxRequest('playwhere');
    }
    $blocks->smallJukebox($text, $buttons, $linebreaks);
}
Beispiel #12
0
function chartHelper($type)
{
    global $node;
    $blocks = new jzBlocks();
    switch ($type) {
        case "newartists":
            $title = "LATEST ARTISTS";
            break;
        case "recentplayalbum":
            $title = "PLAYED ALBUMS";
            break;
        case "newalbums":
            $title = "LATEST ALBUMS";
            break;
    }
    ?>
 <td align="center" valign="top">
    <table width="100%" cellpadding="3" cellspacing="0" border="0">
      <tr>
        <td class="jz_block_td" width="50%">
          <strong><?php 
    echo $title;
    ?>
</strong>
        </td>
      </tr>
      <tr>
        <td class="jz_nj_block_body" width="50%">
          <table width="100%" cellpadding="3" cellspacing="0" border="0">
<?php 
    $blocks->showCharts($node, $type, 8, false, false, array('allow_breaks' => 'true'));
    ?>
         </table>
        </td>
      </tr>
    </table>
  </td>
<?php 
}
Beispiel #13
0
 * 
 * - Resources -
 * - Jinzora Author: Ross Carlson <*****@*****.**>
 * - Web: http://www.jinzora.org
 * - Documentation: http://www.jinzora.org/docs	
 * - Support: http://www.jinzora.org/forum
 * - Downloads: http://www.jinzora.org/downloads
 * - License: GNU GPL <http://www.gnu.org/copyleft/gpl.html>
 * 
 * - Contributors -
 * Please see http://www.jinzora.org/team.html
 * 
 * - Code Purpose -
 * - Displays the top frame of the slim Jukezora
 *
 * @since 02.17.04 
 * @author Ross Carlson <*****@*****.**>
 * @author Ben Dodson <*****@*****.**>
 */
// First let's include the settings for Slick
@(include_once "settings.php");
// Now let's create our blocks
$blocks = new jzBlocks();
$display = new jzDisplay();
// Now let's start displaying stuff
$display->preheader(false, false);
// Now we have to manually add the right javascript - the hover javascript breaks our pretty progress bar
global $root_dir;
echo '<script type="text/javascript" src="' . $root_dir . '/lib/jinzora.js"></script>';
usleep(100000);
$blocks->jukeboxBlock();
Beispiel #14
0
    }
}
// Last thing: we want to draw a standard page, since we did not previously exit.
// TODO: check for specialty pages (search,playlistmanager,etc)
// Let's count how many of everything we have
if (!isset($_SESSION['jz_num_genres'])) {
    $root =& new jzMediaNode();
    $_SESSION['jz_num_genres'] = $root->getSubNodeCount("nodes", distanceTo("genre"));
    $_SESSION['jz_num_artists'] = $root->getSubNodeCount("nodes", distanceTo("artist"));
    $_SESSION['jz_num_albums'] = $root->getSubNodeCount("nodes", distanceTo("album"));
    $_SESSION['jz_num_tracks'] = $root->getSubNodeCount("nodes", distanceTo("track"));
}
// The header file defines our drawPage function.
$maindiv = isset($_GET['maindiv']) || isset($_POST['maindiv']) ? true : false;
// Let's check for security
$blocks = new jzBlocks();
if ($blocks->checkForSecure()) {
    $smarty = smartySetup();
    $smarty->assign('path', getcwd());
    // Now let's include the template
    $smarty->display(SMARTY_ROOT . 'templates/slick/security-warning.tpl');
    exit;
}
if (isset($_SESSION['current_interface'])) {
    $_SESSION['ref_interface'] = $_SESSION['current_interface'];
} else {
    $_SESSION['ref_interface'] = "";
}
$_SESSION['current_interface'] = $fe->name;
$_SESSION['jz_purge_file_cache'] = "false";
$fe->standardPage($node, $maindiv);
Beispiel #15
0
 * - Contributors -
 * Please see http://www.jinzora.org/team.html
 * 
 * - Code Purpose -
 * - This page handles the jukebox display and controls
 *
 * @since 01.11.05
 * @author Ross Carlson <*****@*****.**>
 * @author Ben Dodson <*****@*****.**>
 * - Todo -
 * Implement detach window:
 * - use frameElement to determine whether stand-alone or iframe
 * - find a way to determine if detached window is still onscreen
 *   THAT is the real hard part as there is no knowledge of all open windows in Javascript
 *   SO we must use a variable, but it is erased each time we reload the iframe ...
 * - do not display anything in the frame is detached window is still on screen
 * - disable timer on height=0 if we are detached window still on screen
 * - attach the redock function to body.onunload event w/ knowledge of closed in Mozilla
 *
 * @since 07/04/04
 * @author Ross Carlson <*****@*****.**>
 */
// Let's setup the classes
$blocks = new jzBlocks();
$display = new jzDisplay();
// Now let's start displaying stuff
$display->preheader(false, false, "left", true, true, false);
// Now we have to manually add the right javascript - the hover javascript breaks our pretty progress bar
echo '<script type="text/javascript" src="' . $root_dir . '/lib/jinzora.js"></script>';
// Now let's include the jukebox settings
$blocks->jukeboxBlock($node);
Beispiel #16
0
 /**
  * Displays the now breadcrumb block
  * 
  * @author Ross Carlson
  * @version 2/25/05
  * @since 2/25/05
  */
 function breadCrumbs()
 {
     if (!defined('NO_AJAX_LINKS')) {
         $val = '<div id="breadcrumbs"></div>';
         $val .= '<script>';
         $val .= 'function callBreadcrumbs() {';
         $val .= 'x_returnBreadcrumbs(callBreadcrumbs_cb)';
         $val .= '}';
         $val .= 'function callBreadcrumbs_cb(a) {';
         $val .= 'document.getElementById("breadcrumbs").innerHTML = a;';
         $val .= '}';
         $val .= 'callBreadcrumbs();';
         $val .= '</script>';
         return $val;
     } else {
         $blocks = new jzBlocks();
         return $blocks->drawBreadcrumbs(true);
     }
 }
Beispiel #17
0
    function footer($node = false)
    {
        global $jinzora_url, $this_pgm, $version, $allow_lang_choice, $this_page, $web_root, $root_dir, $allow_theme_change, $cms_mode, $skin, $show_loggedin_level, $jz_lang_file, $shoutcast, $sc_refresh, $sc_host, $sc_port, $sc_password, $url_seperator, $jukebox, $show_jinzora_footer, $hide_pgm_name, $media_dir, $img_sm_logo, $show_page_load_time, $allow_speed_choice, $img_play, $img_random_play, $img_playlist, $show_page_load_time, $allow_interface_choice, $allow_style_choice, $jzUSER, $jzSERVICES, $cms_mode;
        $display =& new jzDisplay();
        // First let's make sure they didn't turn the footer off
        if ($show_jinzora_footer) {
            $blocks = new jzBlocks();
            $blocks->blockBodyOpen();
            ?>
				<table width="100%" cellpadding="5"  style="padding:5px;" cellspacing="0" border="0">
					<tr>
						<td width="20%" align="left">
							<?php 
            if ($allow_interface_choice == "true") {
                $display->interfaceDropdown();
            }
            if ($allow_style_choice == "true") {
                echo '<br>';
                $display->styleDropdown();
            }
            ?>
						</td>
						<td width="60%" align="center">
							<center>
							<?php 
            jzHREF($jinzora_url, "", "", "", '<img title="' . $this_pgm . " " . $version . '" alt="' . $this_pgm . " " . $version . '" src="' . $root_dir . '/style/' . $skin . '/powered-by-small.gif" border="0">');
            ?>
							</center>
						</td>
						<td width="20%" align="right" valign="middle" nowrap>
							<?php 
            if ($show_page_load_time == "true" and $_SESSION['jz_load_time'] != "") {
                // Ok, let's get the difference
                $diff = round(microtime_diff($_SESSION['jz_load_time'], microtime()), 3);
                if ($cms_mode == "false") {
                    echo '<span class="jz_artistDesc">';
                }
                echo word("Page generated in") . ": " . $diff . " " . word("seconds");
                if ($cms_mode == "false") {
                    echo "</span>";
                }
                echo "<br>";
            }
            if ($jzUSER->getSetting("admin") == true && $node !== false) {
                $display->mediaManagementDropdown($node);
                echo "&nbsp;<br>";
                $display->systemToolsDropdown($node);
                echo "&nbsp;";
            }
            ?>
						</td>
					</tr>
				</table></td></tr></table>
				<?php 
            $blocks->blockBodyClose();
        }
        $jzSERVICES->cmsClose();
    }