xtc_redirect(xtc_href_link(FILENAME_ACCOUNT, '', 'SSL'));
        } else {
            $error = true;
            $messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING);
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_PASSWORD, xtc_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_PASSWORD, xtc_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if ($messageStack->size('account_password') > 0) {
    $smarty->assign('error', $messageStack->output('account_password'));
}
$smarty->assign('FORM_ACTION', xtc_draw_form('account_password', xtc_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), 'post', 'onsubmit="return check_form(account_password);"') . xtc_draw_hidden_field('action', 'process'));
$smarty->assign('INPUT_ACTUAL', xtc_draw_password_fieldNote(array('name' => 'password_current', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>' : ''))));
$smarty->assign('INPUT_NEW', xtc_draw_password_fieldNote(array('name' => 'password_new', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_PASSWORD_NEW_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_NEW_TEXT . '</span>' : ''))));
$smarty->assign('INPUT_CONFIRM', xtc_draw_password_fieldNote(array('name' => 'password_confirmation', 'text' => '&nbsp;' . (xtc_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>' : ''))));
$smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('FORM_END', '</form>');
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/account_password.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
} else {
    $homepage_content = xtc_draw_input_fieldNote(array('name' => 'a_homepage', 'text' => '&nbsp;' . ENTRY_AFFILIATE_HOMEPAGE_TEXT), $affiliate['affiliate_homepage']);
}
$module_smarty->assign('homepage_content', $homepage_content);
if ($is_read_only == false) {
    $module_smarty->assign('PASSWORD_READONLY', 'false');
    if ($error == true) {
        $module_smarty->assign('error', 'true');
        if ($entry_password_error == true) {
            $password_content = xtc_draw_password_fieldNote(array('name' => 'a_password', 'text' => '&nbsp;' . ENTRY_PASSWORD_ERROR));
        } else {
            $password_content = PASSWORD_HIDDEN . xtc_draw_hidden_field('a_password') . xtc_draw_hidden_field('a_confirmation');
        }
    } else {
        $password_content = xtc_draw_password_fieldNote(array('name' => 'a_password', 'text' => '&nbsp;' . ENTRY_PASSWORD_TEXT));
    }
    if ($error == false || $entry_password_error == true) {
        $password_confirmation_content = xtc_draw_password_fieldNote(array('name' => 'a_confirmation', 'text' => '&nbsp;' . ENTRY_PASSWORD_CONFIRMATION_TEXT));
    }
    $agb_content = xtc_draw_selection_fieldNote(array('name' => 'a_agb', 'text' => sprintf(ENTRY_AFFILIATE_ACCEPT_AGB, xtc_href_link(FILENAME_CONTENT, 'coID=900', 'SSL'))), 'checkbox', $value = '1', $checked = $affiliate['affiliate_agb']);
    if ($entry_agb_error == true) {
        $agb_content .= "<br>" . ENTRY_AFFILIATE_AGB_ERROR;
    }
    $module_smarty->assign('agb_content', $agb_content);
    $module_smarty->assign('password_content', $password_content);
    $module_smarty->assign('password_confirmation_content', $password_confirmation_content);
}
$module_smarty->assign('language', $_SESSION['language']);
$module_smarty->caching = 0;
$module = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/affiliate_account_details.html');
$smarty->assign('main_content', $module);