Beispiel #1
0
function catalog_worker($action, $catalogs = null, $options = null)
{
    if (AmpConfig::get('ajax_load')) {
        $sse_url = AmpConfig::get('web_path') . "/server/sse.server.php?worker=catalog&action=" . $action . "&catalogs=" . urlencode(serialize($catalogs));
        if ($options) {
            $sse_url .= "&options=" . urlencode(serialize($_POST));
        }
        sse_worker($sse_url);
    } else {
        Catalog::process_action($action, $catalogs, $options);
    }
}
Beispiel #2
0
            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();