[TEP-COMMIT] [CVS catalog] dont ask for an address on the account creation page - an address will be asked for when the customer proceeds to the checkout procedure

anonymous-OfajU3CKLf1/[email protected] 22 Jul 2004 21:21:10 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Commit in catalog/catalog on MAIN

create_account.php +87 -342 1.73 -> 1.74

dont ask for an address on the account creation page - an address will be asked for when the customer proceeds to the checkout procedure

----------

catalog /catalog

create_account.php 1.73 -> 1.74

diff -u -r1.73 -r1.74
--- create_account.php 2004/04/16 14:05:34 1.73
+++ create_account.php 2004/07/22 21:21:08 1.74
@@ -5,7 +5,7 @@

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

- Copyright (c) 2003 osCommerce

+ Copyright (c) 2004 osCommerce

Released under the GNU General Public License
*/

@@ -15,246 +15,119 @@

// needs to be included earlier to set the success message in the messageStack
require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CREATE_ACCOUNT);

- $process = false;

if (isset($_POST['action']) && ($_POST['action'] == 'process')) {

- $process = true;
-
- if (ACCOUNT_GENDER == 'true') {
- if (isset($_POST['gender'])) {
- $gender = tep_db_prepare_input($_POST['gender']);
- } else {
- $gender = false;
- }
- }
- $firstname = tep_db_prepare_input($_POST['firstname']);
- $lastname = tep_db_prepare_input($_POST['lastname']);
- if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob_years']) . tep_db_prepare_input($_POST['dob_months']) . tep_db_prepare_input($_POST['dob_days']);
- $email_address = tep_db_prepare_input($_POST['email_address']);
- if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
- $street_address = tep_db_prepare_input($_POST['street_address']);
- if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
- $postcode = tep_db_prepare_input($_POST['postcode']);
- $city = tep_db_prepare_input($_POST['city']);
- if (ACCOUNT_STATE == 'true') {
- $state = tep_db_prepare_input($_POST['state']);
- if (isset($_POST['zone_id'])) {
- $zone_id = tep_db_prepare_input($_POST['zone_id']);
- } else {
- $zone_id = false;
- }
- }
- $country = tep_db_prepare_input($_POST['country']);
- $telephone = tep_db_prepare_input($_POST['telephone']);
- $fax = tep_db_prepare_input($_POST['fax']);
- if (isset($_POST['newsletter'])) {
- $newsletter = tep_db_prepare_input($_POST['newsletter']);
- } else {
- $newsletter = false;
- }
- $password = tep_db_prepare_input($_POST['password']);
- $confirmation = tep_db_prepare_input($_POST['confirmation']);
-
- $error = false;
-

if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {

- $error = true;
- $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');

+ $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED);

}
}

-
- if (ACCOUNT_GENDER == 'true') {
- if ( ($gender != 'm') && ($gender != 'f') ) {
- $error = true;

+ if (ACCOUNT_GENDER > 0) {
+ if (!isset($_POST['gender']) || (($_POST['gender'] != 'm') && ($_POST['gender'] != 'f'))) {

$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}

-
- if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
- $error = true;

+ if (!isset($_POST['firstname']) || (strlen(trim($_POST['firstname'])) < ACCOUNT_FIRST_NAME)) {

$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

- if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
- $error = true;
-

+ if (!isset($_POST['lastname']) || (strlen(trim($_POST['lastname'])) < ACCOUNT_LAST_NAME)) {

$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}

- if (ACCOUNT_DOB == 'true') {
- if (checkdate($_POST['dob_months'], $_POST['dob_days'], $_POST['dob_years'])) {

+ if (ACCOUNT_DATE_OF_BIRTH > -1) {
+ if (isset($_POST['dob_days']) && isset($_POST['dob_months']) && isset($_POST['dob_years']) && checkdate($_POST['dob_months'], $_POST['dob_days'], $_POST['dob_years'])) {

$dob = mktime(0, 0, 0, $_POST['dob_months'], $_POST['dob_days'], $_POST['dob_years']);
} else {

- $error = true;
-

$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}

- if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
- $error = true;
-

+ if (!isset($_POST['email_address']) || (strlen(trim($_POST['email_address'])) < ACCOUNT_EMAIL_ADDRESS)) {

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);

- } elseif (tep_validate_email($email_address) == false) {
- $error = true;
-

+ } elseif (tep_validate_email($_POST['email_address']) == false) {

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {

- $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
- $check_email = tep_db_fetch_array($check_email_query);
- if ($check_email['total'] > 0) {
- $error = true;

+ $Qcheck = $osC_Database->query('select customers_id from :table_customers where customers_email_address = :customers_email_address limit 1');
+ $Qcheck->bindRaw(':table_customers', TABLE_CUSTOMERS);
+ $Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
+ $Qcheck->execute();

+ if ($Qcheck->numberOfRows() > 0) {

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
}

- }
-
- if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
- $error = true;
-
- $messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
- }
-
- if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
- $error = true;

- $messageStack->add('create_account', ENTRY_POST_CODE_ERROR);

+ $Qcheck->freeResult();

}

-
- if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
- $error = true;

- $messageStack->add('create_account', ENTRY_CITY_ERROR);

+ if (!isset($_POST['password']) || (strlen(trim($_POST['password'])) < ACCOUNT_PASSWORD)) {
+ $messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
+ } elseif (!isset($_POST['confirmation']) || (trim($_POST['password']) != trim($_POST['confirmation']))) {
+ $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);

}

- if (is_numeric($country) == false) {
- $error = true;

+ if ($messageStack->size('create_account') === 0) {
+ $osC_Database->startTransaction();

- $messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
- }

+ $Qcustomer = $osC_Database->query('insert into :table_customers (customers_firstname, customers_lastname, customers_email_address, customers_newsletter, customers_status, customers_ip_address, customers_password, customers_gender, customers_dob) values (:customers_firstname, :customers_lastname, :customers_email_address, :customers_newsletter, :customers_status, :customers_ip_address, :customers_password, :customers_gender, :customers_dob)');
+ $Qcustomer->bindRaw(':table_customers', TABLE_CUSTOMERS);
+ $Qcustomer->bindValue(':customers_firstname', trim($_POST['firstname']));
+ $Qcustomer->bindValue(':customers_lastname', trim($_POST['lastname']));
+ $Qcustomer->bindValue(':customers_email_address', trim($_POST['email_address']));
+ $Qcustomer->bindValue(':customers_newsletter', (isset($_POST['newsletter']) && ($_POST['newsletter'] == '1') ? '1' : ''));
+ $Qcustomer->bindValue(':customers_status', '1');
+ $Qcustomer->bindValue(':customers_ip_address', tep_get_ip_address());
+ $Qcustomer->bindValue(':customers_password', tep_encrypt_password(trim($_POST['password'])));
+ $Qcustomer->bindValue(':customers_gender', (((ACCOUNT_GENDER > -1) && isset($_POST['gender']) && (($_POST['gender'] == 'm') || ($_POST['gender'] == 'f'))) ? $_POST['gender'] : ''));
+ $Qcustomer->bindValue(':customers_dob', ((ACCOUNT_DATE_OF_BIRTH > -1) ? date('Ymd', $dob) : ''));
+ $Qcustomer->execute();
+
+ if ($Qcustomer->affectedRows() === 1) {
+ $customer_id = $osC_Database->nextID();
+
+ $Qci = $osC_Database->query('insert into :table_customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values (:customers_info_id, :customers_info_number_of_logons, :customers_info_date_account_created)');
+ $Qci->bindRaw(':table_customers_info', TABLE_CUSTOMERS_INFO);
+ $Qci->bindInt(':customers_info_id', $customer_id);
+ $Qci->bindInt(':customers_info_number_of_logons', 0);
+ $Qci->bindRaw(':customers_info_date_account_created', 'now()');
+ $Qci->execute();

- if (ACCOUNT_STATE == 'true') {
- $zone_id = 0;
- $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
- $check = tep_db_fetch_array($check_query);
- $entry_state_has_zones = ($check['total'] > 0);
- if ($entry_state_has_zones == true) {
- $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and zone_code = '" . tep_db_input($state) . "'");
- if (tep_db_num_rows($zone_query) == 1) {
- $zone = tep_db_fetch_array($zone_query);
- $zone_id = $zone['zone_id'];
- } else {
- $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and zone_name like '" . tep_db_input($state) . "%'");
- if (tep_db_num_rows($zone_query) == 1) {
- $zone = tep_db_fetch_array($zone_query);
- $zone_id = $zone['zone_id'];
- } else {
- $error = true;

+ if ($Qci->affectedRows() === 1) {
+ $osC_Database->commitTransaction();

- $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);

+ if (SERVICE_SESSION_REGENERATE_ID == 'True') {
+ $osC_Session->recreate();

}

- }
- } else {
- if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
- $error = true;

- $messageStack->add('create_account', ENTRY_STATE_ERROR);
- }
- }
- }
-
- if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
- $error = true;
-
- $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
- }

+ $osC_Customer->setCustomerData($customer_id);

+// restore cart contents
+ $cart->restore_contents();

- if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
- $error = true;

+ $navigation->remove_current_page();

- $messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
- } elseif ($password != $confirmation) {
- $error = true;

+// build the message content
+ if ((ACCOUNT_GENDER > -1) && isset($_POST['gender'])) {
+ if ($_POST['gender'] == 'm') {
+ $email_text = sprintf(EMAIL_GREET_MR, $osC_Customer->last_name);
+ } else {
+ $email_text = sprintf(EMAIL_GREET_MS, $osC_Customer->last_name);
+ }
+ } else {
+ $email_text = sprintf(EMAIL_GREET_NONE, $osC_Customer->full_name);
+ }

- $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
- }

+ $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
+ tep_mail($osC_Customer->full_name, $osC_Customer->email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

- if ($error == false) {
- $sql_data_array = array('customers_firstname' => $firstname,
- 'customers_lastname' => $lastname,
- 'customers_email_address' => $email_address,
- 'customers_telephone' => $telephone,
- 'customers_fax' => $fax,
- 'customers_newsletter' => $newsletter,
- 'customers_status' => '1',
- 'customers_ip_address' => tep_get_ip_address(),
- 'customers_password' => tep_encrypt_password($password));
-
- if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
- if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = date('Ymd', $dob);
-
- tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
-
- $customer_id = tep_db_insert_id();
-
- $sql_data_array = array('customers_id' => $customer_id,
- 'entry_firstname' => $firstname,
- 'entry_lastname' => $lastname,
- 'entry_street_address' => $street_address,
- 'entry_postcode' => $postcode,
- 'entry_city' => $city,
- 'entry_country_id' => $country);
-
- if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
- if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
- if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
- if (ACCOUNT_STATE == 'true') {
- if ($zone_id > 0) {
- $sql_data_array['entry_zone_id'] = $zone_id;
- $sql_data_array['entry_state'] = '';

+ tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

} else {

- $sql_data_array['entry_zone_id'] = '0';
- $sql_data_array['entry_state'] = $state;

+ $osC_Database->rollbackTransaction();

}

- }
-
- tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
-
- $address_id = tep_db_insert_id();
-
- tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
-
- tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");
-
- if (SERVICE_SESSION_REGENERATE_ID == 'True') {
- $osC_Session->recreate();
- }
-
- $osC_Customer->setCustomerData($customer_id);
-
-// restore cart contents
- $cart->restore_contents();
-
- $navigation->remove_current_page();
-
-// build the message content
- if (ACCOUNT_GENDER == 'true') {
- if ($gender == 'm') {
- $email_text = sprintf(EMAIL_GREET_MR, $osC_Customer->last_name);
- } else {
- $email_text = sprintf(EMAIL_GREET_MS, $osC_Customer->last_name);
- }

} else {

- $email_text = sprintf(EMAIL_GREET_NONE, $osC_Customer->full_name);

+ $osC_Database->rollbackTransaction();

}

-
- $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
- tep_mail($osC_Customer->full_name, $osC_Customer->email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
-
- tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

}
}

@@ -284,7 +157,7 @@

<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->

- <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

+ <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . osc_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>

@@ -313,6 +186,7 @@

</tr>
<?php
}

+

if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
?>
<tr>

@@ -328,7 +202,7 @@

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

- <td class="main"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION . '<br><br>' . tep_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"') . '<label for="privacy">&nbsp;' . TEXT_PRIVACY_CONDITIONS_CONFIRM . '</label>'; ?></td>

+ <td class="main"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION . '<br><br>' . osc_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"') . '<label for="privacy">&nbsp;' . TEXT_PRIVACY_CONDITIONS_CONFIRM . '</label>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>

@@ -354,191 +228,62 @@

<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<?php

- if (ACCOUNT_GENDER == 'true') {

+ if (ACCOUNT_GENDER > -1) {
+ $gender_array = array(array('id' => 'm', 'text' => MALE),
+ array('id' => 'f', 'text' => FEMALE));

?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>

- <td class="main"><?php echo tep_draw_radio_field('gender', 'm') . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f') . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo osc_draw_radio_field('gender', $gender_array, '', '', (ACCOUNT_GENDER > 0)); ?></td>

</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>

- <td class="main"><?php echo tep_draw_input_field('firstname') . '&nbsp;' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo osc_draw_input_field('firstname', '', '', true); ?></td>

</tr>
<tr>
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>

- <td class="main"><?php echo tep_draw_input_field('lastname') . '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo osc_draw_input_field('lastname', '', '', true); ?></td>

</tr>
<?php

- if (ACCOUNT_DOB == 'true') {

+ if (ACCOUNT_DATE_OF_BIRTH > -1) {

?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>

- <td class="main"><?php echo tep_draw_date_pull_down_menu('dob', '', false, true, true, date('Y')-1901, -5) . '&nbsp;' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
- <td class="main"><?php echo tep_draw_input_field('email_address') . '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- if (ACCOUNT_COMPANY == 'true') {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td class="main"><?php echo ENTRY_COMPANY; ?></td>
- <td class="main"><?php echo tep_draw_input_field('company') . '&nbsp;' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
- <td class="main"><?php echo tep_draw_input_field('street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo tep_draw_date_pull_down_menu('dob', '', false, true, true, date('Y')-1901, -5) . '&nbsp;<span class="inputRequirement">*</span>'; ?></td>

</tr>
<?php

- if (ACCOUNT_SUBURB == 'true') {
-?>
- <tr>
- <td class="main"><?php echo ENTRY_SUBURB; ?></td>
- <td class="main"><?php echo tep_draw_input_field('suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
- </tr>
-<?php

}
?>
<tr>

- <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
- <td class="main"><?php echo tep_draw_input_field('postcode') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>

+ <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>
<tr>

- <td class="main"><?php echo ENTRY_CITY; ?></td>
- <td class="main"><?php echo tep_draw_input_field('city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
+ <td class="main"><?php echo osc_draw_input_field('email_address', '', '', true); ?></td>

</tr>
<?php

- if (ACCOUNT_STATE == 'true') {

+ if (ACCOUNT_NEWSLETTER > -1) {

?>
<tr>

- <td class="main"><?php echo ENTRY_STATE; ?></td>
- <td class="main">
-<?php
- if ($process == true) {
- if ($entry_state_has_zones == true) {
- $zones_array = array();
- $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
- while ($zones_values = tep_db_fetch_array($zones_query)) {
- $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
- }
- echo tep_draw_pull_down_menu('state', $zones_array);
- } else {
- echo tep_draw_input_field('state');
- }
- } else {
- echo tep_draw_input_field('state');
- }
-
- if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
-?>
- </td>

+ <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
+ <td class="main"><?php echo osc_draw_checkbox_field('newsletter', '1'); ?></td>

</tr>
<?php
}
?>

- <tr>
- <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
- <td class="main"><?php echo tep_get_country_list('country') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
- <td class="main"><?php echo tep_draw_input_field('telephone') . '&nbsp;' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
- <td class="main"><?php echo tep_draw_input_field('fax') . '&nbsp;' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="2" cellpadding="2">

<tr>

- <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
- <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . '&nbsp;' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>

+ <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo CATEGORY_PASSWORD; ?></b></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="2" cellpadding="2">

<tr>
<td class="main"><?php echo ENTRY_PASSWORD; ?></td>

- <td class="main"><?php echo tep_draw_password_field('password') . '&nbsp;' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo osc_draw_password_field('password', '', '', true); ?></td>

</tr>
<tr>
<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>

- <td class="main"><?php echo tep_draw_password_field('confirmation') . '&nbsp;' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>

+ <td class="main"><?php echo osc_draw_password_field('confirmation', '', '', true); ?></td>

</tr>
</table></td>
</tr>

CVSspam 0.2.8

-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click