<?php if (!defined('MAX_PATH')) { exit; } ?>
<br>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td valign='top'><img class="install-icon" src='<?php echo $imgPath; ?>images/install-login.png'></td>
<td width='100%' valign='top'>
<br>
<span class='tab-s'><?php echo $strAdminSettingsTitle; ?></span>
<br>
<img src='<?php echo $imgPath; ?>images/break-el.gif' width='100%' height='1' vspace='8'>
<span class='install'><?php echo $strAdminSettingsIntro; ?></span>
</td>
</tr>
</table>
<br>

<form id="frmOpenads" name="frmOpenads" method="POST" action="install.php" onSubmit='return max_formValidate(this);' style="margin:0; padding:0;">

<?php
            // Setup list of all timezones, calculate selected timezone
            require_once('../../lib/OA/Admin/Timezones.php');
            $aTimezones = OA_Admin_Timezones::AvailableTimezones(true);
            if ($_POST['aPrefs']['timezone']) {
                $selTimezone = $_POST['aPrefs']['timezone'];
            } else {
                $aTimezone = OA_Admin_Timezones::getTimezone();
                $selTimezone = $aTimezone['tz'];
            }

            // What display string do we need to show for the timezone?
            if ($aTimezone['calculated']) {
                $errorImage = "<img src='".$imgPath."images/icon-x.gif' width='10' height='9' />";
                $strTimezoneToDisplay = $strTimezoneEstimated . '<br /><small class="red">' . $errorImage . $strTimezoneGuessedValue . '</small>';
            } else {
                $strTimezoneToDisplay = $strTimezone;
            }
            // For language, setup English as first choice
            $langVal = 'en';
            $oLanguage = new MAX_Admin_Languages();

            $options->show(array (
                array (
                    'text'  => $strAdminAccount,
                    'items' => array (
                        array (
                            'type'  => 'text',
                            'name'  => 'aAdmin[name]',
                            'text'  => $strAdminUsername,
                            'req'   => true,
                            'value' => $aAdmin['name']
                        ),
                        array (
                            'type'  => 'break'
                        ),
                        array (
                            'type'  => 'password',
                            'name'  => 'aAdmin[pword]',
                            'text'  => $strAdminPassword,
                            'req'   => true,
                            'value' => $aAdmin['pword']
                        ),
                        array (
                            'type'  => 'break'
                        ),
                        array (
                            'type'  => 'password',
                            'name'  => 'aAdmin[pword2]',
                            'text'  => $strRepeatPassword,
                            'req'   => true,
                            'check' => 'compare:aAdmin[pword]',
                            'value' => $aAdmin['pword2']
                        ),
                        array (
                            'type'  => 'break'
                        ),
                        array (
                            'type'  => 'text',
                            'name'  => 'aAdmin[email]',
                            'text'  => $strAdministratorEmail,
                            'req'   => true,
                            'check' => 'email',
                            'value' => $aAdmin['email']
                        ),
                        array (
                            'type'  => 'break'
                        ),
                        array (
                            'type'  => 'select',
                            'name'  => 'aAdmin[language]',
                            'text'  => $strLanguageSelection,
                            'req'   => true,
                            'value' => $langVal,
                            'items' => $oLanguage->AvailableLanguages()
                        ),
                    )
                ),
                array (
                    'text'  => $strPreferences,
                    'items' => array (
                        array (
                            'type'  => 'select',
                            'name'  => 'aPrefs[timezone]',
                            'text'  => $strTimezoneToDisplay,
                            'req'   => true,
                            'value' => $selTimezone,
                            'items' => $aTimezones
                        ),
                    )
                )
            ), $errormessage, 0, $imgPath);
?>

                <input type="submit"  class="button" id="btn_finish" name="btn_finish" value="<?php echo $strBtnContinue; ?>" tabindex="<?php echo ($tabindex++); ?>" />
                <input type="hidden" name="dirPage" id="dirPage" value="" />
</form>

<form name="frmOpenads2" id="frmOpenads2" method="POST" action="install.php" style="margin:0; padding:0;">
                <input type="submit"  class="button floatleft" id="btn_configsetup" name="btn_configsetup" value="<?php echo $strBtnGoBack; ?>" tabindex="<?php echo ($tabindex++); ?>" />
