当前位置: 首页>>代码示例>>PHP>>正文


PHP Catalog::can_remove方法代码示例

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


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

示例1: T_

    echo $libitem->id;
    ?>
', '<?php 
    echo 'edit_tvshow_season_' . $libitem->id;
    ?>
', '<?php 
    echo T_('Season edit');
    ?>
', 'tvshow_season_')">
        <?php 
    echo UI::get_icon('edit', T_('Edit'));
    ?>
    </a>
    <?php 
}
if (Catalog::can_remove($libitem)) {
    ?>
    <a id="<?php 
    echo 'delete_tvshow_season_' . $libitem->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/tvshow_seasons.php?action=delete&tvshow_season_id=<?php 
    echo $libitem->id;
    ?>
">
        <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
    </a>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_tvshow_season_row.inc.php

示例2: T_

    echo 'edit_tvshow_season_' . $season->id;
    ?>
', '<?php 
    echo T_('Season edit');
    ?>
', '')">
                <?php 
    echo T_('Edit Season');
    ?>
            </a>
        </li>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($season)) {
    ?>
        <li>
            <a id="<?php 
    echo 'delete_tvshow_season_' . $season->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/tvshow_seasons.php?action=delete&tvshow_season_id=<?php 
    echo $season->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tvshow_season.inc.php

示例3: switch

UI::show_header();
// Switch on Action
switch ($_REQUEST['action']) {
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $song_id = scrub_in($_REQUEST['song_id']);
        show_confirmation(T_('Song Deletion'), T_('Are you sure you want to permanently delete this song?'), AmpConfig::get('web_path') . "/song.php?action=confirm_delete&song_id=" . $song_id, 1, 'delete_song');
        break;
    case 'confirm_delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $song = new Song($_REQUEST['song_id']);
        if (!Catalog::can_remove($song)) {
            debug_event('song', 'Unauthorized to remove the song `.' . $song->id . '`.', 1);
            UI::access_denied();
            exit;
        }
        if ($song->remove_from_disk()) {
            show_confirmation(T_('Song Deletion'), T_('Song has been deleted.'), AmpConfig::get('web_path'));
        } else {
            show_confirmation(T_('Song Deletion'), T_('Cannot delete this song.'), AmpConfig::get('web_path'));
        }
        break;
    case 'show_lyrics':
        $song = new Song($_REQUEST['song_id']);
        $song->format();
        $song->fill_ext_info();
        $lyrics = $song->get_lyrics();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:song.php

示例4: T_

    echo 'edit_tvshow_' . $tvshow->id;
    ?>
', '<?php 
    echo T_('TV Show edit');
    ?>
', '')">
                <?php 
    echo T_('Edit TV Show');
    ?>
            </a>
        </li>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($tvshow)) {
    ?>
        <li>
            <a id="<?php 
    echo 'delete_tvshow_' . $tvshow->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/tvshows.php?action=delete&tvshow_id=<?php 
    echo $tvshow->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_tvshow.inc.php

示例5: T_

    echo 'edit_label_' . $label->id;
    ?>
', '<?php 
    echo T_('Label edit');
    ?>
', '')">
                <?php 
    echo T_('Edit Label');
    ?>
            </a>
        </li>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($label)) {
    ?>
        <li>
            <a id="<?php 
    echo 'delete_label_' . $label->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/labels.php?action=delete&label_id=<?php 
    echo $label->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_label.inc.php

示例6: switch

 * Display Switch
 */
switch ($_REQUEST['action']) {
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $tvshow_season_id = scrub_in($_REQUEST['tvshow_season_id']);
        show_confirmation(T_('TVShow Season Deletion'), T_('Are you sure you want to permanently delete this tvshow season?'), AmpConfig::get('web_path') . "/tvshow_seasons.php?action=confirm_delete&tvshow_season_id=" . $tvshow_season_id, 1, 'delete_tvshow_season');
        break;
    case 'confirm_delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $tvshow_season = new TVShow_Season($_REQUEST['tvshow_season_id']);
        if (!Catalog::can_remove($tvshow_season)) {
            debug_event('tvshow_season', 'Unauthorized to remove the tvshow `.' . $tvshow_season->id . '`.', 1);
            UI::access_denied();
            exit;
        }
        if ($tvshow_season->remove_from_disk()) {
            show_confirmation(T_('TVShow Season Deletion'), T_('TVShow Season has been deleted.'), AmpConfig::get('web_path'));
        } else {
            show_confirmation(T_('TVShow Season Deletion'), T_('Cannot delete this tvshow season.'), AmpConfig::get('web_path'));
        }
        break;
    case 'show':
        $season = new TVShow_Season($_REQUEST['season']);
        $season->format();
        $object_ids = $season->get_episodes();
        $object_type = 'tvshow_episode';
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:tvshow_seasons.php

示例7: T_

', '<?php 
    echo 'edit_video_' . $video->id;
    ?>
', '<?php 
    echo T_('Edit');
    ?>
', '')">
                <?php 
    echo UI::get_icon('edit', T_('Edit'));
    ?>
            </a>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($video)) {
    ?>
            <a id="<?php 
    echo 'delete_video_' . $video->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/video.php?action=delete&video_id=<?php 
    echo $video->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
            </a>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_video.inc.php

示例8: switch

 * Display Switch
 */
switch ($_REQUEST['action']) {
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $artist_id = scrub_in($_REQUEST['artist_id']);
        show_confirmation(T_('Artist Deletion'), T_('Are you sure you want to permanently delete this artist?'), AmpConfig::get('web_path') . "/artists.php?action=confirm_delete&artist_id=" . $artist_id, 1, 'delete_artist');
        break;
    case 'confirm_delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $artist = new Artist($_REQUEST['artist_id']);
        if (!Catalog::can_remove($artist)) {
            debug_event('artist', 'Unauthorized to remove the artist `.' . $artist->id . '`.', 1);
            UI::access_denied();
            exit;
        }
        if ($artist->remove_from_disk()) {
            show_confirmation(T_('Artist Deletion'), T_('Artist has been deleted.'), AmpConfig::get('web_path'));
        } else {
            show_confirmation(T_('Artist Deletion'), T_('Cannot delete this artist.'), AmpConfig::get('web_path'));
        }
        break;
    case 'show':
        $artist = new Artist($_REQUEST['artist']);
        $artist->format();
        if (AmpConfig::get('album_release_type')) {
            $multi_object_ids = $artist->get_albums($_REQUEST['catalog'], false, true);
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:artists.php

示例9: T_

            <a rel="nohtml" href="<?php 
    echo $web_path;
    ?>
/batch.php?action=album&<?php 
    echo $album->get_http_album_query_ids('id');
    ?>
"><?php 
    echo T_('Download');
    ?>
</a>
        </li>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($album)) {
    ?>
        <li>
            <a id="<?php 
    echo 'delete_album_' . $album->id;
    ?>
" href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/albums.php?action=delete&album_id=<?php 
    echo $album->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_album.inc.php

示例10: T_

', '<?php 
    echo 'edit_podcast_episode_' . $episode->id;
    ?>
', '<?php 
    echo T_('Edit');
    ?>
', '')">
                <?php 
    echo UI::get_icon('edit', T_('Edit'));
    ?>
            </a>
        <?php 
}
?>
        <?php 
if (Catalog::can_remove($episode)) {
    ?>
            <a href="<?php 
    echo AmpConfig::get('web_path');
    ?>
/podcast_episode.php?action=delete&podcast_episode_id=<?php 
    echo $episode->id;
    ?>
">
                <?php 
    echo UI::get_icon('delete', T_('Delete'));
    ?>
            </a>
        <?php 
}
?>
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_podcast_episode.inc.php


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