function osC_Account_Address_book() { global $osC_Language, $osC_Services, $osC_Breadcrumb, $osC_Customer, $osC_MessageStack; $this->_page_title = $osC_Language->get('address_book_heading'); if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Language->get('breadcrumb_address_book'), osc_href_link(FILENAME_ACCOUNT, $this->_module, 'SSL')); } if ($osC_Customer->hasDefaultAddress() === false) { $this->_page_title = $osC_Language->get('address_book_add_entry_heading'); $this->_page_contents = 'address_book_process.php'; $this->addJavascriptPhpFilename('includes/form_check.js.php'); } elseif (isset($_GET['new'])) { if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Language->get('breadcrumb_address_book_add_entry'), osc_href_link(FILENAME_ACCOUNT, $this->_module . '&new', 'SSL')); } $this->_page_title = $osC_Language->get('address_book_add_entry_heading'); $this->_page_contents = 'address_book_process.php'; $this->addJavascriptPhpFilename('includes/form_check.js.php'); } elseif (isset($_GET['edit']) && is_numeric($_GET[$this->_module])) { if (!osC_AddressBook::checkEntry($_GET['address_book'])) { $osC_MessageStack->add('address_book', $osC_Language->get('error_address_book_entry_non_existing'), 'error'); } if ($osC_MessageStack->size('address_book') == 0) { if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Language->get('breadcrumb_address_book_edit_entry'), osc_href_link(FILENAME_ACCOUNT, $this->_module . '=' . $_GET[$this->_module] . '&edit', 'SSL')); } $this->_page_title = $osC_Language->get('address_book_edit_entry_heading'); $this->_page_contents = 'address_book_process.php'; $this->addJavascriptPhpFilename('includes/form_check.js.php'); } } elseif (isset($_GET['delete']) && is_numeric($_GET[$this->_module])) { if ($_GET['address_book'] == $osC_Customer->getDefaultAddressID()) { $osC_MessageStack->add('address_book', $osC_Language->get('warning_primary_address_deletion'), 'warning'); } else { if (!osC_AddressBook::checkEntry($_GET['address_book'])) { $osC_MessageStack->add('address_book', $osC_Language->get('error_address_book_entry_non_existing'), 'error'); } } if ($osC_MessageStack->size('address_book') == 0) { if ($osC_Services->isStarted('breadcrumb')) { $osC_Breadcrumb->add($osC_Language->get('breadcrumb_address_book_delete_entry'), osc_href_link(FILENAME_ACCOUNT, $this->_module . '=' . $_GET[$this->_module] . '&delete', 'SSL')); } $this->_page_title = $osC_Language->get('address_book_delete_entry_heading'); $this->_page_contents = 'address_book_delete.php'; } } if (isset($_GET['new']) && $_GET['new'] == 'save') { if (osC_AddressBook::numberOfEntries() >= MAX_ADDRESS_BOOK_ENTRIES) { $osC_MessageStack->add('address_book', $osC_Language->get('error_address_book_full')); $this->_page_title = $osC_Language->get('address_book_heading'); $this->_page_contents = 'address_book.php'; } else { $this->_process(); } } elseif (isset($_GET['edit']) && $_GET['edit'] == 'save') { $this->_process($_GET[$this->_module]); } elseif (isset($_GET['delete']) && $_GET['delete'] == 'confirm' && is_numeric($_GET[$this->_module])) { $this->_delete($_GET[$this->_module]); } }
<td width="10"> </td> </tr> <?php $radio_buttons++; } ?> </table> </div> </div> <?php } } if (osC_AddressBook::numberOfEntries() < MAX_ADDRESS_BOOK_ENTRIES) { ?> <div class="moduleBox"> <h6><?php echo $osC_Language->get('new_billing_address_title'); ?> </h6> <div class="content"> <?php echo $osC_Language->get('new_billing_address'); ?> <div style="margin: 10px 30px 10px 30px;"> <?php
?> </li> <li><?php echo osc_draw_label($osC_Language->get('field_customer_password'), null, 'billing_password', true) . osc_draw_password_field('billing_password'); ?> </li> <li style="margin-bottom: 10px"><?php echo osc_draw_label($osC_Language->get('field_customer_password_confirmation'), null, 'billing_confirm_password', true) . osc_draw_password_field('billing_confirm_password'); ?> </li> <?php } ?> <?php if ($osC_Customer->isLoggedOn() && osC_AddressBook::numberOfEntries() > 0) { ?> <li> <div style="float: right; padding: 0px 0px 10px 20px; text-align: center;"> <?php echo '<b>' . $osC_Language->get('please_select') . '</b><br />' . osc_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?> </div> <p style="margin-top: 0px;"><?php echo $osC_Language->get('choose_billing_address'); ?> </p> </li> <li style="margin-bottom: 10px"> <?php
if (osC_AddressBook::numberOfEntries() >= MAX_ADDRESS_BOOK_ENTRIES) { $messageStack->add('address_book', $osC_Language->get('error_address_book_full')); } } ?> <h1><?php echo $osC_Template->getPageTitle(); ?> </h1> <?php if ($messageStack->size('address_book') > 0) { echo $messageStack->output('address_book'); } if ($osC_Customer->hasDefaultAddress() === false || isset($_GET['new']) && osC_AddressBook::numberOfEntries() < MAX_ADDRESS_BOOK_ENTRIES || isset($Qentry) && $Qentry->numberOfRows() === 1) { ?> <form name="address_book" action="<?php echo osc_href_link(FILENAME_ACCOUNT, 'address_book=' . $_GET['address_book'] . '&' . (isset($_GET['edit']) ? 'edit' : 'new') . '=save', 'SSL'); ?> " method="post" onsubmit="return check_form(address_book);"> <div class="moduleBox"> <h6><em><?php echo $osC_Language->get('form_required_information'); ?> </em><?php echo $osC_Language->get('address_book_new_address_title'); ?>