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

PHP Art类代码示例

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

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



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

示例1: getList

 function getList($email)
 {
     $this->db->query($this->table, ["*"], array("email" => $email));
     $r = array();
     while ($row = $this->db->getRow()) {
         $art = new Art();
         $art->set($row);
         $r[] = $art;
     }
     return $r;
 }
开发者ID:davidgamarra,项目名称:DWESI_Practice5_ArtGallery,代码行数:11,代码来源:ManageArt.php


示例2: array

         $results[] = array('type' => T_('Playlists'), 'link' => $playlist->link, 'label' => $playlist->name, 'value' => $playlist->name, 'rels' => '', 'image' => '');
     }
 }
 if (($target == 'anywhere' || $target == 'label') && AmpConfig::get('label')) {
     $searchreq = array('limit' => $limit, 'type' => 'label', 'rule_1_input' => $search, 'rule_1_operator' => '2', 'rule_1' => 'name');
     $sres = Search::run($searchreq);
     // Litmit not reach, new search with another operator
     if (count($sres) < $limit) {
         $searchreq['limit'] = $limit - count($sres);
         $searchreq['rule_1_operator'] = '0';
         $sres = array_unique(array_merge($sres, Search::run($searchreq)));
     }
     foreach ($sres as $id) {
         $label = new Label($id);
         $label->format(false);
         $results[] = array('type' => T_('Labels'), 'link' => $label->link, 'label' => $label->name, 'value' => $label->name, 'rels' => '', 'image' => Art::url($label->id, 'label', null, 10));
     }
 }
 if ($target == 'missing_artist' && AmpConfig::get('wanted')) {
     $sres = Wanted::search_missing_artists($search);
     $i = 0;
     foreach ($sres as $r) {
         $results[] = array('type' => T_('Missing Artists'), 'link' => AmpConfig::get('web_path') . '/artists.php?action=show_missing&mbid=' . $r['mbid'], 'label' => $r['name'], 'value' => $r['name'], 'rels' => '', 'image' => '');
         $i++;
         if ($i >= $limit) {
             break;
         }
     }
 }
 if ($target == 'user' && AmpConfig::get('sociable')) {
     $searchreq = array('limit' => $limit, 'type' => 'user', 'rule_1_input' => $search, 'rule_1_operator' => '2', 'rule_1' => 'username');
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:search.ajax.php


示例3: T_

    echo $thcount;
    ?>
"><span class="nodata"><?php 
    echo T_('No podcast found');
    ?>
</span></td>
        </tr>
        <?php 
}
?>
    </tbody>
    <tfoot>
        <tr class="th-bottom">
            <th class="cel_play"></th>
        <?php 
if (Art::is_enabled()) {
    ?>
            <th class="cel_cover"><?php 
    echo T_('Art');
    ?>
</th>
        <?php 
}
?>
            <th class="cel_title"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=title', T_('Title'), 'podcast_sort_title_bottom');
?>
</th>
            <th class="cel_episodes"><?php 
echo T_('Episodes');
?>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_podcasts.inc.php


示例4: insert_from_file

 /**
  * This insert art from file on disk.
  * @param string $filepath
  */
 public function insert_from_file($filepath)
 {
     debug_event('art', 'Insert art from file on disk ' . $filepath, '5');
     $image = Art::get_from_source(array('file' => $filepath), $this->type);
     $rfile = pathinfo($filepath);
     $mime = "image/" . $rfile['extension'];
     $this->insert($image, $mime);
 }
开发者ID:cheese1,项目名称:ampache,代码行数:12,代码来源:art.class.php


示例5: ob_start

             $key = 'live_stream_' . $radio->id;
             break;
         default:
             exit;
     }
     // end switch on type
     $results[$key] = '';
     break;
 case 'page':
     $browse->set_start($_REQUEST['start']);
     ob_start();
     $browse->show_objects(null, $argument);
     $results[$browse->get_content_div()] = ob_get_clean();
     break;
 case 'show_art':
     Art::set_enabled();
     ob_start();
     $browse->show_objects(null, $argument);
     $results[$browse->get_content_div()] = ob_get_clean();
     break;
 case 'get_filters':
     ob_start();
     require_once AmpConfig::get('prefix') . '/templates/browse_filters.inc.php';
     $results['browse_filters'] = ob_get_clean();
     break;
 case 'options':
     $option = $_REQUEST['option'];
     $value = $_REQUEST['value'];
     switch ($option) {
         case 'use_pages':
             $value = $value == 'true';
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:browse.ajax.php


示例6: getcoverart

 /**
  * getCoverArt
  * Get a cover art image.
  * Takes the cover art id in parameter.
  */
 public static function getcoverart($input)
 {
     self::check_version($input, "1.0.0", true);
     $id = self::check_parameter($input, 'id', true);
     $size = $input['size'];
     $art = null;
     if (Subsonic_XML_Data::isArtist($id)) {
         $art = new Art(Subsonic_XML_Data::getAmpacheId($id), "artist");
     } elseif (Subsonic_XML_Data::isAlbum($id)) {
         $art = new Art(Subsonic_XML_Data::getAmpacheId($id), "album");
     } elseif (Subsonic_XML_Data::isSong($id)) {
         $art = new Art(Subsonic_XML_Data::getAmpacheId($id), "song");
         if ($art != null && $art->id == null) {
             // in most cases the song doesn't have a picture, but the album where it belongs to has
             // if this is the case, we take the album art
             $song = new Song(Subsonic_XML_Data::getAmpacheId(Subsonic_XML_Data::getAmpacheId($id)));
             $art = new Art(Subsonic_XML_Data::getAmpacheId($song->album), "album");
         }
     } elseif (Subsonic_XML_Data::isPodcast($id)) {
         $art = new Art(Subsonic_XML_Data::getAmpacheId($id), "podcast");
     }
     header("Access-Control-Allow-Origin: *");
     if ($art != null) {
         $art->get_db();
         if ($size && AmpConfig::get('resize_images')) {
             $dim = array();
             $dim['width'] = $size;
             $dim['height'] = $size;
             $thumb = $art->get_thumb($dim);
             if ($thumb) {
                 header('Content-type: ' . $thumb['thumb_mime']);
                 header('Content-Length: ' . strlen($thumb['thumb']));
                 echo $thumb['thumb'];
                 return;
             }
         }
         header('Content-type: ' . $art->raw_mime);
         header('Content-Length: ' . strlen($art->raw));
         echo $art->raw;
     }
 }
开发者ID:bl00m,项目名称:ampache,代码行数:46,代码来源:subsonic_api.class.php


示例7: T_

        echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&append=true', 'play_add', T_('Play last'), 'addplay_artist_' . $libitem->id);
        if (Stream_Playlist::check_autoplay_next()) {
            echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_artist_' . $libitem->id);
        }
    }
}
?>
    </div>
</td>
<?php 
if (Art::is_enabled()) {
    $name = scrub_out($libitem->full_name);
    ?>
<td class="cel_cover">
    <?php 
    Art::display('artist', $libitem->id, $name, 1, AmpConfig::get('web_path') . '/artists.php?action=show&artist=' . $libitem->id);
    ?>
</td>
<?php 
}
?>
<td class="cel_artist"><?php 
echo $libitem->f_link;
?>
</td>
<td class="cel_add">
    <span class="cel_item_add">
    <?php 
if ($show_playlist_add) {
    echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id, 'add', T_('Add to temporary playlist'), 'add_artist_' . $libitem->id);
    echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id, 'random', T_('Random to temporary playlist'), 'random_artist_' . $libitem->id);
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_artist_row.inc.php


示例8:

    }
}
?>
    </div>
</td>
<?php 
if (Art::is_enabled()) {
    ?>
<td class="cel_cover">
    <?php 
    $art_showed = false;
    if ($libitem->get_default_art_kind() == 'preview') {
        $art_showed = Art::display('video', $libitem->id, $libitem->f_title, 9, $libitem->link, false, 'preview');
    }
    if (!$art_showed) {
        Art::display('video', $libitem->id, $libitem->f_title, 6, $libitem->link);
    }
    ?>
</td>
<?php 
}
?>
<td class="cel_title"><?php 
echo $libitem->f_link;
?>
</td>
<?php 
if ($video_type != 'video') {
    require AmpConfig::get('prefix') . '/templates/show_partial_' . $video_type . '_row.inc.php';
}
?>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_video_row.inc.php


示例9: insert_local_video

 /**
  * insert_local_video
  * This inserts a video file into the video file table the tag
  * information we can get is super sketchy so it's kind of a crap shoot
  * here
  */
 public function insert_local_video($file, $options = array())
 {
     /* Create the vainfo object and get info */
     $gtypes = $this->get_gather_types('video');
     $vainfo = new vainfo($file, $gtypes, '', '', '', $this->sort_pattern, $this->rename_pattern);
     $vainfo->get_info();
     $tag_name = vainfo::get_tag_type($vainfo->tags, 'metadata_order_video');
     $results = vainfo::clean_tag_info($vainfo->tags, $tag_name, $file);
     $results['catalog'] = $this->id;
     $id = Video::insert($results, $gtypes, $options);
     if ($results['art']) {
         $art = new Art($id, 'video');
         $art->insert_url($results['art']);
         if (AmpConfig::get('generate_video_preview')) {
             Video::generate_preview($id);
         }
     } else {
         $this->added_videos_to_gather[] = $id;
     }
     $this->_filecache[strtolower($file)] = 'v_' . $id;
     return $id;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:28,代码来源:local.catalog.php


示例10: delete_avatar

 public function delete_avatar()
 {
     $art = new Art($this->id, 'user');
     $art->reset();
 }
开发者ID:bl00m,项目名称:ampache,代码行数:5,代码来源:user.class.php


示例11: library_metadata

 public static function library_metadata($params)
 {
     $r = Plex_XML_Data::createLibContainer();
     $n = count($params);
     $litem = null;
     $createMode = $_SERVER['REQUEST_METHOD'] == 'POST';
     $editMode = $_SERVER['REQUEST_METHOD'] == 'PUT';
     if ($n > 0) {
         $key = $params[0];
         $id = Plex_XML_Data::getAmpacheId($key);
         if ($editMode) {
             self::check_access(50);
         }
         if ($n == 1) {
             // Should we check that files still exists here?
             $checkFiles = $_REQUEST['checkFiles'];
             $extra = $_REQUEST['includeExtra'];
             if (Plex_XML_Data::isArtist($key)) {
                 $litem = new Artist($id);
                 $litem->format();
                 if ($editMode) {
                     $dmap = array('title' => 'name', 'summary' => null);
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 Plex_XML_Data::addArtist($r, $litem);
             } elseif (Plex_XML_Data::isAlbum($key)) {
                 $litem = new Album($id);
                 $litem->format();
                 if ($editMode) {
                     $dmap = array('title' => 'name', 'year' => null);
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 Plex_XML_Data::addAlbum($r, $litem);
             } elseif (Plex_XML_Data::isTrack($key)) {
                 $litem = new Song($id);
                 $litem->format();
                 if ($editMode) {
                     $dmap = array('title' => null);
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 Plex_XML_Data::addSong($r, $litem);
             } elseif (Plex_XML_Data::isTVShow($key)) {
                 $litem = new TVShow($id);
                 $litem->format();
                 if ($editMode) {
                     $dmap = array('title' => 'name', 'year' => null, 'summary' => null);
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 Plex_XML_Data::addTVShow($r, $litem);
             } elseif (Plex_XML_Data::isTVShowSeason($key)) {
                 $litem = new TVShow_Season($id);
                 $litem->format();
                 Plex_XML_Data::addTVShowSeason($r, $litem);
             } elseif (Plex_XML_Data::isVideo($key)) {
                 $litem = Video::create_from_id($id);
                 if ($editMode) {
                     $dmap = array('title' => null, 'year' => null, 'originallyAvailableAt' => 'release_date', 'originalTitle' => 'original_name', 'summary' => null);
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 $litem->format();
                 $subtype = strtolower(get_class($litem));
                 if ($subtype == 'tvshow_episode') {
                     Plex_XML_Data::addEpisode($r, $litem, true);
                 } elseif ($subtype == 'movie') {
                     Plex_XML_Data::addMovie($r, $litem, true);
                 }
             } elseif (Plex_XML_Data::isPlaylist($key)) {
                 $litem = new Playlist($id);
                 $litem->format();
                 if ($editMode) {
                     $dmap = array('title' => 'name');
                     $litem->update(self::get_data_from_map($dmap));
                 }
                 Plex_XML_Data::addPlaylist($r, $litem);
             }
         } else {
             $subact = $params[1];
             if ($subact == "children") {
                 if (Plex_XML_Data::isArtist($key)) {
                     $litem = new Artist($id);
                     $litem->format();
                     Plex_XML_Data::setArtistRoot($r, $litem);
                 } else {
                     if (Plex_XML_Data::isAlbum($key)) {
                         $litem = new Album($id);
                         $litem->format();
                         Plex_XML_Data::setAlbumRoot($r, $litem);
                     } else {
                         if (Plex_XML_Data::isTVShow($key)) {
                             $litem = new TVShow($id);
                             $litem->format();
                             Plex_XML_Data::setTVShowRoot($r, $litem);
                         } else {
                             if (Plex_XML_Data::isTVShowSeason($key)) {
                                 $litem = new TVShow_Season($id);
                                 $litem->format();
                                 Plex_XML_Data::setTVShowSeasonRoot($r, $litem);
                             }
                         }
                     }
//.........这里部分代码省略.........
开发者ID:cheese1,项目名称:ampache,代码行数:101,代码来源:plex_api.class.php


示例12: load_latest_shout

 /**
  * load_latest_shout
  * This loads in the latest added shouts
  * @return array
  */
 public static function load_latest_shout()
 {
     $ids = Shoutbox::get_top(10);
     $results = array();
     foreach ($ids as $id) {
         $shout = new Shoutbox($id);
         $shout->format();
         $object = Shoutbox::get_object($shout->object_type, $shout->object_id);
         $object->format();
         $user = new User($shout->user);
         $user->format();
         $xml_array = array('title' => $user->username . ' ' . T_('on') . ' ' . $object->get_fullname(), 'link' => $object->link, 'description' => $shout->text, 'image' => Art::url($shout->object_id, $shout->object_type, null, 2), 'comments' => '', 'pubDate' => date("c", $shout->date));
         $results[] = $xml_array;
     }
     // end foreach
     return $results;
 }
开发者ID:nioc,项目名称:ampache,代码行数:22,代码来源:ampache_rss.class.php


示例13: Browse

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
$web_path = AmpConfig::get('web_path');
$browse = new Browse();
$browse->set_type($object_type);
UI::show_box_top($tvshow->f_name, 'info-box');
?>
<div class="item_right_info">
    <?php 
Art::display('tvshow', $tvshow->id, $tvshow->f_name, 6);
?>
    <?php 
if ($tvshow->summary) {
    ?>
    <div id="item_summary">
        <?php 
    echo $tvshow->summary;
    ?>
    </div>
    <?php 
}
?>
</div>
<?php 
if (User::is_registered()) {
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tvshow.inc.php


示例14: scrub_out

 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
$web_path = AmpConfig::get('web_path');
// Title for this album
$title = scrub_out($walbum->name) . '&nbsp;(' . $walbum->year . ')';
$title .= '&nbsp;-&nbsp;' . $walbum->f_artist_link;
UI::show_box_top($title, 'info-box missing');
?>
<div class="item_art">
<?php 
// Attempt to find the art.
$art = new Art($walbum->mbid, 'album');
$options['artist'] = $artist->name;
$options['album_name'] = $walbum->name;
$options['keyword'] = $artist->name . " " . $walbum->name;
$images = $art->gather($options, '1');
if (count($images) > 0 && !empty($images[0]['url'])) {
    $name = '[' . $artist->name . '] ' . scrub_out($walbum->name);
    $image = $images[0]['url'];
    echo "<a href=\"" . $image . "\" rel=\"prettyPhoto\">";
    echo "<img src=\"" . $image . "\" alt=\"" . $name . "\" alt=\"" . $name . "\" height=\"128\" width=\"128\" />";
    echo "</a>\n";
}
?>
</div>
<div id="information_actions">
<h3><?php 
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_missing_album.inc.php


示例15: display

 /**
  * Display an item art.
  * @param string $object_type
  * @param int $object_id
  * @param string $name
  * @param int $thumb
  * @param string $link
  * @param boolean $show_default
  * @param string $kind
  * @return boolean
  */
 public static function display($object_type, $object_id, $name, $thumb, $link = null, $show_default = true, $kind = 'default')
 {
     if (!self::is_valid_type($object_type)) {
         return false;
     }
     if (!$show_default) {
         // Don't show any image if not available
         if (!self::has_db($object_id, $object_type, $kind)) {
             return false;
         }
     }
     $size = self::get_thumb_size($thumb);
     $prettyPhoto = $link == null;
     if ($link == null) {
         $link = AmpConfig::get('web_path') . "/image.php?object_id=" . $object_id . "&object_type=" . $object_type;
         if (AmpConfig::get('use_auth') && AmpConfig::get('require_session')) {
             $link .= "&auth=" . session_id();
         }
         if ($kind != 'default') {
             $link .= '&kind=' . $kind;
         }
     }
     echo "<div class=\"item_art\">";
     echo "<a href=\"" . $link . "\" title=\"" . $name . "\"";
     if ($prettyPhoto) {
         echo " rel=\"prettyPhoto\"";
     }
     echo ">";
     $imgurl = AmpConfig::get('web_path') . "/image.php?object_id=" . $object_id . "&object_type=" . $object_type . "&thumb=" . $thumb;
     if ($kind != 'default') {
         $imgurl .= '&kind=' . $kind;
     }
     // This to keep browser cache feature but force a refresh in case image just changed
     if (Art::has_db($object_id, $object_type)) {
         $art = new Art($object_id, $object_type);
         if ($art->get_db()) {
             $imgurl .= '&fooid=' . $art->id;
         }
     }
     echo "<img src=\"" . $imgurl . "\" alt=\"" . $name . "\" height=\"" . $size['height'] . "\" width=\"" . $size['width'] . "\" />";
     if ($size['height'] > 150) {
         echo "<div class=\"item_art_play\">";
         echo Ajax::text('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $object_id . '\' + getPagePlaySettings() + \'', '<span class="item_art_play_icon" title="' . T_('Play') . '" />', 'directplay_art_' . $object_type . '_' . $object_id);
         echo "</div>";
     }
     if ($prettyPhoto) {
         $libitem = new $object_type($object_id);
         echo "<div class=\"item_art_actions\">";
         if ($GLOBALS['user']->has_access(50) || $GLOBALS['user']->has_access(25) && $GLOBALS['user']->id == $libitem->get_user_owner()) {
             echo "<a href=\"javascript:NavigateTo('" . AmpConfig::get('web_path') . "/arts.php?action=find_art&object_type=" . $object_type . "&object_id=" . $object_id . "&burl=' + getCurrentPage());\">";
             echo UI::get_icon('edit', T_('Edit/Find Art'));
             echo "</a>";
             echo "<a href=\"javascript:NavigateTo('" . AmpConfig::get('web_path') . "/arts.php?action=clear_art&object_type=" . $object_type . "&object_id=" . $object_id . "&burl=' + getCurrentPage());\" onclick=\"return confirm('" . T_('Do you really want to reset art?') . "');\">";
             echo UI::get_icon('delete', T_('Reset Art'));
             echo "</a>";
         }
         echo "</div>";
     }
     echo "</a>\n";
     echo "</div>";
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:73,代码来源:art.class.php


示例16: count

 */
// Gotta do some math here!
$total_images = count($images);
$rows = floor($total_images / 4);
$i = 0;
UI::show_box_top(T_('Select New Album Art'), 'box box_album_art');
?>
<table class="table-data">
<tr>
<?php 
while ($i <= $rows) {
    $j = 0;
    while ($j < 4) {
        $key = $i * 4 + $j;
        $image_url = AmpConfig::get('web_path') . '/image.php?type=session&amp;image_index=' . $key;
        $dimensions = Core::image_dimensions(Art::get_from_source($_SESSION['form']['images'][$key], 'album'));
        if (!isset($images[$key])) {
            echo "<td>&nbsp;</td>\n";
        } else {
            ?>
            <td align="center">
                <a href="<?php 
            echo $image_url;
            ?>
" rel="prettyPhoto" target="_blank"><img src="<?php 
            echo $image_url;
            ?>
" alt="<?php 
            echo T_('Album Art');
            ?>
" border="0" height="175" width="175" /></a>
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:show_album_art.inc.php


示例17: scrub_in

            require_once AmpConfig::get('prefix') . UI::find_template('show_big_art.inc.php');
            break;
        case 'session':
            // If we need to pull the data out of the session
            Session::check();
            $filename = scrub_in($_REQUEST['image_index']);
            $image = Art::get_from_source($_SESSION['form']['images'][$filename], 'album');
            $mime = $_SESSION['form']['images'][$filename]['mime'];
            $typeManaged = true;
            break;
    }
}
if (!$typeManaged) {
    $item = new $type($_GET['object_id']);
    $filename = $item->name ?: $item->title;
    $art = new Art($item->id, $type, $kind);
    $art->get_db();
    $etag = $art->id;
    // That means the client has a cached version of the image
    $reqheaders = getallheaders();
    if (isset($reqheaders['If-Modified-Since']) && isset($reqheaders['If-None-Match'])) {
        $ccontrol = $reqheaders['Cache-Control'];
        if ($ccontrol != 'no-cache') {
            $cetagf = explode('-', $reqheaders['If-None-Match']);
            $cetag = $cetagf[0];
            // Same image than the cached one? Use the cache.
            if ($cetag == $etag) {
                header('HTTP/1.1 304 Not Modified');
                exit;
            }
        }
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:image.php


示例18:

            <?php 
    echo $media->f_tags;
    ?>
        </div>
    <?php 
}
?>
</div>

<?php 
if (Art::is_enabled()) {
    ?>
<div class="np_group" id="np_group_3">
  <div class="np_cell cel_albumart">
      <?php 
    Art::display('album', $media->album, $media->get_fullname(), 1, AmpConfig::get('web_path') . '/albums.php?action=show&album=' . $media->album);
    ?>
  </div>
</div>
<?php 
}
?>

<?php 
if (AmpConfig::get('show_similar')) {
    ?>
<div class="np_group similars" id="similar_items_<?php 
    echo $media->id;
    ?>
">
    <div class="np_group similars">
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_now_playing_row.inc.php


示例19: display_art

 public function display_art($thumb = 2)
 {
     $id = null;
     $type = null;
     if (Art::has_db($this->id, 'video')) {
         $id = $this->id;
         $type = 'video';
     } else {
         if (Art::has_db($this->season, 'tvshow_season')) {
             $id = $this->season;
             $type = 'tvshow_season';
         } else {
             $season = new TVShow_Season($this->season);
             if (Art::has_db($season->tvshow, 'tvshow')) {
                 $id = $season->tvshow;
                 $type = 'tvshow';
             }
         }
     }
     if ($id !== null && $type !== null) {
         Art::display($type, $id, $this->get_fullname(), $thumb, $this->link);
     }
 }
开发者ID:nioc,项目名称:ampache,代码行数:23,代码来源:tvshow_episode.class.php


示例20: show_confirmation

            // Store the results for further use
            $_SESSION['form']['images'] = $images;
            require_once AmpConfig::get('prefix') . '/templates/show_arts.inc.php';
        } else {
            show_confirmation(T_('Art Not Located'), T_('Art could not be located at this time. This may be due to write access error, or the file is not received correctly.'), $burl);
        }
        require_once AmpConfig::get('prefix') . '/templates/show_get_art.inc.php';
        break;
    case 'select_art':
        /* Check to see if we have the image url still */
        $image_id = $_REQUEST['image'];
        // Prevent the script from timing out
        set_time_limit(0);
        $image = Art::get_from_source($_SESSION['form']['images'][$image_id], 'album');
        $mime = $_SESSION['form']['images'][$image_id]['mime'];
        // Special case for albums, I'm not sure if we should keep it, remove it or find a generic way
        if ($object_type == 'album') {
            $album = new $object_type($object_id);
            $album_groups = $album->get_group_disks_ids();
            foreach ($album_groups as $a_id) {
                $art = new Art($a_id, $object_type);
                $art->insert($image, $mime);
            }
        } else {
            $art = new Art($object_id, $object_type);
            $art->insert($image, $mime);
        }
        header("Location:" . $burl);
        break;
}
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:arts.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP ArtefactType类代码示例发布时间:2022-05-23
下一篇:
PHP Arrays类代码示例发布时间: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