示例#1
0
    // We need this stuff
    define('NO_SESSION', 1);
    define('OUTDATED_DATABASE_OK', 1);
}
require_once 'lib/init.php';
// Get the version and format it
$version = Update::get_version();
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'update') {
    if ($_REQUEST['type'] == 'sources') {
        if (!Access::check('interface', '100')) {
            UI::access_denied();
            exit;
        }
        set_time_limit(300);
        AutoUpdate::update_files();
        AutoUpdate::update_dependencies();
        echo '<script language="javascript" type="text/javascript">window.location="' . AmpConfig::get('web_path') . '";</script>';
        exit;
    } else {
        /* Run the Update Mojo Here */
        Update::run_update();
        /* Get the New Version */
        $version = Update::get_version();
    }
}
$htmllang = str_replace("_", "-", AmpConfig::get('lang'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
echo $htmllang;
?>