Jump to content
xt:Commerce Community Forum

Altersbeschränkung beim Registrieren


Recommended Posts

Hallo, und schon mal vorab vielen Dank für die Hilfe!

gibts eine Möglichkeit der Atlersbeschränkung , wenn sich Neukunden registrieren? Quasi eine Fehlermeldung, wie eine falsche mailadresse, die Anzeigt, daß man zu jung ist um sich als Kunde anzumelden

Viele Grüße

Benjamin

Link to comment
Share on other sites

ja ein Möglichkeit gibt es. Dein nächste Frage ist sicherlich wie macht man das und daran wird es hapern weil es gar nicht so einfach ist! Ich habe sowas realisiert aber nicht dokumentiert.

Ein andere Methode ist der Geburtsdatum nicht als freies Feld, sondern als Kalendar darzustellen und einfach der Anzeige beschränken.

T

Link to comment
Share on other sites

Hier habe ich einfach kopiert und eingefügt. Ob es ein Sinn hat der Alter abzufangen bleibt offen. Wenn jemanden unter 18 etwas haben will dann bekommen die das auch immer.

in create_account.php

if (ACCOUNT_DOB == 'true') {

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

$error = true;

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

}

function agecheck($birthday)

{

list($day, $month, $year) = explode(".",$birthday);

$year_diff = date("Y") - $year;

$month_diff = date("m") - $month;

$day_diff = date("d") - $day;

if ($month_diff < 0) $year_diff--;

elseif (($month_diff==0) && ($day_diff < 0)) $year_diff--;

return $year_diff;

}

$dob18 = agecheck($dob);

if ($dob18 < 18) {

$error = true;

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

}

}

Link to comment
Share on other sites

  • 4 months later...

die german.php (lang/german) ebenfalls anpassen.

Suche

define('ENTRY_DATE_OF_BIRTH_ERROR', 'Ihr Geburtsdatum muss im Format TT.MM.JJJJ (zB. 21.05.1970) eingeben werden');

füge drunter ein:

define('ENTRY_DATE_OF_BIRTH_U18_ERROR', 'Sorry, Sie muessen mind. 18 Jahre alt sein');

Link to comment
Share on other sites

@Rovert

Dein Script funktioniert nicht immer... ich versuche rauszufinden warum die Fehlermeldung nicht immer auftaucht....

Habe mal nur zum Testen 01.01.1998 eingegeben... wäre also 10 Jahre alt... leider nimmt er das....

Wenn du einen Tipp hast, dann her damit ;-)

Link to comment
Share on other sites

Ich ziehe meine Aussage zurück....

Habe es auf vielen Rechnern getestet... mit Linux und XP ... es läüft...

...also ist das schon richtig eingebaut...

Jedoch unter Vista funktioniert es unter IE nicht. Keine Blocker oder ähnliches vorhanden.

Weiß jetzt leider nicht, ob es nur den einen Rechner betrifft...

Link to comment
Share on other sites

  • 1 month later...

@Rovert

Würdest du nochmal drüberschauen... ich weiß nicht warum, doch unter Mozilla funktioniert es, jedoch NICHT unter IE (7.0)

Hier der Code von create_account.php

<?php


/* -----------------------------------------------------------------------------------------

   $Id: create_account.php 1311 2005-10-18 12:30:40Z mz $   


   XT-Commerce - community made shopping

   http://www.xt-commerce.com


   Copyright (c) 2003 XT-Commerce

   -----------------------------------------------------------------------------------------

   based on: 

   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)

   (c) 2002-2003 osCommerce(create_account.php,v 1.63 2003/05/28); www.oscommerce.com

   (c) 2003  nextcommerce (create_account.php,v 1.27 2003/08/24); www.nextcommerce.org 


   Released under the GNU General Public License 

   -----------------------------------------------------------------------------------------

   Third Party contribution:


   Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)

   http://www.oscommerce.com/community/contributions,282

   Copyright (c) Strider | [email protected]

   Copyright (c  Nick Stanko of UkiDev.com, [email protected]

   Copyright (c) Andre [email protected]

   Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org



   Released under the GNU General Public License

   ---------------------------------------------------------------------------------------*/


include ('includes/application_top.php');


require_once (DIR_FS_INC.'xtc_random_charcode.inc.php');

require_once (DIR_FS_INC.'xtc_rand.inc.php');

function new_customer_id($space='-'){

$new_cid='';

$start_cid = 6125;

$year = date("y");

$month = date("m");

$sign = 'KD';

$cid_query = xtc_db_query("SELECT customers_cid FROM ".TABLE_CUSTOMERS."

ORDER BY customers_date_added DESC LIMIT 1");

$last_cid = xtc_db_fetch_array($cid_query);

$arr_cid = explode($space,$last_cid['customers_cid']);

if($arr_cid[1]

? $new_cid = $sign . $year . $month . $space . ($arr_cid[1]+1)

: $new_cid = $sign . $year . $month . $space . $start_cid);

return $new_cid;

}



if (isset ($_SESSION['customer_id'])) {

	xtc_redirect(xtc_href_link(FILENAME_ACCOUNT, '', 'SSL'));

}


// create smarty elements

$smarty = new Smarty;

// include boxes

require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');


// include needed functions

require_once (DIR_FS_INC.'xtc_get_country_list.inc.php');

require_once (DIR_FS_INC.'xtc_validate_email.inc.php');

require_once (DIR_FS_INC.'xtc_encrypt_password.inc.php');

require_once (DIR_FS_INC.'xtc_get_geo_zone_code.inc.php');

require_once (DIR_FS_INC.'xtc_write_user_info.inc.php');


$process = false;

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

	$process = true;


	if (ACCOUNT_GENDER == 'true')

		$gender = xtc_db_prepare_input($_POST['gender']);

	$firstname = xtc_db_prepare_input($_POST['firstname']);

	$lastname = xtc_db_prepare_input($_POST['lastname']);

	if (ACCOUNT_DOB == 'true')

		$dob = xtc_db_prepare_input($_POST['dob']);

	$email_address = xtc_db_prepare_input($_POST['email_address']);

	if (ACCOUNT_COMPANY == 'true')

		$company = xtc_db_prepare_input($_POST['company']);

	if (ACCOUNT_COMPANY_VAT_CHECK == 'true')

		$vat = xtc_db_prepare_input($_POST['vat']);

	$street_address = xtc_db_prepare_input($_POST['street_address']);

	if (ACCOUNT_SUBURB == 'true')

		$suburb = xtc_db_prepare_input($_POST['suburb']);

	$postcode = xtc_db_prepare_input($_POST['postcode']);

	$city = xtc_db_prepare_input($_POST['city']);

	$zone_id = xtc_db_prepare_input($_POST['zone_id']);

	if (ACCOUNT_STATE == 'true')

		$state = xtc_db_prepare_input($_POST['state']);

	$country = xtc_db_prepare_input($_POST['country']);

	$telephone = xtc_db_prepare_input($_POST['telephone']);

	$fax = xtc_db_prepare_input($_POST['fax']);

	$newsletter = '0';

	$password = xtc_db_prepare_input($_POST['password']);

	$confirmation = xtc_db_prepare_input($_POST['confirmation']);


	// Newsletter Erweiterung

	$aut_newsletter = xtc_db_prepare_input($_POST['aut_newsletter']);

	// Newsletter Erweiterung eof


	$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(xtc_date_raw($dob), 4, 2), substr(xtc_date_raw($dob), 6, 2), substr(xtc_date_raw($dob), 0, 4)) == false) {

$error = true;

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

}


function agecheck($birthday)

{

list($day, $month, $year) = explode(".",$birthday);

$year_diff = date("Y") - $year;

$month_diff = date("m") - $month;

$day_diff = date("d") - $day;


if ($month_diff < 0) $year_diff--;

elseif (($month_diff==0) && ($day_diff < 0)) $year_diff--;


return $year_diff;

}


$dob18 = agecheck($dob);


if ($dob18 < 18) {

$error = true;

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

}


}


// New VAT Check

	require_once(DIR_WS_CLASSES.'vat_validation.php');

	$vatID = new vat_validation($vat, '', '', $country);


	$customers_status = $vatID->vat_info['status'];

	$customers_vat_id_status = $vatID->vat_info['vat_id_status'];

	$error = $vatID->vat_info['error'];


	if($error==1){

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

	$error = true;

  }


// New VAT CHECK END


	// xt:booster prefill (customer group)

		if($_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP']!='')

			$customers_status['customers_status_id'] = $_SESSION['xtb0']['DEFAULT_CUSTOMER_GROUP'];

		// xt:booster prefill end



	if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {

		$error = true;


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

	}

	elseif (xtc_validate_email($email_address) == false) {

		$error = true;


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

	} else {

		$check_email_query = xtc_db_query("select count(*) as total from ".TABLE_CUSTOMERS." where customers_email_address = '".xtc_db_input($email_address)."' and account_type = '0'");

		$check_email = xtc_db_fetch_array($check_email_query);

		if ($check_email['total'] > 0) {

			$error = true;


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

	}


	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 = xtc_db_query("select count(*) as total from ".TABLE_ZONES." where zone_country_id = '".(int) $country."'");

		$check = xtc_db_fetch_array($check_query);

		$entry_state_has_zones = ($check['total'] > 0);

		if ($entry_state_has_zones == true) {

			$zone_query = xtc_db_query("select distinct zone_id from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' and (zone_name like '".xtc_db_input($state)."%' or zone_code like '%".xtc_db_input($state)."%')");

			if (xtc_db_num_rows($zone_query) > 1) {

				$zone_query = xtc_db_query("select distinct zone_id from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' and zone_name = '".xtc_db_input($state)."'");

			}

			if (xtc_db_num_rows($zone_query) >= 1) {

				$zone = xtc_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);

	}


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

	}


	//don't know why, but this happens sometimes and new user becomes admin

	if ($customers_status == 0 || !$customers_status)

		$customers_status = DEFAULT_CUSTOMERS_STATUS_ID;

	if (!$newsletter)

		$newsletter = 0;

	if ($error == false) {

		$sql_data_array = array ('customers_vat_id' => $vat, 'customers_vat_id_status' => $customers_vat_id_status, 'customers_status' => $customers_status, 'customers_firstname' => $firstname, 'customers_lastname' => $lastname, 'customers_email_address' => $email_address, 'customers_telephone' => $telephone, 'customers_fax' => $fax, 'customers_newsletter' => $newsletter, 'customers_password' => xtc_encrypt_password($password),'customers_date_added' => 'now()','customers_last_modified' => 'now()');


		if (ACCOUNT_GENDER == 'true')

			$sql_data_array['customers_gender'] = $gender;

		if (ACCOUNT_DOB == 'true')

			$sql_data_array['customers_dob'] = xtc_date_raw($dob);


		//Automatisch Kundennummer fortlaufend anlegen:

		$sql_data_array['customers_cid'] = new_customer_id();



		xtc_db_perform(TABLE_CUSTOMERS, $sql_data_array);


		$_SESSION['customer_id'] = xtc_db_insert_id();

		$user_id = xtc_db_insert_id();

		xtc_write_user_info($user_id);

		$sql_data_array = array ('customers_id' => $_SESSION['customer_id'], 'entry_firstname' => $firstname, 'entry_lastname' => $lastname, 'entry_street_address' => $street_address, 'entry_postcode' => $postcode, 'entry_city' => $city, 'entry_country_id' => $country,'address_date_added' => 'now()','address_last_modified' => 'now()');


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

			} else {

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

				$sql_data_array['entry_state'] = $state;

			}

		}


		xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);


		$address_id = xtc_db_insert_id();


		xtc_db_query("update ".TABLE_CUSTOMERS." set customers_default_address_id = '".$address_id."' where customers_id = '".(int) $_SESSION['customer_id']."'");


		xtc_db_query("insert into ".TABLE_CUSTOMERS_INFO." (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('".(int) $_SESSION['customer_id']."', '0', now())");


		if (SESSION_RECREATE == 'True') {

			xtc_session_recreate();

		}


		// Newsletter Erweiterung

		if($aut_newsletter == 'true') {


			$vlcode = xtc_random_charcode(32);

			$link = xtc_href_link(FILENAME_NEWSLETTER, 'action=activate&email='.$email_address.'&key='.$vlcode, 'NONSSL');


			// assign language to template for caching

			$smarty->assign('language', $_SESSION['language']);

			$smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');

			$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');


			// assign vars

			$smarty->assign('EMAIL', xtc_db_input($_POST['email']));

			$smarty->assign('LINK', $link);

			// dont allow cache

			$smarty->caching = false;


			// create mails

			$newsletter_html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/newsletter_mail.html');

			$newsletter_txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/newsletter_mail.txt');


			$sql_data_array = array ('customers_email_address' => $email_address, 'customers_id' => $_SESSION['customer_id'], 'customers_status' => $customers_status, 'customers_firstname' => $firstname, 'customers_lastname' => $lastname, 'mail_status' => '0', 'mail_key' => xtc_db_input($vlcode), 'date_added' => 'now()');

			xtc_db_perform(TABLE_NEWSLETTER_RECIPIENTS, $sql_data_array);


			if (SEND_EMAILS == true) {

				xtc_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, xtc_db_input($email_address), '', '', EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', TEXT_EMAIL_SUBJECT, $newsletter_html_mail, $newsletter_txt_mail);

			}

		}	

		// Newsletter Erweiterung eof


		$_SESSION['customer_first_name'] = $firstname;

		$_SESSION['customer_last_name'] = $lastname;

		$_SESSION['customer_default_address_id'] = $address_id;

		$_SESSION['customer_country_id'] = $country;

		$_SESSION['customer_zone_id'] = $zone_id;

		$_SESSION['customer_vat_id'] = $vat;


		// restore cart contents

		$_SESSION['cart']->restore_contents();


		// build the message content

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


		// load data into array

		$module_content = array ();

		$module_content = array ('MAIL_NAME' => $name, 'MAIL_REPLY_ADDRESS' => EMAIL_SUPPORT_REPLY_ADDRESS, 'MAIL_GENDER' => $gender);


		// assign data to smarty

		$smarty->assign('language', $_SESSION['language']);

		$smarty->assign('logo_path', HTTP_SERVER.DIR_WS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/img/');

		$smarty->assign('content', $module_content);

		$smarty->caching = false;


if (isset ($_SESSION['tracking']['refID'])){

      $campaign_check_query_raw = "SELECT *

			                            FROM ".TABLE_CAMPAIGNS." 

			                            WHERE campaigns_refID = '".$_SESSION[tracking][refID]."'";

			$campaign_check_query = xtc_db_query($campaign_check_query_raw);

		if (xtc_db_num_rows($campaign_check_query) > 0) {

			$campaign = xtc_db_fetch_array($campaign_check_query);

			$refID = $campaign['campaigns_id'];

			} else {

			$refID = 0;

		            }


			 xtc_db_query("update " . TABLE_CUSTOMERS . " set

                                 refferers_id = '".$refID."'

                                 where customers_id = '".(int) $_SESSION['customer_id']."'");


			$leads = $campaign['campaigns_leads'] + 1 ;

		     xtc_db_query("update " . TABLE_CAMPAIGNS . " set

		                         campaigns_leads = '".$leads."'

                                 where campaigns_id = '".$refID."'");		

}



		if (ACTIVATE_GIFT_SYSTEM == 'true') {

			// GV Code Start

			// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* BEGIN

			if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {

				$coupon_code = create_coupon_code();

				$insert_query = xtc_db_query("insert into ".TABLE_COUPONS." (coupon_code, coupon_type, coupon_amount, date_created) values ('".$coupon_code."', 'G', '".NEW_SIGNUP_GIFT_VOUCHER_AMOUNT."', now())");

				$insert_id = xtc_db_insert_id($insert_query);

				$insert_query = xtc_db_query("insert into ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('".$insert_id."', '0', 'Admin', '".$email_address."', now() )");


				$smarty->assign('SEND_GIFT', 'true');

				$smarty->assign('GIFT_AMMOUNT', $xtPrice->xtcFormat(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT, true));

				$smarty->assign('GIFT_CODE', $coupon_code);

				$smarty->assign('GIFT_LINK', xtc_href_link(FILENAME_GV_REDEEM, 'gv_no='.$coupon_code, 'NONSSL', false));


			}

			if (NEW_SIGNUP_DISCOUNT_COUPON != '') {

				$coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;

				$coupon_query = xtc_db_query("select * from ".TABLE_COUPONS." where coupon_code = '".$coupon_code."'");

				$coupon = xtc_db_fetch_array($coupon_query);

				$coupon_id = $coupon['coupon_id'];

				$coupon_desc_query = xtc_db_query("select * from ".TABLE_COUPONS_DESCRIPTION." where coupon_id = '".$coupon_id."' and language_id = '".(int) $_SESSION['languages_id']."'");

				$coupon_desc = xtc_db_fetch_array($coupon_desc_query);

				$insert_query = xtc_db_query("insert into ".TABLE_COUPON_EMAIL_TRACK." (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('".$coupon_id."', '0', 'Admin', '".$email_address."', now() )");


				$smarty->assign('SEND_COUPON', 'true');

				$smarty->assign('COUPON_DESC', $coupon_desc['coupon_description']);

				$smarty->assign('COUPON_CODE', $coupon['coupon_code']);


			}

			// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* END

			// GV Code End       // create templates

		}

		$smarty->caching = 0;

		$html_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/create_account_mail.html');

		$smarty->caching = 0;

		$txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/create_account_mail.txt');


		xtc_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, $email_address, $name, EMAIL_SUPPORT_FORWARDING_STRING, EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', EMAIL_SUPPORT_SUBJECT, $html_mail, $txt_mail);


		if (!isset ($mail_error)) {

			xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));

		} else {

			echo $mail_error;

		}

	}

}


$breadcrumb->add(NAVBAR_TITLE_CREATE_ACCOUNT, xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));


require (DIR_WS_INCLUDES.'header.php');


// xt:booster prefill

		if(@isset($_SESSION['xtb0']['tx']))

		{

			$GLOBALS['gender']=			'm';

			$GLOBALS['firstname']=		substr($_SESSION['xtb0']['tx']['XTB_EBAY_NAME'],0,strpos($_SESSION['xtb0']['tx']['XTB_EBAY_NAME']," "));

			$GLOBALS['lastname']=		substr($_SESSION['xtb0']['tx']['XTB_EBAY_NAME'],strpos($_SESSION['xtb0']['tx']['XTB_EBAY_NAME']," ")+1,strlen($_SESSION['xtb0']['tx']['XTB_EBAY_NAME']));

			$GLOBALS['street_address']=	$_SESSION['xtb0']['tx']['XTB_EBAY_STREET'];

			$GLOBALS['postcode']=		$_SESSION['xtb0']['tx']['XTB_EBAY_POSTALCODE'];

			$GLOBALS['city']=			$_SESSION['xtb0']['tx']['XTB_EBAY_CITY'];

			$GLOBALS['country']=		$_SESSION['xtb0']['tx']['XTB_EBAY_COUNTRYNAME'];

			$GLOBALS['email_address']=	$_SESSION['xtb0']['tx']['XTB_EBAY_EMAIL'];

			$GLOBALS['telephone']=		$_SESSION['xtb0']['tx']['XTB_EBAY_PHONE'];

		}

		// xt:booster prefill end




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

	$smarty->assign('error', $messageStack->output('create_account'));


}

$smarty->assign('FORM_ACTION', xtc_draw_form('create_account', xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"').xtc_draw_hidden_field('action', 'process'));


// Newsletter Erweiterung

$smarty->assign('INPUT_AUT_NEWSLETTER', xtc_draw_checkbox_field('aut_newsletter', 'true', true));

// Newsletter Erweiterung eof


if (ACCOUNT_GENDER == 'true') {

	$smarty->assign('gender', '1');


	$smarty->assign('INPUT_MALE', xtc_draw_radio_field(array ('name' => 'gender', 'suffix' => MALE), 'm'));

	$smarty->assign('INPUT_FEMALE', xtc_draw_radio_field(array ('name' => 'gender', 'suffix' => FEMALE, 'text' => (xtc_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">'.ENTRY_GENDER_TEXT.'</span>' : '')), 'f'));


} else {

	$smarty->assign('gender', '0');

}


$smarty->assign('INPUT_FIRSTNAME', xtc_draw_input_fieldNote(array ('name' => 'firstname', 'text' => ' '. (xtc_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">'.ENTRY_FIRST_NAME_TEXT.'</span>' : ''))));

$smarty->assign('INPUT_LASTNAME', xtc_draw_input_fieldNote(array ('name' => 'lastname', 'text' => ' '. (xtc_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">'.ENTRY_LAST_NAME_TEXT.'</span>' : ''))));


if (ACCOUNT_DOB == 'true') {

	$smarty->assign('birthdate', '1');


	$smarty->assign('INPUT_DOB', xtc_draw_input_fieldNote(array ('name' => 'dob', 'text' => ' '. (xtc_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">'.ENTRY_DATE_OF_BIRTH_TEXT.'</span>' : ''))));


} else {

	$smarty->assign('birthdate', '0');

}


$smarty->assign('INPUT_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'email_address', 'text' => ' '. (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">'.ENTRY_EMAIL_ADDRESS_TEXT.'</span>' : ''))));


if (ACCOUNT_COMPANY == 'true') {

	$smarty->assign('company', '1');

	$smarty->assign('INPUT_COMPANY', xtc_draw_input_fieldNote(array ('name' => 'company', 'text' => ' '. (xtc_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">'.ENTRY_COMPANY_TEXT.'</span>' : ''))));

} else {

	$smarty->assign('company', '0');

}


if (ACCOUNT_COMPANY_VAT_CHECK == 'true') {

	$smarty->assign('vat', '1');

	$smarty->assign('INPUT_VAT', xtc_draw_input_fieldNote(array ('name' => 'vat', 'text' => ' '. (xtc_not_null(ENTRY_VAT_TEXT) ? '<span class="inputRequirement">'.ENTRY_VAT_TEXT.'</span>' : ''))));

} else {

	$smarty->assign('vat', '0');

}


$smarty->assign('INPUT_STREET', xtc_draw_input_fieldNote(array ('name' => 'street_address', 'text' => ' '. (xtc_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">'.ENTRY_STREET_ADDRESS_TEXT.'</span>' : ''))));


if (ACCOUNT_SUBURB == 'true') {

	$smarty->assign('suburb', '1');

	$smarty->assign('INPUT_SUBURB', xtc_draw_input_fieldNote(array ('name' => 'suburb', 'text' => ' '. (xtc_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">'.ENTRY_SUBURB_TEXT.'</span>' : ''))));


} else {

	$smarty->assign('suburb', '0');

}


$smarty->assign('INPUT_CODE', xtc_draw_input_fieldNote(array ('name' => 'postcode', 'text' => ' '. (xtc_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">'.ENTRY_POST_CODE_TEXT.'</span>' : ''))));

$smarty->assign('INPUT_CITY', xtc_draw_input_fieldNote(array ('name' => 'city', 'text' => ' '. (xtc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">'.ENTRY_CITY_TEXT.'</span>' : ''))));


if (ACCOUNT_STATE == 'true') {

	$smarty->assign('state', '1');


	if ($process == true) {

		if ($entry_state_has_zones == true) {

			$zones_array = array ();

			$zones_query = xtc_db_query("select zone_name from ".TABLE_ZONES." where zone_country_id = '".(int) $country."' order by zone_name");

			while ($zones_values = xtc_db_fetch_array($zones_query)) {

				$zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

			}

			$state_input = xtc_draw_pull_down_menuNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')), $zones_array);

		} else {

			$state_input = xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')));

		}

	} else {

		$state_input = xtc_draw_input_fieldNote(array ('name' => 'state', 'text' => ' '. (xtc_not_null(ENTRY_STATE_TEXT) ? '<span class="inputRequirement">'.ENTRY_STATE_TEXT.'</span>' : '')));

	}


	$smarty->assign('INPUT_STATE', $state_input);

} else {

	$smarty->assign('state', '0');

}


if ($_POST['country']) {

	$selected = $_POST['country'];

} else {

	$selected = STORE_COUNTRY;

}


$smarty->assign('SELECT_COUNTRY', xtc_get_country_list(array ('name' => 'country', 'text' => ' '. (xtc_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">'.ENTRY_COUNTRY_TEXT.'</span>' : '')), $selected));

$smarty->assign('INPUT_TEL', xtc_draw_input_fieldNote(array ('name' => 'telephone', 'text' => ' '. (xtc_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">'.ENTRY_TELEPHONE_NUMBER_TEXT.'</span>' : ''))));

$smarty->assign('INPUT_FAX', xtc_draw_input_fieldNote(array ('name' => 'fax', 'text' => ' '. (xtc_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">'.ENTRY_FAX_NUMBER_TEXT.'</span>' : ''))));

$smarty->assign('INPUT_PASSWORD', xtc_draw_password_fieldNote(array ('name' => 'password', 'text' => ' '. (xtc_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">'.ENTRY_PASSWORD_TEXT.'</span>' : ''))));

$smarty->assign('INPUT_CONFIRMATION', xtc_draw_password_fieldNote(array ('name' => 'confirmation', 'text' => ' '. (xtc_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">'.ENTRY_PASSWORD_CONFIRMATION_TEXT.'</span>' : ''))));

$smarty->assign('FORM_END', '</form>');

$smarty->assign('language', $_SESSION['language']);

$smarty->caching = 0;

$smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/create_account.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');

?>

Link to comment
Share on other sites

Archived

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

×
  • Create New...