• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP word函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中word函数的典型用法代码示例。如果您正苦于以下问题:PHP word函数的具体用法?PHP word怎么用?PHP word使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了word函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: drawPage

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');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:27,代码来源:genre.php


示例2: doTemplate

function doTemplate($node)
{
    global $jzUSER;
    $display =& new jzDisplay();
    $smarty = mobileSmarty();
    $smarty->assign('Play', word('Play'));
    $smarty->assign('Shuffle', word('Shuffle'));
    if (!isset($_REQUEST['playlist']) && !isset($_SESSION['jz_playlist_queue'])) {
        jzTemplate($smart, 'playlist');
        return;
    }
    $elements = array();
    if (isset($_REQUEST['playlist'])) {
        $pl = $jzUSER->loadPlaylist($_REQUEST['playlist']);
    } else {
        $pl = $jzUSER->loadPlaylist($_SESSION['jz_playlist_queue']);
    }
    $smarty->assign('plName', $pl->getName());
    $smarty->assign('openPlayTag', $display->getOpenPlayTag($pl));
    $smarty->assign('openShuffleTag', $display->getOpenPlayTag($pl, true));
    $smarty->assign('isStatic', $pl->getPLType() == 'static');
    $list = $pl->getList();
    foreach ($list as $el) {
        $elements[] = array('name' => $el->getName(), 'openPlayTag' => $display->getOpenPlayTag($el));
    }
    $smarty->assign('elements', $elements);
    jzTemplate($smarty, 'playlist');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:28,代码来源:playlist.php


示例3: footer

 function footer()
 {
     global $jinzora_url, $this_pgm, $version, $root_dir, $show_page_load_time, $skin, $show_jinzora_footer, $jzSERVICES, $cms_mode;
     // First let's make sure they didn't turn the footer off
     if ($show_jinzora_footer) {
         $display = new jzDisplay();
         $smarty = smartySetup();
         $smarty->assign('jinzora_url', $jinzora_url);
         $smarty->assign('link_title', $this_pgm . " " . $version);
         $poweredby = $root_dir . '/style/' . $skin . '/powered-by-small.gif';
         if (!file_exists($poweredby)) {
             $poweredby = $root_dir . '/style/images/powered-by-small.gif';
         }
         $smarty->assign('logo', $poweredby);
         $smarty->assign('page_load_time', "");
         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") {
                 $page_load = '<span class="jz_artistDesc">';
             }
             $page_load .= word("Page generated in") . ": " . $diff . " " . word("seconds");
             if ($cms_mode == "false") {
                 $page_load .= "</span>";
             }
             $smarty->assign('page_load_time', $page_load);
         }
         // Now let's display
         $smarty->display(SMARTY_ROOT . 'templates/slick/block-footer.tpl');
     }
     $jzSERVICES->cmsClose();
 }
开发者ID:seanfbrown,项目名称:jinzora,代码行数:32,代码来源:header.php


示例4: getDynamicFunctions

function getDynamicFunctions()
{
    $f = array();
    $f['random'] = word('Randomly Selected');
    $f['topplayed'] = word('Most Played');
    $f['recentlyadded'] = word('Recently Added');
    $f['similar'] = word('Similar');
    //$f['exact'] = word('All Tracks'); // Available, but dont add to dropdown
    return $f;
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:10,代码来源:playlists.php


示例5: classicRandomAlbums

 /**
  * Displays the random albums block
  * @author Ross Carlson
  * @version 12/22/04
  * @since 12/22/04
  * @param object $node the node that we are looking at
  * @param string $level The level we are looking at, like a subartist
  */
 function classicRandomAlbums(&$node, $level = "")
 {
     global $hierarchy;
     $title = word("Random Albums");
     if ($node->getName() != "") {
         $title = word("Random Albums") . " :: " . $node->getName();
     }
     $this->blockHeader($title);
     $this->blockBodyOpen();
     $this->randomAlbums($node, $level);
     $this->blockBodyClose();
 }
开发者ID:seanfbrown,项目名称:jinzora,代码行数:20,代码来源:blocks.php


示例6: doTemplate

function doTemplate($node)
{
    global $jzUSER, $display, $chart_size;
    $display =& new jzDisplay();
    $smarty = mobileSmarty();
    $smarty->assign('Play', word('Play'));
    $smarty->assign('Shuffle', word('Shuffle'));
    /** Playlists **/
    $smarty->assign('Playlists', word('Playlists'));
    $editPage = array('page' => 'playlist');
    $sm_lists = array();
    $l = $jzUSER->loadPlaylist("session");
    if ($l->length() > 0) {
        $sm_lists[] = array('name' => word("Quick List"), 'openPlayTag' => $display->getOpenPlayTag($l), 'editHREF' => urlize($editPage, array('playlist' => 'session')), 'isStatic' => true, 'openShuffleTag' => $display->getOpenPlayTag($l, true));
    }
    $lists = $jzUSER->listPlaylists("static") + $jzUSER->listPlaylists("dynamic");
    // use "all" to mix ordering
    foreach ($lists as $id => $plName) {
        $l = $jzUSER->loadPlaylist($id);
        $static = $l->getPLType() == 'static' ? true : false;
        $sm_lists[] = array('name' => $plName, 'openPlayTag' => $display->getOpenPlayTag($l), 'editHREF' => urlize($editPage, array('playlist' => $id)), 'isStatic' => $static, 'openShuffleTag' => $display->getOpenPlayTag($l, true));
    }
    $smarty->assign('playlists', $sm_lists);
    /** Charts **/
    /**
     * array of titles and lists */
    $root = new jzMediaNode();
    $charts = array();
    /* recently added albums */
    $chart = array();
    $chart['title'] = word('New Albums');
    $entries = array();
    $list = $root->getRecentlyAdded('nodes', distanceTo('album'), $chart_size);
    for ($i = 0; $i < sizeof($list); $i++) {
        $entries[] = array('name' => $list[$i]->getName(), 'link' => urlize(array('jz_path' => $list[$i]->getPath("String"))), 'openPlayTag' => $display->getOpenPlayTag($list[$i]));
    }
    $chart['entries'] = $entries;
    $charts[] = $chart;
    /* recently played albums */
    $chart = array();
    $chart['title'] = word('Recently Played Albums');
    $entries = array();
    $list = $root->getRecentlyPlayed('nodes', distanceTo('album'), $chart_size);
    for ($i = 0; $i < sizeof($list); $i++) {
        $entries[] = array('name' => $list[$i]->getName(), 'link' => urlize(array('jz_path' => $list[$i]->getPath("String"))), 'openPlayTag' => $display->getOpenPlayTag($list[$i]));
    }
    $chart['entries'] = $entries;
    $charts[] = $chart;
    $smarty->assign('charts', $charts);
    jzTemplate($smarty, 'lists');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:51,代码来源:lists.php


示例7: imagebmp

function imagebmp(&$img, $filename = false)
{
    $wid = imagesx($img);
    $hei = imagesy($img);
    $wid_pad = str_pad('', $wid % 4, "");
    $size = 54 + ($wid + $wid_pad) * $hei * 3;
    //fixed
    //prepare & save header
    $header['identifier'] = 'BM';
    $header['file_size'] = dword($size);
    $header['reserved'] = dword(0);
    $header['bitmap_data'] = dword(54);
    $header['header_size'] = dword(40);
    $header['width'] = dword($wid);
    $header['height'] = dword($hei);
    $header['planes'] = word(1);
    $header['bits_per_pixel'] = word(24);
    $header['compression'] = dword(0);
    $header['data_size'] = dword(0);
    $header['h_resolution'] = dword(0);
    $header['v_resolution'] = dword(0);
    $header['colors'] = dword(0);
    $header['important_colors'] = dword(0);
    if ($filename) {
        $f = fopen($filename, "wb");
        foreach ($header as $h) {
            fwrite($f, $h);
        }
        //save pixels
        for ($y = $hei - 1; $y >= 0; $y--) {
            for ($x = 0; $x < $wid; $x++) {
                $rgb = imagecolorat($img, $x, $y);
                fwrite($f, byte3($rgb));
            }
            fwrite($f, $wid_pad);
        }
        fclose($f);
    } else {
        foreach ($header as $h) {
            echo $h;
        }
        //save pixels
        for ($y = $hei - 1; $y >= 0; $y--) {
            for ($x = 0; $x < $wid; $x++) {
                $rgb = imagecolorat($img, $x, $y);
                echo byte3($rgb);
            }
            echo $wid_pad;
        }
    }
}
开发者ID:feeel1,项目名称:akina,代码行数:51,代码来源:bmp.php


示例8: doTemplate

function doTemplate($node)
{
    global $jbArr, $jzUSER;
    $display =& new jzDisplay();
    $smarty = mobileSmarty();
    $smarty->assign('Playback', word('Playback'));
    $smarty->assign('SendToDevice', word('Send to Device:'));
    $smarty->assign('AddToPlaylist', word('Add to Playlist:'));
    $path = $node->getPath("String");
    $url = array('jz_path' => $path, 'page' => 'settings');
    $pbt = array();
    $playlists = array();
    $url['jz_player'] = 'stream';
    $url['jz_player_type'] = 'stream';
    $selected = !actionIsQueue() && checkPlayback() == 'stream';
    $pbt[] = array('label' => word('Stream media'), 'url' => urlize($url), 'selected' => $selected);
    $url['jz_player_type'] = 'jukebox';
    if (isset($jbArr) && is_array($jbArr)) {
        for ($i = 0; $i < sizeof($jbArr); $i++) {
            $url['jz_player'] = $i;
            $url['jz_player_type'] = 'jukebox';
            $selected = !actionIsQueue() && checkPlayback() == 'jukebox' && $_SESSION['jb_id'] == $i;
            $pbt[] = array('label' => word('Send to %s', $jbArr[$i]['description']), 'url' => urlize($url), 'selected' => $selected);
        }
    }
    $smarty->assign('devices', $pbt);
    /* playlists */
    $url['jz_player_type'] = 'playlist';
    $url['jz_player'] = 'session';
    $selected = actionIsQueue() && $_SESSION['jz_playlist_queue'] == 'session';
    $playlists[] = array('label' => word('Quick List'), 'url' => urlize($url), 'selected' => $selected);
    $lists = $jzUSER->listPlaylists("static");
    foreach ($lists as $id => $plName) {
        $url['jz_player'] = $id;
        $selected = actionIsQueue() && $_SESSION['jz_playlist_queue'] == $id;
        $playlists[] = array('label' => $plName, 'url' => urlize($url), 'selected' => $selected);
    }
    $smarty->assign('playlists', $playlists);
    $url['jz_player'] = 'new';
    $smarty->assign('newList', array('href' => '#', 'onclick' => "window.location='" . urlize($url) . "'.concat('&playlistname='.concat(document.getElementById('playlistname').value)); return true;", 'name' => word('My Playlist'), 'inputID' => word('playlistname'), 'label' => word('New list:'), 'selected' => false));
    jzTemplate($smarty, 'settings');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:42,代码来源:settings.php


示例9: doTemplate

function doTemplate($node)
{
    $display =& new jzDisplay();
    $smarty = mobileSmarty();
    $breadcrumbs = array();
    if (isset($_REQUEST['jz_path'])) {
        $me = $node;
        while ($me->getLevel() > 0) {
            $breadcrumbs[] = array("name" => $me->getName(), "link" => urlize(array('jz_path' => $me->getPath("String"))));
            $me = $me->getParent();
        }
    }
    $breadcrumbs[] = array("name" => word("Home"), "link" => urlize(array()));
    $smarty->assign('breadcrumbs', $breadcrumbs);
    if (actionIsQueue()) {
        $smarty->assign('Play', word('Add'));
    } else {
        $smarty->assign('Play', word('Play'));
    }
    $myNodes = $node->getSubNodes('nodes');
    sortElements($myNodes);
    $myTracks = $node->getSubNodes('tracks');
    $nodes = array();
    for ($i = 0; $i < sizeof($myNodes); $i++) {
        $e = $myNodes[$i];
        $nodes[] = smartyNode($myNodes[$i]);
    }
    $smarty->assign('nodes', $nodes);
    $tracks = array();
    for ($i = 0; $i < sizeof($myTracks); $i++) {
        $e = $myNodes[$i];
        $tracks[] = smartyTrack($myTracks[$i]);
    }
    $smarty->assign('tracks', $tracks);
    jzTemplate($smarty, 'browse');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:36,代码来源:browse.php


示例10: standardPage

    function standardPage(&$node)
    {
        global $jinzora_skin, $root_dir, $row_colors, $image_size, $desc_truncate, $image_dir, $jzSERVICES, $show_frontpage_items, $show_artist_alpha, $sort_by_year;
        // Let's setup the objects
        $blocks =& new jzBlocks();
        $display =& new jzDisplay();
        $fe =& new jzFrontend();
        // Let's display the header
        $this->pageTop($node);
        // Now let's get the sub nodes to where we are
        if (isset($_GET['jz_letter'])) {
            $root = new jzMediaNode();
            $nodes = $root->getAlphabetical($_GET['jz_letter'], "nodes", distanceTo("artist"));
        } else {
            if ($node->getLevel() == 0 && $show_frontpage_items == "false") {
                $nodes = array();
            } else {
                $nodes = $node->getSubNodes("nodes");
            }
        }
        // Now let's sort
        if ($sort_by_year == "true" and $node->getPType() == "artist") {
            sortElements($nodes, "year");
        } else {
            sortElements($nodes, "name");
        }
        echo '<form name="albumForm" method="POST" action="' . urlize() . '">';
        echo '<input type="hidden" name="' . jz_encode('jz_list_type') . '" value="' . jz_encode('nodes') . '">';
        // Now let's loop through the nodes
        $i = 0;
        foreach ($nodes as $item) {
            ?>
				<table width="100%" cellspacing="0" cellpadding="4">
					<tr class="<?php 
            $i = 1 - $i;
            echo $row_colors[$i];
            ?>
">
						<td width="1%" valign="middle">
							<input type="checkbox" name="jz_list[]" value="<?php 
            echo jz_encode($item->getPath("String"));
            ?>
">
						</td>
						<td width="1%" valign="middle">
							<?php 
            $display->link($item, '<img src="' . $image_dir . 'folder.gif" border="0">');
            ?>
						</td>
						<td width="96%" valign="middle">
							<?php 
            // Now let's link to this item
            $name = $item->getName();
            if (!isNothing($item->getYear()) and $item->getPType() == "album") {
                $name .= " (" . $item->getYear() . ")";
            }
            $display->link($item, $name);
            ?>
						</td>	
						<td width="1%" valign="middle" nowrap align="right">
							<?php 
            // Now let's show the sub items
            if (($count = $item->getSubNodeCount("nodes")) != 0) {
                if ($count > 1) {
                    $folder = word("folders");
                } else {
                    $folder = word("folder");
                }
                $display->link($item, $count . " " . $folder);
            } else {
                if (($count = $item->getSubNodeCount("tracks")) != 0) {
                    if ($count > 1) {
                        $files = word("files");
                    } else {
                        $files = word("file");
                    }
                    $display->link($item, $count . " " . $files);
                }
            }
            ?>
						</td>
						<td width="1%" valign="middle" nowrap align="right">
							<?php 
            // Let's show a play button
            $display->playButton($item);
            echo "&nbsp;";
            $display->randomPlayButton($item);
            ?>
							&nbsp;
						</td>
					</tr>
					<?php 
            // Now do we hvae another row?
            if (($art = $item->getMainArt($image_size . "x" . $image_size)) != false or ($desc = $item->getDescription()) != "") {
                // Ok, we had stuff let's do a new row
                ?>
							<tr class="<?php 
                echo $row_colors[$i];
                ?>
">
//.........这里部分代码省略.........
开发者ID:seanfbrown,项目名称:jinzora,代码行数:101,代码来源:header.php


示例11: word

     $name .= " (" . $item->getYear() . ")";
 }
 $array[$i]['name'] = $display->link($item, $name, false, false, true);
 if (($count = $item->getSubNodeCount("nodes")) != 0) {
     if ($count > 1) {
         $folder = word("folders");
     } else {
         $folder = word("folder");
     }
     $array[$i]['items'] = $display->link($item, $count . " " . $folder, false, false, true);
 } else {
     if (($count = $item->getSubNodeCount("tracks")) != 0) {
         if ($count > 1) {
             $files = word("files");
         } else {
             $files = word("file");
         }
         $array[$i]['items'] = $display->link($item, $count . " " . $files, false, false, true);
     }
 }
 $array[$i]['play_button'] = $display->playButton($item, false, false, false, true);
 $array[$i]['random_button'] = $display->randomPlayButton($item, false, false, false, true);
 // Now do we hvae another row?
 $array[$i]['subitems'] = false;
 if (($art = $item->getMainArt($image_size . "x" . $image_size)) != false or ($desc = $item->getDescription()) != "") {
     $array[$i]['subitems'] = true;
     $array[$i]['art'] = false;
     if ($art) {
         $array[$i]['art'] = $display->link($item, $display->returnImage($art, $node->getName(), $image_size, $image_size, "limit", false, false, "left", "4", "4"), false, false, true);
     }
     $array[$i]['desc'] = $display->returnShortName($item->getDescription(), $desc_truncate);
开发者ID:seanfbrown,项目名称:jinzora,代码行数:31,代码来源:standard-page.php


示例12: handleFrontendOverrides

function handleFrontendOverrides()
{
    global $img_play, $img_tiny_play, $fe;
    $img_play = '<img src="frontend/frontends/' . $fe->name . '/img/play.gif" border=0 alt="' . word("Play") . '" title="' . word("Play") . '">';
    $img_tiny_play = '<img src="frontend/frontends/' . $fe->name . '/img/play.gif" border=0 alt="' . word("Play") . '" title="' . word("Play") . '">';
    ?>
<style>
td {
  font-size:20px;
}
a {
  font-size:24px;
}
</style>
    <?php 
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:16,代码来源:header.php


示例13: pathize

/**
 * Turns a string with potentially weird characters into a valid path.
 * 
 * @author Ben Dodson
 * @version 6/9/04
 * @since 6/9/04
 */
function pathize($str, $char = '_')
{
    $str = preg_replace("/[^a-z|A-Z|0-9| |,|'|\"|(|)|.|-|_|+|=]/", $char, $str);
    if ($str == "" || $str == "-") {
        $str = word("Unknown");
    }
    return $str;
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:15,代码来源:backend.php


示例14: doTemplate

function doTemplate($node)
{
    global $jzUSER;
    $display =& new jzDisplay();
    $smarty = mobileSmarty();
    $jb = new jzJukebox();
    if (!$jb->connect()) {
        //jzTemplate($smarty,'jukeboxError');
        echo 'Error connecting to jukebox.';
        return;
    }
    $smarty->assign('Play', word('Play'));
    $smarty->assign('Pause', word('Pause'));
    $smarty->assign('Stop', word('Stop'));
    $smarty->assign('Previous', word('Previous'));
    $smarty->assign('Next', word('Next'));
    $smarty->assign('Shuffle', word('Shuffle'));
    $smarty->assign('Clear', word('Clear'));
    /* buttons */
    if (checkPermission($jzUSER, "jukebox_admin")) {
        $func = $jb->jbAbilities();
        if ($func['playbutton']) {
            $smarty->assign('openPlayTag', $display->getOpenJukeboxActionTag('play'));
        }
        if ($func['pausebutton']) {
            $smarty->assign('openPauseTag', $display->getOpenJukeboxActionTag('pause'));
        }
        if ($func['stopbutton']) {
            $smarty->assign('openStopTag', $display->getOpenJukeboxActionTag('stop'));
        }
        if ($func['prevbutton']) {
            $smarty->assign('openPrevTag', $display->getOpenJukeboxActionTag('previous'));
        }
        if ($func['nextbutton']) {
            $smarty->assign('openNextTag', $display->getOpenJukeboxActionTag('next'));
        }
        if ($func['shufflebutton']) {
            $smarty->assign('openShuffleTag', $display->getOpenJukeboxActionTag('random_play'));
        }
        if ($func['clearbutton']) {
            $smarty->assign('openClearTag', $display->getOpenJukeboxActionTag('clear'));
        }
        if ($func['volume']) {
            $smarty->assign('Volume', word('Volume:'));
            $smarty->assign('volumeSteps', range(0, 100, 5));
            $vol = $_SESSION['jz_jbvol-' . $_SESSION['jb_id']];
            if (!isset($vol) || !is_numeric($vol)) {
                $vol = 0;
            }
            $smarty->assign('currentVolume', $vol);
        }
        if ($func['addtype']) {
            /* how to add media */
            $smarty->assign('whereAdd', word('Add media:'));
            function jbHREF($type)
            {
                return "javascript:sendJukeboxRequest('addwhere','{$type}');";
            }
            $set = array();
            $set[] = array('href' => jbHREF('current'), 'label' => 'After current track', 'selected' => $_SESSION['jb-addtype'] == "current");
            $set[] = array('href' => jbHREF('begin'), 'label' => 'At beginning of playlist', 'selected' => $_SESSION['jb-addtype'] == "begin");
            $set[] = array('href' => jbHREF('end'), 'label' => 'At end of playlist', 'selected' => $_SESSION['jb-addtype'] == "end");
            $set[] = array('href' => jbHREF('replace'), 'label' => 'Replace current playlist', 'selected' => $_SESSION['jb-addtype'] == "replace");
            $smarty->assign('addTypes', $set);
        }
    }
    jzTemplate($smarty, 'jukebox');
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:68,代码来源:jukebox.php


示例15: randomAlbums

    /**
     * Displays the random albums block
     * @author Ross Carlson
     * @version 12/22/04
     * @since 12/22/04
     * @param object $node the node that we are looking at
     * @param string $level The level we are looking at, like a subartist
     */
    function randomAlbums(&$node, $level = "", $valArray = false)
    {
        global $random_albums, $random_per_slot, $random_rate, $row_colors, $root_dir, $jzUSER, $show_album_art, $random_art_size;
        // Should we be here????
        if ($random_albums == "0" or $show_album_art == "false") {
            return;
        }
        // Let's setup the new display object
        $display =& new jzDisplay();
        // Let's make sure they didn't pass the data already
        if ($valArray) {
            $artArray = $valArray;
        } else {
            // Now let's get a random amount of albums with album art
            $artArray = $node->getSubNodes("nodes", distanceTo("album", $node), true, $random_albums * $random_per_slot, true);
        }
        // Now let's see how much we got back and make sure we just shouldn't return
        if (count($artArray) == 0) {
            return;
        }
        // Now let's display the images
        ?>
		<table width="100%" cellpadding="5" cellspacing="0" border="0">
			<tr>
				<?php 
        // Now let's figure out how wide to make the colums
        if ($random_albums * $random_per_slot > count($artArray)) {
            // Now we've got to figure out how many we've got
            $numArt = count($artArray);
            if ($numArt > $random_albums) {
                $random_per_slot = round(count($artArray) / $random_albums - 0.49, 0);
            } else {
                $random_albums = count($artArray);
                $random_per_slot = 1;
            }
        }
        $colWidth = 100 / $random_albums;
        $c = 1;
        while ($c < $random_albums + 1) {
            echo '<td align="center" valign="middle" width="' . $colWidth . '">';
            echo '<div id="div' . $c . '"></div>';
            echo '</td>';
            $c++;
        }
        ?>
			</tr>
		</table>
		<?php 
        // Now let's add the Javascript for the rotations
        ?>
		<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"><!--\
			
			//you may add your image file or text below
			$c=1;
			// Now let's create the variables
			<?php 
        $c = 1;
        while ($c < $random_albums + 1) {
            echo "var imgItem" . $c . "=new Array()" . "\n";
            $c++;
        }
        // Now let's build the first array with ALL the data so we can break it up later
        $c = 0;
        for ($i = 0; $i < count($artArray); $i++) {
            $albumName_long = $artArray[$i]->getName();
            $albumName = returnItemShortName($artArray[$i]->getName(), 12);
            $albumLink = str_replace('"', "\\\"", $display->link($artArray[$i], $albumName, word("Browse") . ": " . $albumName_long, "jz_random_art_block", true));
            $artist = $artArray[$i]->getNaturalParent();
            $artistName_long = $artist->getName();
            $artistName = returnItemShortName($artist->getName(), 12);
            $artistLink = str_replace('"', "\\\"", $display->link($artist, $artistName, word("Browse") . ": " . $artistName_long, "jz_random_art_block", true));
            $artsize = explode("x", $random_art_size);
            $imgSrc = str_replace('"', "'", $display->returnImage($artArray[$i]->getMainArt($random_art_size), $artArray[$i]->getName(), $artsize[0], $artsize[1], "fixed"));
            $item_link = str_replace('"', "'", $display->link($artArray[$i], $imgSrc, $albumName_long, "jz_random_art_block", true));
            // Now, can they stream?
            if ($jzUSER->getSetting('stream')) {
                $playLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play"), word("Play") . ": " . $albumName_long, "jz_random_art_block", true));
                $randLink = str_replace('"', "\\\"", $display->playLink($artArray[$i], word("Play Random"), word("Play Random") . ": " . $albumName_long, "jz_random_art_block", true, true));
                $dispLink = $playLink . " - " . $randLink;
            } else {
                $dispLink = "";
            }
            // Let's make sure they aren'te view only
            $arrayVar = "<center>" . $artistLink . "<br>" . $albumLink . "<br>" . $item_link;
            if ($jzUSER->getSetting('stream')) {
                $arrayVar .= "<br>" . $dispLink . "</center>";
            }
            $fullArray[] = $arrayVar;
        }
        // Now we need to get the different arrays
        $c = 1;
        $start = 0;
//.........这里部分代码省略.........
开发者ID:seanfbrown,项目名称:jinzora,代码行数:101,代码来源:blocks.php


示例16: writeLogData

     if ($_GET['random_play_genre'] != "") {
         writeLogData('playback', "generated random playlist of " . $_GET['random_play_number'] . " tracks from genre '" . $_GET['random_play_genre'] . "' in {$timer} seconds.");
     } else {
         writeLogData('playback', "generated random playlist of " . $_GET['random_play_number'] . " tracks in {$timer} seconds.");
     }
     $pl->play();
     exit;
     break;
 case "download":
     writeLogData("messages", "Index: Beginning a file download for: " . $_GET['jz_path']);
     //while (@ob_end_flush());
     if ($_GET['type'] == "track" && $single_download_mode == "raw") {
         $el =& new jzMediaTrack($_GET['jz_path']);
         if (!checkStreamLimit($el)) {
             // TODO: AJAX this so we don't come to a page, but get a Javascript alert.
             echo word('Sorry, you have reached your download limit.');
             exit;
         }
         // Are they downloading something resampled?
         if (stristr($_GET['jz_path'], "data/resample")) {
             $name = $el->getPath();
             $name = $name[sizeof($name) - 1];
             sendMedia($_GET['jz_path'], $name, $resample, true);
         } else {
             $el->increaseDownloadCount();
             $name = $el->getPath();
             $name = $name[sizeof($name) - 1];
             sendMedia($el->getFileName("host"), $name, $resample, true);
         }
         exit;
     } else {
开发者ID:seanfbrown,项目名称:jinzora,代码行数:31,代码来源:index.php


示例17: die

<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
/**
* Displays the quick box to add an item to favorites
*
* @author Ross Carlson
* @since 12.17.05
* @version 12.17.05
* @param $path The node that we are viewing
**/
global $include_path, $jzUSER;
$node = new jzMediaNode($path);
$display = new jzDisplay();
$be = new jzBackend();
// Let's start the page header
$this->displayPageTop("", word("Adding to Favorites"));
$this->openBlock();
echo word("Adding") . ": " . $node->getName();
// Now let's add it
$this->closeBlock();
开发者ID:seanfbrown,项目名称:jinzora,代码行数:23,代码来源:addtofavorites.php


示例18: die

<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
/**
 * Pulls the lyrics from a track and displays just them
 *
 * @author Ross Carlson
 * @since 04/08/05
 * @version 04/08/05
 * @param $node object The node we are viewing
 *
 **/
global $node;
$track = new jzMediaTrack($node->getPath('String'));
$meta = $track->getMeta();
$this->displayPageTop("", word("Lyrics for:") . " " . $meta['title']);
$this->openBlock();
echo nl2br($meta['lyrics']);
echo '<br><br><center>';
$this->closeButton();
$this->closeBlock();
开发者ID:seanfbrown,项目名称:jinzora,代码行数:23,代码来源:viewlyricsfortrack.php


示例19: word

    ?>
 (128kbps)</option>
									<option value="192"><?php 
    echo word("Good quality");
    ?>
 (192kbps)</option>
									<option value="320"><?php 
    echo word("Highest quality");
    ?>
 (320kbps)</option>
								</select>
							</td>
						</tr>
					</table>
					<br><br>
					<input type="submit" name="edit_download_tc_file" value="<?php 
    echo word("Download");
    ?>
" class="jz_submit">
					<?php 
} else {
    echo '<input type="hidden" name="edit_dlformat" value="native">';
    echo '<input type="hidden" name="edit_dlbitrate" value="native">';
    echo '<body onLoad="document.dlForm.submit();"></body>';
}
?>
			
		</form>
		<?php 
$this->closeBlock();
exit;
开发者ID:seanfbrown,项目名称:jinzora,代码行数:31,代码来源:downloadtranscode.php


示例20: userManSettings

function userManSettings($purpose, $settings = false, $subaction = false, $post = false)
{
    global $jzSERVICES, $resampleRates, $include_path;
    $be = new jzBackend();
    $display = new jzDisplay();
    $url_array = array();
    $url_array['action'] = "popup";
    $url_array['ptype'] = "usermanager";
    if ($subaction === false) {
        $url_array['subaction'] = "handleclass";
    } else {
        $url_array['subaction'] = $subaction;
    }
    // Why PHP pisses me off.
    foreach ($settings as $k => $v) {
        if ($v == "true") {
            $settings[$k] = true;
        } else {
            if ($v == "false") {
                $settings[$k] = false;
            } else {
                $settings[$k] = $v;
            }
        }
    }
    ?>
      <form method="POST" action="<?php 
    echo urlize($url_array);
    ?>
">
	 <input type="hidden" name="update_settings" value="true">
	 <?php 
    if (is_array($post)) {
        foreach ($post as $p => $v) {
            echo '<input type="hidden" name="' . $p . '" value="' . $v . '">';
        }
    }
    ?>
	 <table>
	 <?php 
    if ($purpose != "custom") {
        ?>
	 <tr><td width="30%" valign="top" align="right">
	 <?php 
        echo word("Template:");
        ?>
	 </td><td width="70%">
	     <?php 
        if ($purpose == "new") {
            ?>
	       <input name="classname" class="jz_input">
	       <?php 
        } else {
            if ($purpose == "update") {
                echo '<input type="hidden" name="classname" class="jz_input" value="' . $_POST['classname'] . '">';
                echo $_POST['classname'];
            }
        }
        ?>
	     </td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr>
					   <?php 
    }
    ?>
							<tr>
							<td width="30%" valign="top" align="right">
							<?php 
    echo word("Interface");
    ?>
:
	       </td>
		   <td width="70%">
		   <?php 
    $overCode = $display->returnToolTip(word("INTERFACE_NOTE"), word("Default Interface"));
    ?>
		   <select <?php 
    echo $overCode;
    ?>
 name="usr_interface" class="jz_select" style="width:135px;">
			 <?php 
    // Let's get all the interfaces
    $retArray = readDirInfo($include_path . "frontend/frontends", "dir");
    sort($retArray);
    for ($i = 0; $i < count($retArray); $i++) {
        echo '<option ';
        if ($settings['frontend'] == $retArray[$i]) {
            echo 'selected ';
        }
        echo 'value="' . $retArray[$i] . '">' . $retArray[$i] . '</option>' . "\n";
    }
    ?>
			</select>
			</td>
			</tr>
			<tr>
			<td width="30%" valign="top" align="right">
			<?php 
    echo word("Theme");
    ?>
:
			</td>
//.........这里部分代码省略.........
开发者ID:seanfbrown,项目名称:jinzora,代码行数:101,代码来源:usermanager.php



注:本文中的word函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP word_filter_add_ob_tags函数代码示例发布时间:2022-05-23
下一篇:
PHP woothemes_queue_update函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap