Exemple #1
0
UI::show_header();
/* Switch on action boys */
switch ($_REQUEST['action']) {
    /* This re-generates the config file comparing
     * /config/ampache.cfg to .cfg.dist
     */
    case 'generate_config':
        ob_end_clean();
        $current = parse_ini_file(AmpConfig::get('prefix') . '/config/ampache.cfg.php');
        $final = generate_config($current);
        $browser = new Horde_Browser();
        $browser->downloadHeaders('ampache.cfg.php', 'text/plain', false, filesize(AmpConfig::get('prefix') . '/config/ampache.cfg.php.dist'));
        echo $final;
        exit;
    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') . '/templates/show_debug.inc.php';
        break;
    default:
        // Rien a faire
        break;
}
// end switch
UI::show_footer();
Exemple #2
0
?>

<?php 
UI::show_box_top(T_('Ampache Update'), 'box');
?>
<div><?php 
echo T_('Installed Ampache version');
?>
: <?php 
echo AutoUpdate::get_current_version();
?>
.</div>
<div><?php 
echo T_('Latest Ampache version');
?>
: <?php 
echo AutoUpdate::get_latest_version();
?>
.</div>
<div><a href="<?php 
echo AmpConfig::get('web_path');
?>
/admin/system.php?action=show_debug&autoupdate=force"><?php 
echo T_('Force check');
?>
...</a></div>
<?php 
if (AutoUpdate::is_update_available()) {
    AutoUpdate::show_new_version();
}
UI::show_box_bottom();