Example #1
0
	</style>
</head>
<body>
	<h1>AuthZ2 Migration</h1>
<?php 
if (!isset($updater)) {
    $updater = new AuthZ2Updater();
}
print "\n\t<p>" . $updater->getDescription() . "</p>";
if (isset($_REQUEST['db_type']) && isset($_REQUEST['db_host']) && isset($_REQUEST['db_name']) && isset($_REQUEST['db_user']) && isset($_REQUEST['db_pass'])) {
    print "\n\t\t<h2>" . _("Results") . "</h2>";
    print "\n\t<div class='results'>";
    try {
        execute_update($types);
    } catch (Exception $e) {
        HarmoniErrorHandler::handleException($e);
    }
    print "\n\t</div>";
}
print "\n\t<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>";
/*********************************************************
 * Database Type
 *********************************************************/
print "\n\t\t<div class='db_type'>";
print "\n\t\t\t<h3>" . _("Database Type:") . "</h3>";
foreach ($types as $type => $desc) {
    print "\n\t\t\t<div>";
    print "\n\t\t\t\t<input type='radio' name='db_type' value='" . $type . "' " . (isset($_REQUEST['db_type']) && $_REQUEST['db_type'] == $type ? " checked='checked'" : "") . " />" . $desc;
    print "\n\t\t\t</div>";
}
print "\n\t\t</div>";