" . _('Go back to Management Interface') . "\n"); exit; } else if (isset($_POST['action']) && $_POST['action']=="showsql") { show_generated_sql(); } else if (isset($_POST['action']) && $_POST['action']=="update") { // The update is called for // we do the check again, so updates can't happen again if you refresh the page $db_version = get_dbversion(); $new_version = $ESPCONFIG['version']; $db_type=$ESPCONFIG['adodb_database_type']; if (version_compare($db_version,$new_version,"eq")) { echo(_('Update not needed')); } else { echo (_('Updating')."
"); $result=set_dbschema(); if (!$result) { echo(mkerror(_('Update FAILED'))."
\n"); } else { echo (_('Update done')."
"); } // the schema is now ok, so we now update the version $sql="DELETE FROM ".$GLOBALS['ESPCONFIG']['version_table']; $result = execute_sql($sql); if (!$result) { echo(mkerror(_('Version delete FAILED'))."
\n"); } $sql="INSERT INTO ".$GLOBALS['ESPCONFIG']['version_table']." (versionid) VALUES ('$new_version')"; $result = execute_sql($sql); if (!$result) { echo(mkerror(_('Version update FAILED'))."
\n"); } } # end if (version_compare... } else { // we check the version $db_version = get_dbversion(); $new_version = $ESPCONFIG['version']; if (version_compare($db_version,$new_version,"eq")) { echo(_('Update not needed')); } else { echo (_('Update available')); ?>


" . _('Go back to Management Interface') . "\n"); ?>