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


PHP show_confirmation函数代码示例

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


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

示例1: T_

            echo "<div class=\"error\" align=\"center\">" . T_('No Disabled songs found') . "</div>";
        }
        break;
    case 'show_delete_catalog':
        /* Stop the demo hippies */
        if (AmpConfig::get('demo_mode')) {
            UI::access_denied();
            break;
        }
        $catalog = Catalog::create_from_id($_REQUEST['catalog_id']);
        $nexturl = AmpConfig::get('web_path') . '/admin/catalog.php?action=delete_catalog&amp;catalog_id=' . scrub_out($_REQUEST['catalog_id']);
        show_confirmation(T_('Delete Catalog'), T_('Do you really want to delete this catalog?') . " -- {$catalog->name} ({$catalog->path})", $nexturl, 1);
        break;
    case 'show_customize_catalog':
        $catalog = Catalog::create_from_id($_REQUEST['catalog_id']);
        $catalog->format();
        require_once AmpConfig::get('prefix') . '/templates/show_edit_catalog.inc.php';
        break;
    case 'gather_media_art':
        $sse_url = AmpConfig::get('web_path') . "/server/sse.server.php?worker=catalog&action=gather_media_art&catalogs=" . $sse_catalogs;
        sse_worker($sse_url);
        show_confirmation(T_('Media Art Search started...'), '', AmpConfig::get('web_path') . '/admin/catalog.php', 0, 'confirmation', false);
        break;
    case 'show_catalogs':
    default:
        require_once AmpConfig::get('prefix') . '/templates/show_manage_catalogs.inc.php';
        break;
}
// end switch
/* Show the Footer */
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:catalog.php

示例2: scrub_out

     $user_id = $_REQUEST['user_id'];
     $next_url = AmpConfig::get('web_path') . '/admin/users.php?action=generate_apikey&user_id=' . scrub_out($user_id);
     show_confirmation(T_('Generate new API Key'), T_('Confirm API Key Generation'), $next_url, 1, 'generate_apikey');
     break;
 case 'generate_apikey':
     if (AmpConfig::get('demo_mode')) {
         break;
     }
     if (!Core::form_verify('generate_apikey', 'post')) {
         UI::access_denied();
         exit;
     }
     $client = new User($_REQUEST['user_id']);
     $client->generate_apikey();
     $next_url = AmpConfig::get('web_path') . '/admin/users.php';
     show_confirmation(T_('API Key Generated'), T_('New user API Key has been generated.'), $next_url);
     break;
     /* Show IP History for the Specified User */
 /* Show IP History for the Specified User */
 case 'show_ip_history':
     /* get the user and their history */
     $working_user = new User($_REQUEST['user_id']);
     if (!isset($_REQUEST['all'])) {
         $history = $working_user->get_ip_history(0, 1);
     } else {
         $history = $working_user->get_ip_history();
     }
     require AmpConfig::get('prefix') . '/templates/show_ip_history.inc.php';
     break;
 case 'show_add_user':
     if (AmpConfig::get('demo_mode')) {
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:users.php

示例3: T_

        $created = Channel::create($_REQUEST['name'], $_REQUEST['description'], $_REQUEST['url'], $_REQUEST['type'], $_REQUEST['id'], $_REQUEST['interface'], $_REQUEST['port'], $_REQUEST['admin_password'], $_REQUEST['private'] ?: 0, $_REQUEST['max_listeners'], $_REQUEST['random'] ?: 0, $_REQUEST['loop'] ?: 0, $_REQUEST['stream_type'], $_REQUEST['bitrate']);
        if (!$created) {
            require_once AmpConfig::get('prefix') . UI::find_template('show_add_channel.inc.php');
        } else {
            $title = T_('Channel Created');
            show_confirmation($title, $body, AmpConfig::get('web_path') . '/browse.php?action=channel');
        }
        UI::show_footer();
        exit;
    case 'show_delete':
        $id = $_REQUEST['id'];
        $next_url = AmpConfig::get('web_path') . '/channel.php?action=delete&id=' . scrub_out($id);
        show_confirmation(T_('Channel Delete'), T_('Confirm Deletion Request'), $next_url, 1, 'delete_channel');
        UI::show_footer();
        exit;
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            UI::access_denied();
            exit;
        }
        $id = $_REQUEST['id'];
        $channel = new Channel($id);
        if ($channel->delete()) {
            $next_url = AmpConfig::get('web_path') . '/browse.php?action=channel';
            show_confirmation(T_('Channel Deleted'), T_('The Channel has been deleted'), $next_url);
        }
        UI::show_footer();
        exit;
}
// switch on the action
UI::show_footer();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:channel.php

示例4: show_confirmation

     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();
     require_once AmpConfig::get('prefix') . UI::find_template('show_lyrics.inc.php');
     break;
 case 'show_song':
 default:
     $song = new Song($_REQUEST['song_id']);
     $song->format();
     $song->fill_ext_info();
     require_once AmpConfig::get('prefix') . UI::find_template('show_song.inc.php');
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:song.php

示例5: scrub_in

            UI::access_denied();
            exit;
        }
        $podcast_id = scrub_in($_REQUEST['podcast_id']);
        show_confirmation(T_('Podcast Deletion'), T_('Are you sure you want to delete this podcast?'), AmpConfig::get('web_path') . "/podcast.php?action=confirm_delete&podcast_id=" . $podcast_id, 1, 'delete_podcast');
        break;
    case 'confirm_delete':
        if (!Access::check('interface', 75) || AmpConfig::get('demo_mode')) {
            UI::access_denied();
            exit;
        }
        $podcast = new Podcast($_REQUEST['podcast_id']);
        if ($podcast->remove()) {
            show_confirmation(T_('Podcast Deletion'), T_('Podcast has been deleted.'), AmpConfig::get('web_path') . '/browse.php?action=podcast');
        } else {
            show_confirmation(T_('Podcast Deletion'), T_('Cannot delete this podcast.'), AmpConfig::get('web_path') . '/browse.php?action=podcast');
        }
        break;
    case 'show':
        $podcast_id = intval($_REQUEST['podcast']);
        if ($podcast_id > 0) {
            $podcast = new Podcast($podcast_id);
            $podcast->format();
            $object_ids = $podcast->get_episodes();
            $object_type = 'podcast_episode';
            require_once AmpConfig::get('prefix') . UI::find_template('show_podcast.inc.php');
        }
        break;
}
// end data collection
UI::show_footer();
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:podcast.php

示例6: switch

 */
require_once 'lib/init.php';
if (!AmpConfig::get('broadcast')) {
    UI::access_denied();
    exit;
}
UI::show_header();
/* Switch on the action passed in */
switch ($_REQUEST['action']) {
    case 'show_delete':
        $id = $_REQUEST['id'];
        $next_url = AmpConfig::get('web_path') . '/broadcast.php?action=delete&id=' . scrub_out($id);
        show_confirmation(T_('Broadcast Delete'), T_('Confirm Deletion Request'), $next_url, 1, 'delete_broadcast');
        UI::show_footer();
        exit;
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            UI::access_denied();
            exit;
        }
        $id = $_REQUEST['id'];
        $broadcast = new Broadcast($id);
        if ($broadcast->delete()) {
            $next_url = AmpConfig::get('web_path') . '/browse.php?action=broadcast';
            show_confirmation(T_('Broadcast Deleted'), T_('The Broadcast has been deleted'), $next_url);
        }
        UI::show_footer();
        exit;
}
// switch on the action
UI::show_footer();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:broadcast.php

示例7: scrub_out

        UI::show_header();
        $id = $_REQUEST['id'];
        $next_url = AmpConfig::get('web_path') . '/share.php?action=delete&id=' . scrub_out($id);
        show_confirmation(T_('Share Delete'), T_('Confirm Deletion Request'), $next_url, 1, 'delete_share');
        UI::show_footer();
        exit;
    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            UI::access_denied();
            exit;
        }
        UI::show_header();
        $id = $_REQUEST['id'];
        if (Share::delete_share($id)) {
            $next_url = AmpConfig::get('web_path') . '/stats.php?action=share';
            show_confirmation(T_('Share Deleted'), T_('The Share has been deleted'), $next_url);
        }
        UI::show_footer();
        exit;
}
/**
 * If Access Control is turned on then we don't
 * even want them to be able to get to the login
 * page if they aren't in the ACL
 */
if (AmpConfig::get('access_control')) {
    if (!Access::check_network('interface', '', '5')) {
        debug_event('UI::access_denied', 'Access Denied:' . $_SERVER['REMOTE_ADDR'] . ' is not in the Interface Access list', '3');
        UI::access_denied();
        exit;
    }
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:share.php

示例8: switch

                }
            }
        }
        $fullname = $GLOBALS['user']->fullname;
        $preferences = $GLOBALS['user']->get_preferences($_REQUEST['tab']);
        break;
    default:
        $fullname = $GLOBALS['user']->fullname;
        $preferences = $GLOBALS['user']->get_preferences($_REQUEST['tab']);
        break;
}
// End Switch Action
UI::show_header();
/**
 * switch on the view
 */
switch ($_REQUEST['action']) {
    case 'confirm':
    case 'grant':
        show_confirmation($title, $text, $next_url, $cancel);
        break;
    default:
        if (!empty($notification_text)) {
            display_notification($notification_text);
        }
        // Show the default preferences page
        require AmpConfig::get('prefix') . UI::find_template('show_preferences.inc.php');
        break;
}
// end switch on action
UI::show_footer();
开发者ID:ivan801,项目名称:ampache,代码行数:31,代码来源:preferences.php

示例9: scrub_in

    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $episode_id = scrub_in($_REQUEST['podcast_episode_id']);
        show_confirmation(T_('Podcast Episode Deletion'), T_('Are you sure you want to permanently delete this episode?'), AmpConfig::get('web_path') . "/podcast_episode.php?action=confirm_delete&podcast_episode_id=" . $episode_id, 1, 'delete_podcast_episode');
        break;
    case 'confirm_delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $episode = new Podcast_Episode($_REQUEST['podcast_episode_id']);
        if (!Catalog::can_remove($episode)) {
            debug_event('video', 'Unauthorized to remove the episode `.' . $episode->id . '`.', 1);
            UI::access_denied();
            exit;
        }
        if ($episode->remove()) {
            show_confirmation(T_('Podcast Episode Deletion'), T_('Episode has been deleted.'), AmpConfig::get('web_path'));
        } else {
            show_confirmation(T_('Podcast Episode Deletion'), T_('Cannot delete this episode.'), AmpConfig::get('web_path'));
        }
        break;
    case 'show':
    default:
        $episode = new Podcast_Episode($_REQUEST['podcast_episode']);
        $episode->format();
        require_once AmpConfig::get('prefix') . UI::find_template('show_podcast_episode.inc.php');
        break;
}
UI::show_footer();
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:podcast_episode.php

示例10: T_

         UI::access_denied();
         break;
     }
     // Show the create page
     require_once AmpConfig::get('prefix') . UI::find_template('show_create_democratic.inc.php');
     break;
 case 'delete':
     if (!Access::check('interface', '75')) {
         UI::access_denied();
         break;
     }
     Democratic::delete($_REQUEST['democratic_id']);
     $title = '';
     $text = T_('The Requested Playlist has been deleted.');
     $url = AmpConfig::get('web_path') . '/democratic.php?action=manage_playlists';
     show_confirmation($title, $text, $url);
     break;
 case 'create':
     // Only power users here
     if (!Access::check('interface', '75')) {
         UI::access_denied();
         break;
     }
     if (!Core::form_verify('create_democratic')) {
         UI::access_denied();
         exit;
     }
     $democratic = Democratic::get_current_playlist();
     // If we don't have anything currently create something
     if (!$democratic->id) {
         // Create the playlist
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:democratic.php

示例11: show_confirmation

    case 'reset_db_charset':
        Dba::reset_db_charset();
        show_confirmation(T_('Database Charset Updated'), T_('Your Database and associated tables have been updated to match your currently configured charset'), AmpConfig::get('web_path') . '/admin/system.php?action=show_debug');
        break;
    case 'show_debug':
        $configuration = AmpConfig::get_all();
        if ($_REQUEST['autoupdate'] == 'force') {
            $version = AutoUpdate::get_latest_version(true);
        }
        require_once AmpConfig::get('prefix') . UI::find_template('show_debug.inc.php');
        break;
    case 'clear_cache':
        switch ($_REQUEST['type']) {
            case 'song':
                Song::clear_cache();
                break;
            case 'artist':
                Artist::clear_cache();
                break;
            case 'album':
                Album::clear_cache();
                break;
        }
        show_confirmation(T_('Cache cleared'), T_('Your cache has been cleared successfully.'), AmpConfig::get('web_path') . '/admin/system.php?action=show_debug');
        break;
    default:
        // Rien a faire
        break;
}
// end switch
UI::show_footer();
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:system.php

示例12: switch

 * action switch
 */
switch ($_REQUEST['action']) {
    case 'search':
        $browse = new Browse();
        require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
        require_once AmpConfig::get('prefix') . '/templates/show_search_options.inc.php';
        $results = Search::run($_REQUEST);
        $browse->set_type($_REQUEST['type']);
        $browse->show_objects($results);
        $browse->store();
        break;
    case 'save_as_track':
        $playlist_id = save_search($_REQUEST);
        $playlist = new Playlist($playlist_id);
        show_confirmation(T_('Search Saved'), sprintf(T_('Your Search has been saved as a track in %s'), $playlist->name), AmpConfig::get('web_path') . "/search.php");
        break;
    case 'save_as_smartplaylist':
        $playlist = new Search();
        $playlist->parse_rules(Search::clean_request($_REQUEST));
        $playlist->save();
        break;
    case 'descriptor':
        // This is a little special we don't want header/footers so trash what we've got in the OB
        ob_clean();
        require_once AmpConfig::get('prefix') . '/templates/show_search_descriptor.inc.php';
        exit;
    default:
        require_once AmpConfig::get('prefix') . '/templates/show_search.inc.php';
        break;
}
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:search.php

示例13: scrub_in

    case 'delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $video_id = scrub_in($_REQUEST['video_id']);
        show_confirmation(T_('Video Deletion'), T_('Are you sure you want to permanently delete this video?'), AmpConfig::get('web_path') . "/video.php?action=confirm_delete&video_id=" . $video_id, 1, 'delete_video');
        break;
    case 'confirm_delete':
        if (AmpConfig::get('demo_mode')) {
            break;
        }
        $video = Video::create_from_id($_REQUEST['video_id']);
        if (!Catalog::can_remove($video)) {
            debug_event('video', 'Unauthorized to remove the video `.' . $video->id . '`.', 1);
            UI::access_denied();
            exit;
        }
        if ($video->remove_from_disk()) {
            show_confirmation(T_('Video Deletion'), T_('Video has been deleted.'), AmpConfig::get('web_path'));
        } else {
            show_confirmation(T_('Video Deletion'), T_('Cannot delete this video.'), AmpConfig::get('web_path'));
        }
        break;
    case 'show_video':
    default:
        $video = Video::create_from_id($_REQUEST['video_id']);
        $video->format();
        require_once AmpConfig::get('prefix') . '/templates/show_video.inc.php';
        break;
}
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:video.php

示例14: show_confirmation

     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);
     } else {
         $object_ids = $artist->get_albums($_REQUEST['catalog']);
     }
     $object_type = 'album';
     require_once AmpConfig::get('prefix') . '/templates/show_artist.inc.php';
     break;
 case 'show_all_songs':
     $artist = new Artist($_REQUEST['artist']);
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:artists.php

示例15: rawurlencode

            $results = Search::run($_REQUEST);
            $browse->set_type($_REQUEST['type']);
            $browse->show_objects($results);
            $browse->store();
        } else {
            $wartists = Wanted::search_missing_artists($_REQUEST['rule_1_input']);
            require_once AmpConfig::get('prefix') . '/templates/show_missing_artists.inc.php';
            echo '<a href="http://musicbrainz.org/search?query=' . rawurlencode($_REQUEST['rule_1_input']) . '&type=artist&method=indexed" target="_blank">' . T_('View on MusicBrainz') . '</a><br />';
        }
        break;
    case 'save_as_smartplaylist':
        if (!Access::check('interface', 25)) {
            UI::access_denied();
            exit;
        }
        $playlist = new Search();
        $playlist->parse_rules(Search::clean_request($_REQUEST));
        $playlist->save();
        show_confirmation(T_('Search Saved'), sprintf(T_('Your Search has been saved as a Smart Playlist with name %s'), $playlist->name), AmpConfig::get('web_path') . "/browse.php?action=smartplaylist");
        break;
    case 'descriptor':
        // This is a little special we don't want header/footers so trash what we've got in the OB
        ob_clean();
        require_once AmpConfig::get('prefix') . '/templates/show_search_descriptor.inc.php';
        exit;
    default:
        require_once AmpConfig::get('prefix') . '/templates/show_search_form.inc.php';
        break;
}
/* Show the Footer */
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:search.php


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