/** * Creates a small version of the jukebox block. * * @author Ben Dodson * @since 4/29/05 * @version 4/29/05 * @param text: the text to display in the box. 'off' means no text. * @buttons: one of: "top|default|off". Top means toggle with the header text when applicable. **/ function smallJukebox($text = false, $buttons = "default", $linebreaks = true) { global $jbArr, $jzUSER, $include_path, $jukebox_display; if ($text == "") { $text = false; } $display = new jzDisplay(); include_once $include_path . "jukebox/class.php"; $jb = new jzJukebox(); if (!$jb->connect()) { echo '<strong>Error connecting to jukebox. Please make sure your jukebox settings are correct. (jukebox/settings.php)</strong>'; $jb_playwhere = ""; } else { if (isset($_SESSION['jb_playwhere'])) { $jb_playwhere = $_SESSION['jb_playwhere']; } else { $jb_playwhere = "stream"; } } $url_array = array(); $url_array['action'] = "popup"; $url_array['ptype'] = "jukezora"; ?> <script> sm_text = '<?php echo $text; ?> '; sm_buttons = '<?php echo $buttons; ?> '; sm_linebreaks = '<?php echo $linebreaks; ?> '; </script> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td width="100%" valign="top"> <?php $showText = true; if ($buttons == "top" && checkPermission($jzUSER, "jukebox_admin") === true && $_SESSION['jb_playwhere'] != "stream") { // Ok, now we need to make sure we can do things $func = $jb->jbAbilities(); echo "<nobr>"; if ($func['playbutton']) { $display->displayJukeboxButton("play"); $showText = false; } if ($func['pausebutton']) { $display->displayJukeboxButton("pause"); $showText = false; } if ($func['stopbutton']) { $display->displayJukeboxButton("stop"); $showText = false; } if ($func['nextbutton']) { $display->displayJukeboxButton("previous"); $showText = false; } if ($func['prevbutton']) { $display->displayJukeboxButton("next"); $showText = false; } if ($func['shufflebutton']) { //$display->displayJukeboxButton("random_play"); //$showText = false; } if ($func['clearbutton']) { $display->displayJukeboxButton("clear"); $showText = false; } echo "</nobr>"; } if ($showText) { ?> <?php if (isNothing($text)) { ?> <font size="1"> <strong> <?php if (checkPlayback() == "jukebox") { $theJWord = word("Jukebox"); } else { $theJWord = word("Playback"); } $display->popupLink("jukezora", $theJWord); if (checkPlayback() == "jukebox") { $jz_jbstatus = $jb->getPlayerStatus(); echo " - " . ucwords($jz_jbstatus); } ?> </strong> </font> <?php } else { if ($text != "off") { echo $text; } } ?> <?php } ?> </td> </tr> <tr> <td width="100%" valign="top"> <?php $arr = array(); $arr['action'] = "jukebox"; $arr['subaction'] = "jukebox-command"; $arr['command'] = "playwhere"; ?> <form action="<?php echo urlize($arr); ?> " method="POST" name="playbackForm"> <select name="jbplaywhere" id="smallJukeboxSelect" class="jz_select" style="width:132;" onChange="updateSmallJukebox()"> <?php if (checkPermission($jzUSER, 'stream')) { ?> <option value="stream">Stream</option> <?php } // Now let's get a list of all the jukeboxes that are installed for ($i = 0; $i < count($jbArr); $i++) { echo '<option '; if ($jb_playwhere == $jbArr[$i]['description']) { echo " selected "; } echo 'value="' . $jbArr[$i]['description'] . '">' . $jbArr[$i]['description'] . '</option>'; } ?> </select> </form> <?php if ($linebreaks) { echo '</td></tr><tr><td width="100%">'; } else { echo "   "; } if ($jb_playwhere != "stream" && checkPermission($jzUSER, "jukebox_admin") === true && $buttons == "default") { // Ok, now we need to make sure we can do things $func = $jb->jbAbilities(); echo "<nobr>"; if ($func['playbutton']) { $display->displayJukeboxButton("play"); } if ($func['pausebutton']) { $display->displayJukeboxButton("pause"); } if ($func['stopbutton']) { $display->displayJukeboxButton("stop"); } if ($func['nextbutton']) { $display->displayJukeboxButton("previous"); } if ($func['prevbutton']) { $display->displayJukeboxButton("next"); } if ($func['shufflebutton']) { //$display->displayJukeboxButton("random_play"); } if ($func['clearbutton']) { $display->displayJukeboxButton("clear"); } echo "</nobr>"; } ?> </td> </tr> </table> <?php }
/** * 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'); }
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(); }
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 ' '; } ?> </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> <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(); }
$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");