예제 #1
0
 function pageTop($node)
 {
     global $this_page, $include_path, $jinzora_url;
     // Let's setup our objects
     $display = new jzDisplay();
     // Let's include the settings file
     include_once $include_path . 'frontend/frontends/simple/settings.php';
     echo '<a href="' . $this_page . '">Home</a> - ';
     $display->loginLink();
     echo "<br>";
     // Now let's see if we need the breadcrumbs
     if ($_GET['jz_path'] != "") {
         if (isset($_POST['jz_path'])) {
             $bcArray = explode("/", $_POST['jz_path']);
         } else {
             $bcArray = explode("/", $_GET['jz_path']);
         }
         $path = "";
         $br = false;
         foreach ($bcArray as $item) {
             if ($item != "") {
                 $path .= "/" . $item;
                 $arr['jz_path'] = $path;
                 $data = new jzMediaNode($path);
                 echo ' - (';
                 $display->playLink($data, "P", word("Play"), false, false, false);
                 echo "-";
                 $display->playLink($data, "R", word("Play Random"), false, false, true);
                 echo ') <a href="' . urlize($arr) . '">' . $item . '</a>';
             }
             unset($arr);
             $br = true;
         }
     }
     if ($br) {
         echo "<br>";
     }
 }
예제 #2
0
파일: blocks.php 프로젝트: jinzora/jinzora3
 /**
  * Displays the user prefreneces and tools block
  *
  * @author Ben Dodson, Ross Carlson
  * @since 2.28.06
  * @version 2.28.06
  *
  **/
 function blockUser()
 {
     global $jzUSER, $img_home, $cms_mode, $show_slimzora, $img_slim_pop, $img_more, $img_tools, $img_prefs, $img_login, $jz_path, $help_access;
     // Let's startup our Objects
     $smarty = smartySetup();
     $display = new jzDisplay();
     // Let's set the variables
     $arr = array();
     $arr['jz_path'] = "";
     // Let's assign our variables
     $smarty->assign('img_prefs', $img_prefs);
     $smarty->assign('help_access', $help_access);
     $smarty->assign('img_login', $img_login);
     $smarty->assign('home_link', urlize($arr));
     $smarty->assign('home_image', $img_home);
     $smarty->assign('cms_mode', $cms_mode);
     $smarty->assign('show_slimzora', $show_slimzora);
     $smarty->assign('img_slim_pop', $img_slim_pop);
     $smarty->assign('slimzora_link', $display->popupLink('slimzora', false, true, true));
     $smarty->assign('img_docs', $img_more);
     $smarty->assign('docs_link', $display->popupLink('docs', false, true, true));
     $smarty->assign('img_tools', $img_tools);
     $smarty->assign('is_admin', checkPermission($jzUSER, 'admin', $jz_path));
     $smarty->assign('admin_tools_link', $display->popupLink('admintools', false, true, true));
     $smarty->assign('word_user', word("User"));
     $smarty->assign('user_name', $display->returnShortName($jzUSER->getName(), 10));
     $smarty->assign('login_link', $display->loginLink(word('Login'), word('Logout'), true, false, true));
     $smarty->assign('pref_link', $display->popupLink('preferences', false, true, true));
     $smarty->assign('edit_prefs', $jzUSER->getSetting('edit_prefs'));
     $smarty->display(SMARTY_ROOT . 'templates/slick/block-user.tpl');
 }
예제 #3
0
    function footer($node = false)
    {
        global $root_dir, $jinzora_skin, $img_check, $img_check_none, $jzUSER, $version, $jinzora_url, $show_page_load_time, $allow_lang_choice, $allow_style_choice, $allow_interface_change, $image_dir, $jzSERVICES, $jzUSER, $cms_mode, $allow_theme_change;
        if ($node === false) {
            $node = new jzMediaNode();
        }
        $display = new jzDisplay();
        ?>
			<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="1">
				<tr class="and_head1">
					<td width="50%">
						<?php 
        if ($allow_interface_change == "true") {
            $display->interfaceDropdown();
        }
        ?>
					</td>
					<td width="50%" align="right">
						<?php 
        // Now let's show the admin tools
        if ($allow_lang_choice == "true") {
            $display->languageDropdown();
        } else {
            if ($jzUSER->getSetting('admin')) {
                $display->systemToolsDropdown($node);
            }
        }
        ?>
					</td>
				</tr>
				<tr>
					    <td>
					    <?php 
        if ($allow_style_choice == "true") {
            $display->styleDropdown();
        }
        ?>
							</td>
							    <td align="right">
							    <?php 
        if ($jzUSER->getSetting('admin') && $allow_lang_choice == "true") {
            $display->systemToolsDropdown($node);
        } else {
            echo '&nbsp;';
        }
        ?>
							</td>
							    
			</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>				
			<table width="100%" cellspacing="0" cellpadding="3">
				<tr class="and_head1">
					<td width="100%" align="center">
						<?php 
        if ($cms_mode == "false") {
            $display->loginLink();
        }
        if ($jzUSER->getSetting('edit_prefs') !== false) {
            if ($cms_mode == "false") {
                echo " | ";
            }
            //echo " - ";
            $display->popupLink("preferences");
        }
        ?>
						<br><br>
						powered by <a href="<?php 
        echo $jinzora_url;
        ?>
">Jinzora</a> version <?php 
        echo $version;
        ?>
						<br><br>
						<?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);
            echo '<br><span class="jz_artistDesc">' . word("generated in") . ": " . $diff . " " . word("seconds") . "</span>&nbsp;<br><br>";
        }
        ?>
					</td>
				</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>
			</td></tr></table>
			<?php 
        $jzSERVICES->cmsClose();
    }
예제 #4
0
 function footer()
 {
     global $root_dir, $jinzora_url, $jzSERVICES, $cms_mode, $jzUSER;
     $display = new jzDisplay();
     echo "<center>";
     if ($cms_mode == "false") {
         $display->loginLink();
     }
     if ($jzUSER->getSetting('edit_prefs') !== false) {
         if ($cms_mode == "false") {
             echo " | ";
         }
         $display->popupLink("preferences");
     }
     echo '<br><a href="' . $jinzora_url . '" target="_blank"><img src="' . $root_dir . '/style/images/slimzora.gif" border="0"></a><br><br>';
     echo '</td></tr></table>';
     $jzSERVICES->cmsClose();
 }
예제 #5
0
    $smarty->assign('method', "POST");
}
if ($jukebox == "true" && !defined('NO_AJAX_JUKEBOX')) {
    $smarty->assign('searchOnSubmit', 'onSubmit="return searchKeywords(this,\'' . htmlentities($this_page) . '\');"');
} else {
    $smarty->assign('searchOnSubmit', "");
}
$formFields = "";
foreach (getURLVars($this_page) as $key => $val) {
    $formFields .= '<input type="hidden" name="' . htmlentities($key) . '" value="' . htmlentities($val) . '">';
}
$smarty->assign('formFields', $formFields);
$formFields = "";
if (distanceTo("artist") !== false) {
    $searchFields .= '<option value="artists">' . word("Artists") . '</option>' . "\n";
}
if (distanceTo("album") !== false) {
    $searchFields .= '<option value="albums">' . word("Albums") . '</option>' . "\n";
}
$smarty->assign('optionFields', $formFields);
$smarty->assign('searchFields', $searchFields);
$smarty->assign('word_tracks', word('Tracks'));
$smarty->assign('word_lyrics', word('Lyrics'));
$smarty->assign('login_link', $display->loginLink(false, false, true, false, true));
if ($jzUSER->getSetting('edit_prefs') !== false) {
    $smarty->assign('prefs_link', $display->popupLink("preferences", word('Preferences'), true));
} else {
    $smarty->assign('prefs_link', "");
}
$smarty->assign('randomizer', $blocks->randomGenerateSelector($node, word("Play:") . ' ', true));
jzTemplate($smarty, "page-header");
예제 #6
0
 function standardPage(&$node)
 {
     global $jinzora_url, $root_dir, $cms_mode, $jzUSER, $jbArr;
     /* header */
     /* use one smarty object so we can use variables in
     	     both header and footer
     	  */
     $display = new jzDisplay();
     $smarty = smartySetup();
     $path = $node->getPath("String");
     $smarty->assign('cms', $cms_mode == "false" ? false : true);
     $smarty->assign('login_link', $display->loginLink(false, false, true, false, true));
     $smarty->assign('jinzora_url', $jinzora_url);
     $smarty->assign('jinzora_img', $root_dir . '/style/images/slimzora.gif');
     $skip_global_css = true;
     $display->preheader($node->getName(), $this->width, $this->align, true, true, true, $skip_global_css);
     include_once dirname(__FILE__) . "/css.php";
     /* check for playlist queue as action.
      * jukebox/stream action handled in handleJukeboxVars().
      */
     handlePlaylistAction();
     if (isset($_REQUEST['page'])) {
         $page = $_REQUEST['page'];
     } else {
         $page = "browse";
     }
     $tabs = array();
     $tabs[] = array('name' => word('Browse'), 'link' => urlize(array('page' => 'browse', 'jz_path' => $path)), 'selected' => $page == 'browse' ? true : false);
     $tabs[] = array('name' => word('Lists'), 'link' => urlize(array('page' => 'lists', 'jz_path' => $path)), 'selected' => $page == 'lists' || $page == 'playlist' && isset($_REQUEST['playlist']));
     $tabs[] = array('name' => word('Settings'), 'link' => urlize(array('page' => 'settings', 'jz_path' => $path)), 'selected' => $page == 'settings' ? true : false);
     // tab for media target:
     if (isset($_SESSION['jz_playlist_queue'])) {
         if ($_SESSION['jz_playlist_queue'] == 'session') {
             $plName = word('Quick List');
         } else {
             $plName = $jzUSER->loadPlaylist()->getName();
         }
         $tabs[] = array('name' => $plName, 'link' => urlize(array('page' => 'playlist', 'jz_path' => $path)), 'selected' => $page == 'playlist');
     } else {
         if (checkPlayback() == 'jukebox') {
             $name = $jbArr[$_SESSION['jb_id']]['description'];
             $tabs[] = array('name' => $name, 'link' => urlize(array('page' => 'jukebox', 'jz_path' => $path)), 'selected' => $page == 'jukebox');
         }
     }
     $smarty->assign('tabs', $tabs);
     jzTemplate($smarty, 'header');
     if (file_exists($cfile = dirname(__FILE__) . '/models/' . $page . '.php')) {
         require_once $cfile;
         doTemplate($node);
     }
     jzTemplate($smarty, 'footer');
 }