<?php if (!defined('MAX_PATH')) { exit; } ?>
<link rel="stylesheet" type="text/css" href="css/install.css"/>

<script language='JavaScript' src='<?php echo $imgPath; ?>js-help.js'></script>
<script src="js/openads.js" type="text/javascript"></script>

<script type="text/javascript">
function changePage(page) {
    document.frmOpenads.dirPage.value = page;
    document.frmOpenads.submit();
}
</script>
<div class="installer_container">
    <div id="graph_container">
        <div class="graphtitle tab-s"><b>Progress</b></div>
        <div class="graph">
            <?php if(!empty($progressVal)) { ?>
                <strong class="bar" style="width: <?php echo $progressVal; ?>%;"><?php echo $progressVal; ?>%</strong>
            <?php } else { ?>
                &nbsp;
            <?php } ?>
        </div>
    </div>
    <br>
    <a name="mid">&nbsp;</a>
    <?php
        include '../admin/js/formValidation.php';
        switch ($action)
        {
            case OA_UPGRADE_ERROR               : include 'templates/install-messages.html';    break;
            case OA_UPGRADE_RECOVERY            : include 'templates/install-messages.html';    break;
            case OA_UPGRADE_RECOVERY_INFORM     : include 'templates/install-recovery.html';    break;
            case OA_UPGRADE_TERMS               : include 'templates/install-terms.html';       break;
            case OA_UPGRADE_POLICY              : include 'templates/install-policy.html';      break;
            case OA_UPGRADE_SYSCHECK            : include 'templates/install-syscheck.html';    include 'templates/install-appcheck.html';    break;
            case OA_UPGRADE_APPCHECK            : include 'templates/install-appcheck.html';    break;
            case OA_UPGRADE_LOGIN               : include 'templates/install-login.html';       break;
            case OA_UPGRADE_DBSETUP             : include 'templates/install-dbsetup.html';     break;
            case OA_UPGRADE_UPGRADE             : include 'templates/install-success.html';     break;
            case OA_UPGRADE_INSTALL             : include 'templates/install-success.html';     break;
            case OA_UPGRADE_CONFIGSETUP         : include 'templates/install-configsetup.html'; break;
            case OA_UPGRADE_ADMINSETUP          : include 'templates/install-adminsetup.html';  break;
            case OA_UPGRADE_IDSETUP             : include 'templates/install-oaidsetup.html';   break;
            case OA_UPGRADE_DATASETUP           : include 'templates/install-datasetup.html';   break;
            case OA_UPGRADE_FINISH              : include 'templates/install-finish.html';      break;
            default                             : include 'templates/install-welcome.html';     break;
        }
    ?>
    <input type="hidden" name="dirPage" id="dirPage" value="" />
</form>
</div>
