Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

contrib help please!


Guest

Recommended Posts

Posted

I've installed the human confirmation contrib, which works fine except that I can't seem to make the validation code a required field.

 

I've spent ages searching this forum for an answer and all I have found is how to make a field optional.

 

Can someone explain how to make a new field in the customer sign-up and make it a required field that will pop up the javascript errorbox if it's not filled in or is incorrect.

 

I've got so far in trying to do it, but when anything (even if it's wrong) is put in the field the error message doesn't show. it only shows if the field is left blank.

Posted

Look at how other required fields are handled and also look in includes/form_check.js.php

Your online success is Paramount.

Posted

Thanks. I've done that already, which is how I actually managed to get as far as I have.

 

I just can't seem to get it 100% right! The contrib I'm using is called huiman confirmation v1.0

 

I've tried adding these both of these lines to form_check.js.php. (including the one that is commented out, which was used as a test.)

 

// ? ?check_input("thecode", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_HUMANCHECK_ERROR; ?>");

check_input("thecode", '', "<?php echo ENTRY_HUMANCHECK_ERROR; ?>");

 

I've also tried adding these lines (commented lines were tests)

// BOF // Contrib: Human confirmation v1.0

if ($thecode_okay == false)
// if (strlen(thecode) < $noautomationcode);
// if (strlen($thecode) < $noautomationcode);
// if ($thecode_okay != true)
// if (thecode != $dist_img);
// if ($process_okay == false)
// if ('thecode' == $noautomationcode)
// if ('thecode' != 'thecode');
// if (thecode != $code);
// if ($code = false);
// if ($thecode != $code);
// $HTTP_SESSION_VARS["noautamationcode"] = $guess;
// $guess = tep_session_register('noautamationcode');
// if ($guess != thecode);

{
? ? ? ?$error = true;

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

 

the human confirmation file is as below:

// constants for contrib: Human confirmation V 1.0
define('CATEGORY_HUMANCHECK', 'True');
define('ENTRY_HUMANCHECK', 'Please enter the numbers you see in the picture.<br>This is to prevent automated registrations.');
define('ENTRY_HUMANCHECK_TEXT', 'Human confirmation');
define('ENTRY_HUMANCHECK_ERROR', 'You must fill in the Human confirmation code. ?(Make sure the numbers match)');

 

I hope that gives one of you guys a clue. Because I'm stuck! :(

Posted

I have the same contrib installed, but mine is a required field, I didn't do anything special to make that happen though.

 

But, on another note, I wanted the error message also, so I added this line of code...

 

   // <- v1.1 // Changed to work w/ random image names

 $thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));
 $process_okay = (isset($HTTP_POST_VARS['action'])  && ($HTTP_POST_VARS['action'] == 'process'));
 
// Error message set by Noel
 if ( ($process_okay == false) || ($thecode_okay == false) ) {
	 $error = true;
    	 $messageStack->add('create_account', 'You must fill in the confirmation code. (Make sure the numbers match)');
}
// End error message set by Noel

if ( ($process_okay == true) && ($thecode_okay == true) ) {
// EOF // Contrib: Human confirmation v1
   $process = true;

 

You should be able to figure out the placement by the context clues there...

 

The saddest part is, I thought it was going to be a lot harder than that, then I was like, wait, what about... :P

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Posted

That was in /catalog/create_account.php by the way...

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Posted

Whoops, little hasty there. Change this line:

 

if ( ($process_okay == false) || ($thecode_okay == false) ) {

 

To This:

  if ( ($process_okay == true) && ($thecode_okay == false) ) {

 

Then you won't get it when they hit the signup page the first time..

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Posted

Thanks Noel, but it didn't work. When I used this bit of code

if ( ($process_okay == false) || ($thecode_okay == false) ) {

 

The error appeared on the page, just like you said

Then you won't get it when they hit the signup page the first time..

 

But when I changed that line to...

if ( ($process_okay == true) && ($thecode_okay == true) ) {

 

I didn't see any error in the javascript pop-up box. Just an error with the little warning triangle and pink hightlight on the page.

 

The code I currrently have is:

 

 ? ?$dirHandle->close();
?}
?// <- v1.1 // Changed to work w/ random image names

$thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));
$process_okay = (isset($HTTP_POST_VARS['action']) ?&& ($HTTP_POST_VARS['action'] == 'process'));

// Error message set by Noel
if ( ($process_okay == true) && ($thecode_okay == false) ) {
?$error = true;
? ? ?$messageStack->add('create_account', 'You must fill in the confirmation code. (Make sure the numbers match)');
}
// End error message set by Noel

if ( ($process_okay == true) && ($thecode_okay == true) ) {
// EOF // Contrib: Human confirmation v1
? $process = true;
? 
? 
? ?if (ACCOUNT_GENDER == 'true') {

 

I also tried putting the "error message set by Noel" in the section of code where the other errors are produced. Like so:

 ? ?if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
? ? ?$error = true;

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

// Error message set by Noel
if ( ($process_okay == true) && ($thecode_okay == false) ) {
?$error = true;
? ? ?$messageStack->add('create_account', 'ENTRY_HUMANCHECK_ERROR');
}
// End error message set by Noel

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

 

and then adding this in the form_check.js.php

check_input("thecode", "thecode", "<?php echo ENTRY_HUMANCHECK_ERROR; ?>");
<?php define('ENTRY_HUMANCHECK_ERROR', 'You must fill in the Human confirmation code. ?(Make sure the numbers match)');
?>

 

But as soon as anything is entered into the code box the error doesn't appear!

 

Arrggghhh. this is a nightmare!

  • 4 weeks later...
Posted

Hi craigey,

I added your great contribution update but, still no error messages for

empty or wrong human confirmation code.

Even when not filled in or filled in incorect code other errors are not displayed:

 

Can you see whats wrong?

 

This is my create_account.php code

 

<?php

/*

$Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// needs to be included earlier to set the success message in the messageStack

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

include(DIR_WS_LANGUAGES . $language . '/' . 'add_create_account_process.php');

 

$process = false;

 

// BOF // Contrib: Human confirmation v1.2

 

$thecode_okay = false;

$process_okay = false;

$noautomationcode = $HTTP_SESSION_VARS["noautamationcode"];

 

// -> v1.1 // Changed to work w/ random image names

$img_dir = $HTTP_SESSION_VARS["noautamationdir"];

$img_name = $HTTP_SESSION_VARS["noautamationname"];

// Find and delete old images

if (strlen($img_name) >= 6) {

$dirHandle = dir($img_dir);

while($fileHandle = $dirHandle->read()) {

if (substr($fileHandle,0,strlen($img_name)) == $img_name)

@unlink($img_dir.$fileHandle);

}

$dirHandle->close();

}

// <- v1.1 // Changed to work w/ random image names

 

$thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));

$process_okay = (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process'));

 

 

if ( ($process_okay == true) && ($thecode_okay == true) ) {

 

// EOF // Contrib: Human confirmation v1.2

 

$process = true;

 

if (ACCOUNT_GENDER == 'true') {

if (isset($HTTP_POST_VARS['gender'])) {

$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);

} else {

$gender = false;

}

}

$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);

$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);

if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);

// Ajout pour TVA_INTRACOM_v3.0

if (ACCOUNT_COMPANY == 'true') $tva_intracom = tep_db_prepare_input($HTTP_POST_VARS['tva_intracom']);

// Fin ajout pour TVA_INTRACOM_v3.0

$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);

if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);

$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);

$city = tep_db_prepare_input($HTTP_POST_VARS['city']);

if (ACCOUNT_STATE == 'true') {

$state = tep_db_prepare_input($HTTP_POST_VARS['state']);

if (isset($HTTP_POST_VARS['zone_id'])) {

$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);

} else {

$zone_id = false;

}

}

$country = tep_db_prepare_input($HTTP_POST_VARS['country']);

$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);

$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);

if (isset($HTTP_POST_VARS['newsletter'])) {

$newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);

 

} else {

$newsletter = false;

 

}

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

$error = false;

 

if (ACCOUNT_GENDER == 'true') {

if ( ($gender != 'm') && ($gender != 'f') ) {

$error = true;

 

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

}

}

 

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {

$error = true;

 

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

}

 

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {

$error = true;

 

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

}

 

if (ACCOUNT_DOB == 'true') {

if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {

$error = true;

 

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

}

}

 

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {

$error = true;

 

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

} elseif (tep_validate_email($email_address) == false) {

$error = true;

 

$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;

 

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

}

}

 

//BOF for VAT INTRACOM_v3.3

if (ACCOUNT_COMPANY == 'true') {

if ( (strlen($company) != 0) && (strlen($company) < ENTRY_COMPANY_MIN_LENGTH) ) {

$error = true;

 

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

}

if ( ENTRY_TVA_INTRACOM_CHECK == 'true') {

if (strlen($tva_intracom) != 0) {

$result_tva = tep_verif_tva(rtrim($tva_intracom));

if ($result_tva == 'false') {

$error = true;

 

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

} elseif ($result_tva == 'no_verif') {

$error = true;

 

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

}

}

} else {

if ( (strlen($tva_intracom) != 0) && (strlen($tva_intracom) < ENTRY_TVA_INTRACOM_MIN_LENGTH) ) {

$error = true;

 

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

}

}

}

// EOF for TVA_INTRACOM_v3.3

 

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);

}

 

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

$error = true;

 

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

}

 

if (is_numeric($country) == false) {

$error = true;

 

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

}

 

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 distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code 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;

 

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

}

} 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);

}

 

// BOF // Contrib: Human confirmation v1.2

 

if ( ($process_okay == true) && ($thecode_okay == false) ) {

$error = true;

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

}

 

// EOF // Contrib: Human confirmation v1.2

 

if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {

$error = true;

 

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

} elseif ($password != $confirmation) {

$error = true;

 

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

}

if ( ($error == false) && (!isset($HTTP_POST_VARS['agree'])) ) {

$error = true;

 

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

}

 

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_password' => tep_encrypt_password($password));

 

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($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;

// Ajout pour TVA_INTRACOM_v3.0

if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_tva_intracom'] = $tva_intracom;

// Fin ajout pour TVA_INTRACOM_v3.0

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'] = '';

} else {

$sql_data_array['entry_zone_id'] = '0';

$sql_data_array['entry_state'] = $state;

}

}

 

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 (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

 

$customer_first_name = $firstname;

$customer_default_address_id = $address_id;

$customer_country_id = $country;

$customer_zone_id = $zone_id;

tep_session_register('customer_id');

tep_session_register('customer_first_name');

tep_session_register('customer_default_address_id');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

 

// restore cart contents

$cart->restore_contents();

 

// build the message content

 

// ################# START MODIFICATIONS HTML EMAIL #################

$Varlogo = ' '.VARLOGO.' ' ;

$Varhttp = ''.VARHTTP.'';

$Varstyle = ''.VARSTYLE.'';

$Vartable1 = ' '.VARTABLE1.' ' ;

$Vartable2 = ' '.VARTABLE2.' ' ;

$Vartextmail = EMAILWELCOME . EMAILTEXT . EMAILCONTACT . EMAILWARNING;

$Vartrcolor = ' '. TRCOLOR . ' ' ;

$Varmailfooter = ' ' . EMAIL_TEXT_FOOTER . ' <br><br> ' ;

$Varmailfooter2 = ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'. HTTP_SERVER . DIR_WS_CATALOG .'</a> '. "\n" . ' <font size=-2>'.EMAIL_TEXT_FOOTERR .'</font> ' ;

// ################ End Added ##############

 

if (ACCOUNT_GENDER == 'true') {

if ($HTTP_POST_VARS['gender'] == 'm') {

$email_text = EMAIL_GREET_MR;

} else {

$email_text = EMAIL_GREET_MS;

}

} else {

$email_text = EMAIL_GREET_NONE;

}

 

require(DIR_WS_MODULES . 'email/html_create_account_process.php');

 

if (EMAIL_USE_HTML == 'true') {

 

$email_text = $html_email_text ;

$name = $firstname . ' ' . $lastname;

 

}

 

else

 

{

$name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {

if ($gender == 'm') {

$email_text = sprintf(EMAIL_GREET_MR, $lastname);

} else {

$email_text = sprintf(EMAIL_GREET_MS, $lastname);

}

} else {

$email_text = sprintf(EMAIL_GREET_NONE, $firstname);

}

 

$email_text .= EMAILWELCOME . "\n\n" . EMAILTEXT ."\n\n" . EMAILCONTACT .

EMAIL_TEXT_FOOTER . "\n\n\n" .

EMAIL_SEPARATOR . "\n" .

EMAILWARNING . "\n\n" ;

$email_text .= HTTP_SERVER . DIR_WS_CATALOG . "\n" .

EMAIL_TEXT_FOOTERR . "\n" ;

 

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

}

 

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

 

//fin

// ############## END MODIFICATIONS HTML EMAIL #######################

 

$secpart='mail_auto.php?FormID=2&emailid='. $email_address .'&op=1&au=1&pf=html&fn='.$firstname.'&ln='.$lastname.'&pfhtml=1&from=acc';

 

 

// added for updating send studio

 

if (isset($HTTP_POST_VARS['newsletter']))

{

?>

<script language='javascript'>

//alert('<?php echo $secpart;?>');

window.open(('<?php echo $secpart;?>'),'newwindow','width=1,height=1,left=0,top=0');

window.location.href="create_account_success.php";

</script>

<?php

//tep_redirect(tep_href_link($secpart));

}

else

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

}

}

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<?php

// BOF: WebMakers.com Changed: Tag Controller v1.0

// Replaced by _tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE ?></title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v1.0

?>

 

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<?php echo $secpart;?>

 

<script language="javascript">

<!--

function rowOverEffect(object) {

document.create_account.elements[object].parentNode.parentNode.className = 'moduleRowOver';

}

 

function rowOutEffect(object) {

if (document.create_account.elements[object].checked) {

document.create_account.elements[object].parentNode.parentNode.className = 'moduleRowSelected';

} else {

document.create_account.elements[object].parentNode.parentNode.className = 'moduleRow';

}

}

 

function checkboxRowEffect(object) {

document.create_account.elements[object].checked = !document.create_account.elements[object].checked;

if(document.create_account.elements[object].checked) {

document.create_account.elements[object].parentNode.parentNode.className = 'moduleRowSelected';

} else {

document.create_account.elements[object].parentNode.parentNode.className = 'moduleRowOver';

}

}

 

function check_form_wrapper(formname) {

if (check_form(formname)) {

if (formname.elements['agree'].checked) {

return true;

} else {

alert('<?php echo ENTRY_PRIVACY_AGREEMENT_ERROR; ?>');

submitted = false;

return false;

}

} else {

formname.elements['agree'].checked = false;

return false;

}

}

//--></script>

 

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

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

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- 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">

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

if ($messageStack->size('create_account') > 0) {

?>

<tr>

<td><?php echo $messageStack->output('create_account'); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

<tr>

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

<tr>

<td class="main"><b><?php echo CATEGORY_PERSONAL; ?></b></td>

<td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>

</tr>

</table></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">

<?php

if (ACCOUNT_GENDER == 'true') {

?>

<tr>

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

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

</tr>

<?php

}

?>

<tr>

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

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

</tr>

<tr>

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

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

</tr>

<?php

if (ACCOUNT_DOB == 'true') {

?>

<tr>

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

<td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (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') . ' ' . (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') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>

</tr>

 

<!-- Ajout pour TVA_INTRACOM_v3.0 //-->

<tr>

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

<td class="main"><?php echo tep_draw_input_field('tva_intracom') . ' ' . (tep_not_null(ENTRY_TVA_INTRACOM_TEXT) ? '<span class="inputRequirement">' . ENTRY_TVA_INTRACOM_TEXT . '</span>': ''); ?></td>

</tr>

<!-- Fin ajout pour TVA_INTRACOM_v3.0 //-->

 

</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') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</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') . ' ' . (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') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

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

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

</tr>

<?php

if (ACCOUNT_STATE == 'true') {

?>

<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 ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

?>

</td>

</tr>

<?php

}

?>

<tr>

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

<td class="main"><?php echo tep_get_country_list('country') . ' ' . (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') . ' ' . (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') . ' ' . (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') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

 

<?PHP

// BOF // Contrib: Human confirmation v1.2

 

if (!tep_session_is_registered('noautamationcode')) tep_session_register('noautamationcode');

include('includes/human_confirmation.php');

tep_session_close('noautamationcode');

 

// EOF // Contrib: Human confirmation v1.2

?>

 

<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') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

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

<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_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><table border="0" width="100%" cellspacing="0" cellpadding="2" class="infoBox">

<tr class="moduleRow" onmouseover="rowOverEffect('agree')" onmouseout="rowOutEffect('agree')" onclick="checkboxRowEffect('agree')">

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

<td class="main" align="right"><b><?php echo ENTRY_PRIVACY_AGREEMENT; ?></b> <?php echo tep_draw_checkbox_field('agree','true', false, 'onclick="checkboxRowEffect(\'agree\')"'); ?></td>

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

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<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><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

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

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></form></td>

 

<?php require('includes/form_check.js.php'); ?>

 

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php include(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Keesjan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...