<?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 MAX_PATH . '/www/admin/templates/install-messages.html';    break;
            case OA_UPGRADE_RECOVERY            : include MAX_PATH . '/www/admin/templates/install-messages.html';    break;
            case OA_UPGRADE_RECOVERY_INFORM     : include MAX_PATH . '/www/admin/templates/install-recovery.html';    break;
            case OA_UPGRADE_TERMS               : include MAX_PATH . '/www/admin/templates/install-terms.html';       break;
            case OA_UPGRADE_POLICY              : include MAX_PATH . '/www/admin/templates/install-policy.html';      break;
            case OA_UPGRADE_SYSCHECK            : include MAX_PATH . '/www/admin/templates/install-syscheck.html';    include MAX_PATH . '/www/admin/templates/install-appcheck.html';    break;
            case OA_UPGRADE_APPCHECK            : include MAX_PATH . '/www/admin/templates/install-appcheck.html';    break;
            case OA_UPGRADE_LOGIN               : include MAX_PATH . '/www/admin/templates/install-login.html';       break;
            case OA_UPGRADE_DBSETUP             : include MAX_PATH . '/www/admin/templates/install-dbsetup.html';     break;
            case OA_UPGRADE_UPGRADE             : include MAX_PATH . '/www/admin/templates/install-success.html';     break;
            case OA_UPGRADE_INSTALL             : include MAX_PATH . '/www/admin/templates/install-success.html';     break;
            case OA_UPGRADE_CONFIGSETUP         : include MAX_PATH . '/www/admin/templates/install-configsetup.html'; break;
            case OA_UPGRADE_ADMINSETUP          : include MAX_PATH . '/www/admin/templates/install-adminsetup.html';  break;
            case OA_UPGRADE_IDSETUP             : include MAX_PATH . '/www/admin/templates/install-oaidsetup.html';   break;
            case OA_UPGRADE_DATASETUP           : include MAX_PATH . '/www/admin/templates/install-datasetup.html';   break;
            case OA_UPGRADE_FINISH              : include MAX_PATH . '/www/admin/templates/install-finish.html';      break;
            default                             : include MAX_PATH . '/www/admin/templates/install-welcome.html';     break;
        }
    ?>
    <input type="hidden" name="dirPage" id="dirPage" value="" />
</form>
</div>
