insérer un formulaire de calcule de mensualité

badibad
Invité n'ayant pas de compte PHPfrance

29 mai 2007, 22:36

merci je sais pas comment te remercier je suis désoler mes connaissance son trop faible mais grace à toi j'ai apris beaucoup de choses voici le formulaire en entier :D ps merci de ne pas te moquer j'ai fait suivant mes connaissance (ce qui veut dir pas grand choses)
<?php
/*
  $Id: createPOaccount.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $

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

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');
  
   if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  }

  

// needs to be included earlier to set the success message in the messageStack
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATEPOACCOUNT);

  $process = false;
  if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
    $process = true;

    if (ACCOUNT_GENDER == 'true') {
      if (isset($HTTP_POST_VARS['gender'])) {
        $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
      } else {
        $gender = false;
      }
    }
    $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
    $creditrequest = tep_db_prepare_input($HTTP_POST_VARS['creditrequest']);
    $street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
    $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;
      }
    }
    $postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
    $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
    $lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
    $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
    $mensualite = tep_db_prepare_input($HTTP_POST_VARS['mensualite']);
    $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);  
    $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']);
    $time_in_business = tep_db_prepare_input($HTTP_POST_VARS['time_in_business']);
    $company_type = tep_db_prepare_input($HTTP_POST_VARS['company_type']);
    $number_of_employees = tep_db_prepare_input($HTTP_POST_VARS['number_of_employees']);
    $credit_ref1 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1']);
    $credit_ref1address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1address']);
    $credit_ref1city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1city']);
    $credit_ref1state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1state']);
    $credit_ref1phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1phone']);
    $credit_ref1fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1fax']);
    $credit_ref2 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2']);
    $credit_ref2address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2address']);
    $credit_ref2city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2city']);
    $credit_ref2state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2state']);
    $credit_ref2phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2phone']);
    $credit_ref2fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2fax']);
    $credit_ref3 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3']);
    $credit_ref3address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3address']);
    $credit_ref3city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3city']);
    $credit_ref3state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3state']);
    $credit_ref3phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3phone']);
    $credit_ref3fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3fax']);
    $contacttelephone = tep_db_prepare_input($HTTP_POST_VARS['contacttelephone']);
    
    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 == 'false') {
      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 = false;

        $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) == true) {
      $error = 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)
	{  //PWA delete account
    	$get_customer_info = tep_db_query("select customers_id, customers_email_address, purchased_without_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
		$customer_info = tep_db_fetch_array($get_customer_info);
		$customer_id = $customer_info['customers_id'];
		$customer_email_address = $customer_info['customers_email_address'];
		$customer_pwa = $customer_info['purchased_without_account'];
		if ($customer_pwa !='1')
		{
        $error = false;

        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        } else {
			tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . $customer_id . "'");
		}
      }
	// END
    }

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


    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) {
      $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 == 'false') $sql_data_array['customers_dob'] = tep_date_raw($dob);
      if (ACCOUNT_DOB == 'false') $sql_data_array['customers_email_address'] = $email_address;
      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'] = '';
        } 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
      $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 .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
      
      // ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* BEGIN
  if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
    $coupon_code = create_coupon_code();
    $insert_query = tep_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 = tep_db_insert_id($insert_query);
    $insert_query = tep_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() )");

    $email_text .= sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" .
                   sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" .
                   EMAIL_GV_LINK . tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code,'NONSSL', false) .
                   "\n\n";
  }
  if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
    $coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
    $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . "'");
    $coupon = tep_db_fetch_array($coupon_query);
    $coupon_id = $coupon['coupon_id'];
    $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int)$languages_id . "'");
    $coupon_desc = tep_db_fetch_array($coupon_desc_query);
    $insert_query = tep_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() )");
    $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .  "\n" .
                   sprintf("%s", $coupon_desc['coupon_description']) ."\n\n" .
                   sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" .
                   "\n\n";
  }

// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* END
      tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
      
      $email_text2 = EMAIL_TEXT2;
      tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $email_text2, $name, $email_address);
      tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text2, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
      tep_redirect(tep_href_link(FILENAME_COFIDISRETURN, '', 'SSL'));
          }
  }
  
  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATEPOACCOUNT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>

<meta http-equiv="Content-Language" content="fr">

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_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
?>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5
?>
<?php

   $sql_data_array = array('customers_firstname' => $firstname,
                              'customers_lastname' => $lastname,
                              'customers_email_address' => $email_address,
                              'customers_telephone' => $telephone,
                              'customers_fax' => $fax);

  $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
  $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

  include(DIR_WS_CLASSES . 'order.php');
  $order = new order($oID);
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADDRESS_BOOK_PROCESS);

  
  $account_query = tep_db_query("select customers_gender, customers_firstname, customers_lastname, customers_dob, customers_email_address, customers_telephone, customers_fax from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
  $account = tep_db_fetch_array($account_query);

$credit_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, ci.customers_info_date_account_created, ci.customers_info_number_of_logons, ci.customers_info_date_account_last_modified, ci.customers_info_date_of_last_logon, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on (c.customers_default_address_id = a.address_book_id) left join " . TABLE_CUSTOMERS_INFO . " ci on (c.customers_id = ci.customers_info_id) where a.customers_id = c.customers_id and c.customers_id = '" . (int)$customer_id  . "'");
$credit = tep_db_fetch_array($credit_query);
$montant = $order->info['total']; 
tep_session_register('orders_total'); 
$orders_id=$insert_id; 
tep_session_register('orders_id'); 


?>


<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
	<td width="500">
									<img height="73" src="http://www.esinger.fr/templates/Pixame_v1/images/header_title.gif" width="421"></td>
									<td width="100%" background="http://www.esinger.fr/templates/Pixame_v1/images/header_background.gif" height="73">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr class="header">
											<td class="ShowCartDetails" vAlign="center" align="right" height="30">&nbsp;</td>
										</tr>
									</table>
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
									</table>
									</td>
									<td>
									<img height="73" src="http://www.esinger.fr/templates/Pixame_v1/images/header_right.gif" width="80"></td>
								</tr>
							</table>
							<table cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="345">
									<img height="23" src="http://www.esinger.fr/templates/Pixame_v1/images/slogan.gif" width="345"></td>
									<td width="100%" background="http://www.esinger.fr/templates/Pixame_v1/images/slogan_middle.gif">&nbsp;</td>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
								</tr>
							</table>
							<table height="20" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
									<td width="33%" bgColor="#d2dbf5">&nbsp;</td>
									<td align="right" width="77%" bgColor="#d2dbf5">&nbsp;</td>
									<td width="5" bgColor="#d2dbf5">&nbsp;</td>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
								</tr>
							</table>
							<table cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="5">
									<img height="25" src="http://www.esinger.fr/templates/Pixame_v1/images/links_left.gif" width="5"></td>
									<td background="http://www.esinger.fr/templates/Pixame_v1/images/links_middle.gif">
									<div align="center">
										<font class="storyboxtitle">
										<font size="1">
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										</font>
										<a class="HeaderPageLinks" href="http://www.esinger.fr/index.php">
										<font size="1">ACCUEIL</font></a><font size="1">&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/login.php">
										S'IDENTIFIER</a>&nbsp;&nbsp;&nbsp;<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/specials.php">
										VENTE FLASH</a>&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/products_new.php">
										NOUVEAUTES</a>&nbsp;&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4">
										<a href="http://www.esinger.fr/../../login.php">
										<span style="TEXT-DECORATION: none">
										MEMBRES</span></a>&nbsp;&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4"><a href="http://www.esinger.fr/../../forums.php"><span style="TEXT-DECORATION: none"> 
										FORUMS&nbsp;&nbsp;</span></a>&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4">
										<a href="http://www.esinger.fr/../../links.php">
										<span style="TEXT-DECORATION: none">
										LIENS&nbsp;</span></a>&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/allprods.php">
										CATALOGUE</a>&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										</font>
										<a href="http://www.esinger.fr/contact_us.php">
										<font size="1">CONTACT </font> </a></font></div>
									</td>
									<td width="5">
									<img height="25" src="http://www.esinger.fr/templates/Pixame_v1/images/links_right.gif" width="5"></td>
<!-- 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_CREATEPOACCOUNT, '', '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 class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>   
  <tr>
        <td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
      </tr>
    <?php
  if ($messageStack->size('create_account') > 0) {
?>
      <tr>
        <td><?php echo $messageStack->output('create_account'); ?></td>
      </tr>
      <tr>
        <td height="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
  }
?>
      <tr><td  <font style="font-size: 10pt; font-style:normal">&nbsp;<p><b>
		Votre identité</b></font></td>  
            
            </td>
      </tr>
    
      
          <tr>   
</td>
<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" height="5"><?php echo ENTRY_GENDER; ?></td>
                <td class="main" height="5"><?php echo tep_draw_radio_field('gender', 'm') . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f') . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . tep_draw_radio_field('gender', 'Mlle') . '&nbsp;&nbsp;' . MLLE . '&nbsp;'. (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
                <td class="main"><?php echo tep_draw_input_field('firstname', $account['customers_firstname']). '&nbsp;' . (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', $account['customers_lastname']). '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
              </tr>
             <tr>
                <td class="main"><?php echo ENTRY_DATE_OF_BIRTH ?></td>  
              <td class="main"><?php echo tep_draw_input_field('dob', $account['customers_dob']). '&nbsp;' . (tep_not_null(ENTRY_DATE_OF_BIRTH) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_EMAIL_ADDRESS ?></td>  
              <td class="main"><?php echo tep_draw_input_field('email_address', $account['customers_email_address']). '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
              </tr>
             


				
			                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p>
									<b>Pièce d'identité</b></font></td>  						
										<tr>
										<th align="left"><span style="font-weight: 400">
										<font style="font-size: 8pt">Nationalité 
										</font> </span></th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite1" type="radio" value="Française" name="nationalite" checked></span></font><font style="font-size: 8pt">Française&nbsp;
										</font>
										<font size="1">
										<span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite2" type="radio" value="CEE" name="nationalite"></span><font style="font-size: 8pt">CEE&nbsp;
										</font><span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite3" type="radio" value="Hors CEE" name="nationalite"></span><font style="font-size: 8pt">Hors 
										CEE&nbsp; </font> </font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> </td>
										<td class="check" id="formValidatorTdradio=nationalite">
										<div id="erreurradio=nationalite">
&nbsp;</div>
										</td>
										</tr>
										<th align="left">
										<address align="left">
											<span style="font-style: normal; font-weight: 400; font-size: 8pt">
											N</span><span style="font-size: 8pt; font-weight: 400; font-style:normal">ature 
											de la pièce</span></address>
										<address>
											<span style="font-size: 8pt; font-weight: 400; font-style:normal">
											&nbsp;(carte d identité de séjour ou 
											passeport)</span></address>
				</th>
										<td align="left">
										<span style="font-size: 8pt">
										<input class="txt" name="naturepiece"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>
											<tr>
										<th align="left"><span style="font-size: 8pt; font-weight: 400">
										N°de votre pièce</span></th>
										<td>
										<span style="font-size: 8pt">
										<input class="txt" name="datecni"> 
										</span> 
										<font color="#FF0000">
										<span style="font-size: 8pt">*</span></font></td>
										</tr>
										<tr>
										<th align="left">
										<span style="font-weight: 400">
										<font style="font-size: 8pt">lieu</font></span><font style="font-size: 8pt"></font></font><span style="font-weight: 400"><font style="font-size: 8pt"> 
										de délivrance</font></span><td>
										<span style="font-size: 8pt"><input class="txt" name="datedelivrance"> 
										</span> 
										<font color="#FF0000">
										<span style="font-size: 8pt">*</span></font></td>
									</tr>
									<tr>
		<td class="main" align="left">
		<address>
			<font style="font-style:normal; font-size:8pt">Date de </font>
		</address>
		<address>
			<font style="font-style:normal; font-size:8pt">délivrance:</font></address>
		</td>
		<td class="main" align="left"><font size="1">
		<span style="font-size: 8pt"><input name="datedélivrance"></span></font><font style="font-size: 8pt">&nbsp;</font><span class="inputRequirement"><font style="font-size: 8pt"><font color="#FF0000">*</font> 
		(ex.03/02/1961)</font></span></td>
	</tr>	
									<tr class="nomjf">
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Nom de </font></span>
										</address>
										<address>
											<span style="font-weight: 400; font-style:normal">
											<font style="font-size: 8pt">jeune 
											fille</font><font class="Marier"><font style="font-size: 8pt">&nbsp;</font></font></span></address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="txt" id="nomJF" name="nomJF"></span></font><font color="#FF0000"><font style="font-size: 8pt"> 
										</font><span class="inputRequirement">
										<font style="font-size: 8pt">* </font> </span> 
										</font> 
										</td>
									</tr>
									<tr>
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Pays de</font></span></address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											naissance 
										</font> </span>
										</address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<select class="TexteForm" id="paysNaiss" onchange="checkPaysNaissance()" name="paysNaiss">
										<option value="France" selected>France
										</option>
										<option value="Afghanistan">Afghanistan
										</option>
										<option value="Afrique du Sud">Afrique 
										du Sud</option>
										<option value="Albanie">Albanie</option>
										<option value="Algérie">Algérie</option>
										<option value="Allemagne">Allemagne
										</option>
										<option value="Andorre">Andorre</option>
										<option value="Angola">Angola</option>
										<option value="Argentine">Argentine
										</option>
										<option value="Arménie">Arménie</option>
										<option value="Australie">Australie
										</option>
										<option value="Autriche">Autriche
										</option>
										<option value="Belgique">Belgique
										</option>
										<option value="Birmanie">Birmanie
										</option>
										<option value="Bolivie">Bolivie</option>
										<option value="Brésil">Brésil</option>
										<option value="Bulgarie">Bulgarie
										</option>
										<option value="Cambodge">Cambodge
										</option>
										<option value="Cameroun">Cameroun
										</option>
										<option value="Canada">Canada</option>
										<option value="Chili">Chili</option>
										<option value="Chine">Chine</option>
										<option value="Chypre">Chypre</option>
										<option value="Colombie">Colombie
										</option>
										<option value="Congo">Congo</option>
										<option value="Corée du Nord">Corée du 
										Nord</option>
										<option value="Corée du Sud">Corée du 
										Sud</option>
										<option value="Costa Rica">Costa Rica
										</option>
										<option value="Côte d'Ivoire">Côte 
										d'Ivoire</option>
										<option value="Croatie">Croatie</option>
										<option value="Cuba">Cuba</option>
										<option value="Danemark">Danemark
										</option>
										<option value="Djibouti">Djibouti
										</option>
										<option value="Dominique">Dominique
										</option>
										<option value="Egypte">Egypte</option>
										<option value="Emirats Arabes Unis">
										Emirats Arabes Unis</option>
										<option value="Espagne">Espagne</option>
										<option value="Estonie">Estonie</option>
										<option value="Ethiopie">Ethiopie
										</option>
										<option value="Fidji">Fidji</option>
										<option value="Finlande">Finlande
										</option>
										<option value="Gabon">Gabon</option>
										<option value="Gambie">Gambie</option>
										<option value="Géorgie">Géorgie</option>
										<option value="Ghana">Ghana</option>
										<option value="Grèce">Grèce</option>
										<option value="Guinée">Guinée</option>
										<option value="Haïti">Haïti</option>
										<option value="Hongrie">Hongrie</option>
										<option value="Île Maurice">Île Maurice
										</option>
										<option value="Inde">Inde</option>
										<option value="Indonesie">Indonesie
										</option>
										<option value="Irak">Irak</option>
										<option value="Iran">Iran</option>
										<option value="Irlande">Irlande</option>
										<option value="Islande">Islande</option>
										<option value="Israel">Israel</option>
										<option value="Italie">Italie</option>
										<option value="Jamaïque">Jamaïque
										</option>
										<option value="Japon">Japon</option>
										<option value="Jordanie">Jordanie
										</option>
										<option value="Kenya">Kenya</option>
										<option value="Kowéit">Kowéit</option>
										<option value="Lettonie">Lettonie
										</option>
										<option value="Liban">Liban</option>
										<option value="Libéria">Libéria</option>
										<option value="Libye">Libye</option>
										<option value="Lithuanie">Lithuanie
										</option>
										<option value="Luxembourg">Luxembourg
										</option>
										<option value="Madagascar">Madagascar
										</option>
										<option value="Malaisie">Malaisie
										</option>
										<option value="Mali">Mali</option>
										<option value="Malte">Malte</option>
										<option value="Maroc">Maroc</option>
										<option value="Mauritanie">Mauritanie
										</option>
										<option value="Mexique">Mexique</option>
										<option value="Moldavie">Moldavie
										</option>
										<option value="Monaco">Monaco</option>
										<option value="Mongolie">Mongolie
										</option>
										<option value="Namibie">Namibie</option>
										<option value="Népal">Népal</option>
										<option value="Niger">Niger</option>
										<option value="Norvège">Norvège</option>
										<option value="Nouvelle-Zélande">
										Nouvelle-Zélande</option>
										<option value="Ouganda">Ouganda</option>
										<option value="Ouzbekistan">Ouzbekistan
										</option>
										<option value="Pakistan">Pakistan
										</option>
										<option value="Panama">Panama</option>
										<option value="Papouasie N. Guinée">
										Papouasie N. Guinée</option>
										<option value="Paraguay">Paraguay
										</option>
										<option value="Perou">Perou</option>
										<option value="Philippines">Philippines
										</option>
										<option value="Pologne">Pologne</option>
										<option value="Portugal">Portugal
										</option>
										<option value="Rép. Tchèque">Rép. 
										Tchèque</option>
										<option value="Roumanie">Roumanie
										</option>
										<option value="Royaume Uni">Royaume Uni
										</option>
										<option value="Russie">Russie</option>
										<option value="Rwanda">Rwanda</option>
										<option value="Sao-Tomé-et-Principe">
										Sao-Tomé-et-Principe</option>
										<option value="Senegal">Senegal</option>
										<option value="Slovaquie">Slovaquie
										</option>
										<option value="Slovénie">Slovénie
										</option>
										<option value="Somalie">Somalie</option>
										<option value="Sri Lanka">Sri Lanka
										</option>
										<option value="Suède">Suède</option>
										<option value="Suisse">Suisse</option>
										<option value="Syrie">Syrie</option>
										<option value="Taiwan">Taiwan</option>
										<option value="Tanzanie">Tanzanie
										</option>
										<option value="Thaïlande">Thaïlande
										</option>
										<option value="Togo">Togo</option>
										<option value="Tunisie">Tunisie</option>
										<option value="Turquie">Turquie</option>
										<option value="Ukraine">Ukraine</option>
										<option value="Uruguay">Uruguay</option>
										<option value="USA">USA</option>
										<option value="Venezuela">Venezuela
										</option>
										<option value="Vietnam">Vietnam</option>
										<option value="Yougoslavie">Yougoslavie
										</option>
										<option value="Zaire">Zaire</option>
										<option value="Zambie">Zambie</option>
										<option value="Autre">Autre</option>
										</select></span></font><font style="font-size: 8pt">

										</font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 

										</td>
									</tr>
									<tr class="codePostalNaissZone">
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Code Postal </font></span>
										</address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											de naissance</font></span></address>
										</th>
										<td align="left">
										<div class="codePostalDiv" id="codePostalNaissDiv">
											<font size="1">
											<span style="font-size: 8pt">
											<input id="lastCodePostalNaiss" type="hidden" name="lastCodePostalNaiss">
											<input id="dptNaiss" type="hidden" name="dptNaiss">
											</span>
											</font><font size="1">
											<span style="font-size: 8pt">
											<input class="codePostal" id="codePostalNaiss" onkeyup="searchVilles(this, 'villeNaiss', 'lastCodePostalNaiss', 'villeNaissSpan')" maxLength="5" onchange="searchVilles(this, 'villeNaiss', 'lastCodePostalNaiss', 'villeNaissSpan')" size="5" name="codePostalNaiss" autocomplete="off"></span></font><font style="font-size: 8pt"> 
											</font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
											* </font> </span>  
											</div>
										<font style="font-size: 8pt">

										</td>
									</tr>
									<tr>
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Ville de </font></span>
										</address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											naissance</font></span></address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="txt" id="villenaissance" name="villenaissance"></span></font><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span>  
									</td>
										

										</td>
									</tr>
								
										<td class="check" id="formValidatorTdvilleNaiss">
										<div id="erreurvilleNaiss">

										</td>
									</tr>
								
	
           
           </tr>
                              		                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p><b>
															Votre habitation</b></font></td>  
  
 <tr>

										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Habitat </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<select class="txt" id="typeHabitat" name="typeHabitat">
										<option value selected>Sélectionnez
										</option>
										<option value="Accession à la propriété">
										Propriétaire crédit immobilier en cours
										</option>
										<option value="Propriétaire">
										Propriétaire</option>
										<option value="Locataire">Locataire
										</option>
										<option value="Logé par famille">Logé 
										par famille</option>
										<option value="Logé par employeur-logement de fonction">
										Logé par employeur-logement de fonction
										</option>
										<option value="meublé-hôtel-foyer-caravane-sous location">
										meublé-hôtel-foyer-caravane-sous 
										location</option>
										<option value="Situation inconnue">
										Situation inconnue</option>
										<option value="Autre">Autre</option>
										</select></span><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span> 
										<span style="font-size: 8pt">
										&nbsp;</span></td>
										<td class="check" id="incoh_typeHabitat_1" style="display: none" align="left">
										<span style="font-size: 8pt">Incohérence 
										loyer / type logement
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										*</font></span></td>
										<td class="check" id="formValidatorTdtypeHabitat">
										<div id="erreurtypeHabitat">
&nbsp;</div>
										</td>
									</tr>
									<tr>
										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Depuis </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<select class="txt-3" id="moisHabitat" name="moisHabitat">
										<option value selected>Mois</option>
										<option value="01">Janvier</option>
										<option value="02">Février</option>
										<option value="03">Mars</option>
										<option value="04">Avril</option>
										<option value="05">Mai</option>
										<option value="06">Juin</option>
										<option value="07">Juillet</option>
										<option value="08">Août</option>
										<option value="09">Septembre</option>
										<option value="10">Octobre</option>
										<option value="11">Novembre</option>
										<option value="12">Décembre</option>
										</select>

 										<select class="txt-3" id="anneeHabitat" name="anneeHabitat">
										<option value selected>Année</option>
										<option value="2007">2007</option>
										<option value="2006">2006</option>
										<option value="2005">2005</option>
										<option value="2004">2004</option>
										<option value="2003">2003</option>
										<option value="2002">2002</option>
										<option value="2001">2001</option>
										<option value="2000">2000</option>
										<option value="1999">1999</option>
										<option value="1998">1998</option>
										<option value="1997">1997</option>
										<option value="1996">1996</option>
										<option value="1995">1995</option>
										<option value="1994">1994</option>
										<option value="1993">1993</option>
										<option value="1992">1992</option>
										<option value="1991">1991</option>
										<option value="1990">1990</option>
										<option value="1989">1989</option>
										<option value="1988">1988</option>
										<option value="1987">1987</option>
										<option value="1986">1986</option>
										<option value="1985">1985</option>
										<option value="1984">1984</option>
										<option value="1983">1983</option>
										<option value="1982">1982</option>
										<option value="1981">1981</option>
										<option value="1980">1980</option>
										<option value="1979">1979</option>
										<option value="1978">1978</option>
										<option value="1977">1977</option>
										<option value="1976">1976</option>
										<option value="1975">1975</option>
										<option value="1974">1974</option>
										<option value="1973">1973</option>
										<option value="1972">1972</option>
										<option value="1971">1971</option>
										<option value="1970">1970</option>
										<option value="1969">1969</option>
										<option value="1968">1968</option>
										<option value="1967">1967</option>
										<option value="1966">1966</option>
										<option value="1965">1965</option>
										<option value="1964">1964</option>
										<option value="1963">1963</option>
										<option value="1962">1962</option>
										<option value="1961">1961</option>
										<option value="1960">1960</option>
										<option value="1959">1959</option>
										<option value="1958">1958</option>
										<option value="1957">1957</option>
										<option value="1956">1956</option>
										<option value="1955">1955</option>
										<option value="1954">1954</option>
										<option value="1953">1953</option>
										<option value="1952">1952</option>
										<option value="1951">1951</option>
										<option value="1950">1950</option>
										<option value="1949">1949</option>
										<option value="1948">1948</option>
										<option value="1947">1947</option>
										<option value="1946">1946</option>
										<option value="

badibad
Invité n'ayant pas de compte PHPfrance

29 mai 2007, 22:38

<?php
/*
  $Id: createPOaccount.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
  Copyright (c) 2003 osCommerce
  Released under the GNU General Public License
*/
  require('includes/application_top.php');
  
   if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
  
// needs to be included earlier to set the success message in the messageStack
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATEPOACCOUNT);
  $process = false;
  if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
    $process = true;
    if (ACCOUNT_GENDER == 'true') {
      if (isset($HTTP_POST_VARS['gender'])) {
        $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
      } else {
        $gender = false;
      }
    }
    $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
    $creditrequest = tep_db_prepare_input($HTTP_POST_VARS['creditrequest']);
    $street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
    $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;
      }
    }
    $postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
    $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
    $lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
    $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
    $mensualite = tep_db_prepare_input($HTTP_POST_VARS['mensualite']);
    $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);  
    $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']);
    $time_in_business = tep_db_prepare_input($HTTP_POST_VARS['time_in_business']);
    $company_type = tep_db_prepare_input($HTTP_POST_VARS['company_type']);
    $number_of_employees = tep_db_prepare_input($HTTP_POST_VARS['number_of_employees']);
    $credit_ref1 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1']);
    $credit_ref1address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1address']);
    $credit_ref1city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1city']);
    $credit_ref1state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1state']);
    $credit_ref1phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1phone']);
    $credit_ref1fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref1fax']);
    $credit_ref2 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2']);
    $credit_ref2address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2address']);
    $credit_ref2city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2city']);
    $credit_ref2state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2state']);
    $credit_ref2phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2phone']);
    $credit_ref2fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref2fax']);
    $credit_ref3 = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3']);
    $credit_ref3address = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3address']);
    $credit_ref3city = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3city']);
    $credit_ref3state = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3state']);
    $credit_ref3phone = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3phone']);
    $credit_ref3fax = tep_db_prepare_input($HTTP_POST_VARS['credit_ref3fax']);
    $contacttelephone = tep_db_prepare_input($HTTP_POST_VARS['contacttelephone']);
    
    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 == 'false') {
      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 = false;
        $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) == true) {
      $error = 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)
	{  //PWA delete account
    	$get_customer_info = tep_db_query("select customers_id, customers_email_address, purchased_without_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
		$customer_info = tep_db_fetch_array($get_customer_info);
		$customer_id = $customer_info['customers_id'];
		$customer_email_address = $customer_info['customers_email_address'];
		$customer_pwa = $customer_info['purchased_without_account'];
		if ($customer_pwa !='1')
		{
        $error = false;
        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
        } else {
			tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'");
			tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . $customer_id . "'");
		}
      }
	// END
    }
    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);
    }

    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) {
      $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 == 'false') $sql_data_array['customers_dob'] = tep_date_raw($dob);
      if (ACCOUNT_DOB == 'false') $sql_data_array['customers_email_address'] = $email_address;
      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'] = '';
        } 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
      $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 .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
      
      // ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* BEGIN
  if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
    $coupon_code = create_coupon_code();
    $insert_query = tep_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 = tep_db_insert_id($insert_query);
    $insert_query = tep_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() )");
    $email_text .= sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" .
                   sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" .
                   EMAIL_GV_LINK . tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code,'NONSSL', false) .
                   "\n\n";
  }
  if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
    $coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
    $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . "'");
    $coupon = tep_db_fetch_array($coupon_query);
    $coupon_id = $coupon['coupon_id'];
    $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int)$languages_id . "'");
    $coupon_desc = tep_db_fetch_array($coupon_desc_query);
    $insert_query = tep_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() )");
    $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .  "\n" .
                   sprintf("%s", $coupon_desc['coupon_description']) ."\n\n" .
                   sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" .
                   "\n\n";
  }
// ICW - CREDIT CLASS CODE BLOCK ADDED  ******************************************************* END
      tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
      
      $email_text2 = EMAIL_TEXT2;
      tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $email_text2, $name, $email_address);
      tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text2, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
      tep_redirect(tep_href_link(FILENAME_COFIDISRETURN, '', 'SSL'));
          }
  }
  
  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATEPOACCOUNT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Language" content="fr">
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_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
?>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5
?>
<?php
   $sql_data_array = array('customers_firstname' => $firstname,
                              'customers_lastname' => $lastname,
                              'customers_email_address' => $email_address,
                              'customers_telephone' => $telephone,
                              'customers_fax' => $fax);
  $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
  $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");
  include(DIR_WS_CLASSES . 'order.php');
  $order = new order($oID);
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADDRESS_BOOK_PROCESS);
  
  $account_query = tep_db_query("select customers_gender, customers_firstname, customers_lastname, customers_dob, customers_email_address, customers_telephone, customers_fax from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
  $account = tep_db_fetch_array($account_query);
$credit_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, ci.customers_info_date_account_created, ci.customers_info_number_of_logons, ci.customers_info_date_account_last_modified, ci.customers_info_date_of_last_logon, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on (c.customers_default_address_id = a.address_book_id) left join " . TABLE_CUSTOMERS_INFO . " ci on (c.customers_id = ci.customers_info_id) where a.customers_id = c.customers_id and c.customers_id = '" . (int)$customer_id  . "'");
$credit = tep_db_fetch_array($credit_query);
$montant = $order->info['total']; 
tep_session_register('orders_total'); 
$orders_id=$insert_id; 
tep_session_register('orders_id'); 

?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
	<td width="500">
									<img height="73" src="http://www.esinger.fr/templates/Pixame_v1/images/header_title.gif" width="421"></td>
									<td width="100%" background="http://www.esinger.fr/templates/Pixame_v1/images/header_background.gif" height="73">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr class="header">
											<td class="ShowCartDetails" vAlign="center" align="right" height="30">&nbsp;</td>
										</tr>
									</table>
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
									</table>
									</td>
									<td>
									<img height="73" src="http://www.esinger.fr/templates/Pixame_v1/images/header_right.gif" width="80"></td>
								</tr>
							</table>
							<table cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="345">
									<img height="23" src="http://www.esinger.fr/templates/Pixame_v1/images/slogan.gif" width="345"></td>
									<td width="100%" background="http://www.esinger.fr/templates/Pixame_v1/images/slogan_middle.gif">&nbsp;</td>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
								</tr>
							</table>
							<table height="20" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
									<td width="33%" bgColor="#d2dbf5">&nbsp;</td>
									<td align="right" width="77%" bgColor="#d2dbf5">&nbsp;</td>
									<td width="5" bgColor="#d2dbf5">&nbsp;</td>
									<td width="1" bgColor="#798ccc">
									<img height="1" src="http://www.esinger.fr/templates/Pixame_v1/images/Pixel.gif" width="1"></td>
								</tr>
							</table>
							<table cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="5">
									<img height="25" src="http://www.esinger.fr/templates/Pixame_v1/images/links_left.gif" width="5"></td>
									<td background="http://www.esinger.fr/templates/Pixame_v1/images/links_middle.gif">
									<div align="center">
										<font class="storyboxtitle">
										<font size="1">
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										</font>
										<a class="HeaderPageLinks" href="http://www.esinger.fr/index.php">
										<font size="1">ACCUEIL</font></a><font size="1">&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/login.php">
										S'IDENTIFIER</a>&nbsp;&nbsp;&nbsp;<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/specials.php">
										VENTE FLASH</a>&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/products_new.php">
										NOUVEAUTES</a>&nbsp;&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4">
										<a href="http://www.esinger.fr/../../login.php">
										<span style="TEXT-DECORATION: none">
										MEMBRES</span></a>&nbsp;&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4"><a href="http://www.esinger.fr/../../forums.php"><span style="TEXT-DECORATION: none"> 
										FORUMS&nbsp;&nbsp;</span></a>&nbsp;&nbsp;
										<img height="8" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4">
										<a href="http://www.esinger.fr/../../links.php">
										<span style="TEXT-DECORATION: none">
										LIENS&nbsp;</span></a>&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										<a class="HeaderPageLinks" href="http://www.esinger.fr/allprods.php">
										CATALOGUE</a>&nbsp;&nbsp;&nbsp;
										<img height="8" alt="" src="http://www.esinger.fr/templates/Pixame_v1/images/arrow.gif" width="4" border="0">
										</font>
										<a href="http://www.esinger.fr/contact_us.php">
										<font size="1">CONTACT </font> </a></font></div>
									</td>
									<td width="5">
									<img height="25" src="http://www.esinger.fr/templates/Pixame_v1/images/links_right.gif" width="5"></td>
<!-- 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_CREATEPOACCOUNT, '', '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 class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>   
  <tr>
        <td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
      </tr>
    <?php
  if ($messageStack->size('create_account') > 0) {
?>
      <tr>
        <td><?php echo $messageStack->output('create_account'); ?></td>
      </tr>
      <tr>
        <td height="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
  }
?>
      <tr><td  <font style="font-size: 10pt; font-style:normal">&nbsp;<p><b>
		Votre identité</b></font></td>  
            
            </td>
      </tr>
    
      
          <tr>   
</td>
<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" height="5"><?php echo ENTRY_GENDER; ?></td>
                <td class="main" height="5"><?php echo tep_draw_radio_field('gender', 'm') . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f') . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . tep_draw_radio_field('gender', 'Mlle') . '&nbsp;&nbsp;' . MLLE . '&nbsp;'. (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
                <td class="main"><?php echo tep_draw_input_field('firstname', $account['customers_firstname']). '&nbsp;' . (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', $account['customers_lastname']). '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
              </tr>
             <tr>
                <td class="main"><?php echo ENTRY_DATE_OF_BIRTH ?></td>  
              <td class="main"><?php echo tep_draw_input_field('dob', $account['customers_dob']). '&nbsp;' . (tep_not_null(ENTRY_DATE_OF_BIRTH) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_EMAIL_ADDRESS ?></td>  
              <td class="main"><?php echo tep_draw_input_field('email_address', $account['customers_email_address']). '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
              </tr>
             

				
			                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p>
									<b>Pièce d'identité</b></font></td>  						
										<tr>
										<th align="left"><span style="font-weight: 400">
										<font style="font-size: 8pt">Nationalité 
										</font> </span></th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite1" type="radio" value="Française" name="nationalite" checked></span></font><font style="font-size: 8pt">Française&nbsp;
										</font>
										<font size="1">
										<span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite2" type="radio" value="CEE" name="nationalite"></span><font style="font-size: 8pt">CEE&nbsp;
										</font><span style="font-size: 8pt">
										<input class="TexteForm" id="nationalite3" type="radio" value="Hors CEE" name="nationalite"></span><font style="font-size: 8pt">Hors 
										CEE&nbsp; </font> </font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> </td>
										<td class="check" id="formValidatorTdradio=nationalite">
										<div id="erreurradio=nationalite">
&nbsp;</div>
										</td>
										</tr>
										<th align="left">
										<address align="left">
											<span style="font-style: normal; font-weight: 400; font-size: 8pt">
											N</span><span style="font-size: 8pt; font-weight: 400; font-style:normal">ature 
											de la pièce</span></address>
										<address>
											<span style="font-size: 8pt; font-weight: 400; font-style:normal">
											&nbsp;(carte d identité de séjour ou 
											passeport)</span></address>
				</th>
										<td align="left">
										<span style="font-size: 8pt">
										<input class="txt" name="naturepiece"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>
											<tr>
										<th align="left"><span style="font-size: 8pt; font-weight: 400">
										N°de votre pièce</span></th>
										<td>
										<span style="font-size: 8pt">
										<input class="txt" name="datecni"> 
										</span> 
										<font color="#FF0000">
										<span style="font-size: 8pt">*</span></font></td>
										</tr>
										<tr>
										<th align="left">
										<span style="font-weight: 400">
										<font style="font-size: 8pt">lieu</font></span><font style="font-size: 8pt"></font></font><span style="font-weight: 400"><font style="font-size: 8pt"> 
										de délivrance</font></span><td>
										<span style="font-size: 8pt"><input class="txt" name="datedelivrance"> 
										</span> 
										<font color="#FF0000">
										<span style="font-size: 8pt">*</span></font></td>
									</tr>
									<tr>
		<td class="main" align="left">
		<address>
			<font style="font-style:normal; font-size:8pt">Date de </font>
		</address>
		<address>
			<font style="font-style:normal; font-size:8pt">délivrance:</font></address>
		</td>
		<td class="main" align="left"><font size="1">
		<span style="font-size: 8pt"><input name="datedélivrance"></span></font><font style="font-size: 8pt">&nbsp;</font><span class="inputRequirement"><font style="font-size: 8pt"><font color="#FF0000">*</font> 
		(ex.03/02/1961)</font></span></td>
	</tr>	
									<tr class="nomjf">
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Nom de </font></span>
										</address>
										<address>
											<span style="font-weight: 400; font-style:normal">
											<font style="font-size: 8pt">jeune 
											fille</font><font class="Marier"><font style="font-size: 8pt">&nbsp;</font></font></span></address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="txt" id="nomJF" name="nomJF"></span></font><font color="#FF0000"><font style="font-size: 8pt"> 
										</font><span class="inputRequirement">
										<font style="font-size: 8pt">* </font> </span> 
										</font> 
										</td>
									</tr>
									<tr>
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Pays de</font></span></address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											naissance 
										</font> </span>
										</address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<select class="TexteForm" id="paysNaiss" onchange="checkPaysNaissance()" name="paysNaiss">
										<option value="France" selected>France
										</option>
										<option value="Afghanistan">Afghanistan
										</option>
										<option value="Afrique du Sud">Afrique 
										du Sud</option>
										<option value="Albanie">Albanie</option>
										<option value="Algérie">Algérie</option>
										<option value="Allemagne">Allemagne
										</option>
										<option value="Andorre">Andorre</option>
										<option value="Angola">Angola</option>
										<option value="Argentine">Argentine
										</option>
										<option value="Arménie">Arménie</option>
										<option value="Australie">Australie
										</option>
										<option value="Autriche">Autriche
										</option>
										<option value="Belgique">Belgique
										</option>
										<option value="Birmanie">Birmanie
										</option>
										<option value="Bolivie">Bolivie</option>
										<option value="Brésil">Brésil</option>
										<option value="Bulgarie">Bulgarie
										</option>
										<option value="Cambodge">Cambodge
										</option>
										<option value="Cameroun">Cameroun
										</option>
										<option value="Canada">Canada</option>
										<option value="Chili">Chili</option>
										<option value="Chine">Chine</option>
										<option value="Chypre">Chypre</option>
										<option value="Colombie">Colombie
										</option>
										<option value="Congo">Congo</option>
										<option value="Corée du Nord">Corée du 
										Nord</option>
										<option value="Corée du Sud">Corée du 
										Sud</option>
										<option value="Costa Rica">Costa Rica
										</option>
										<option value="Côte d'Ivoire">Côte 
										d'Ivoire</option>
										<option value="Croatie">Croatie</option>
										<option value="Cuba">Cuba</option>
										<option value="Danemark">Danemark
										</option>
										<option value="Djibouti">Djibouti
										</option>
										<option value="Dominique">Dominique
										</option>
										<option value="Egypte">Egypte</option>
										<option value="Emirats Arabes Unis">
										Emirats Arabes Unis</option>
										<option value="Espagne">Espagne</option>
										<option value="Estonie">Estonie</option>
										<option value="Ethiopie">Ethiopie
										</option>
										<option value="Fidji">Fidji</option>
										<option value="Finlande">Finlande
										</option>
										<option value="Gabon">Gabon</option>
										<option value="Gambie">Gambie</option>
										<option value="Géorgie">Géorgie</option>
										<option value="Ghana">Ghana</option>
										<option value="Grèce">Grèce</option>
										<option value="Guinée">Guinée</option>
										<option value="Haïti">Haïti</option>
										<option value="Hongrie">Hongrie</option>
										<option value="Île Maurice">Île Maurice
										</option>
										<option value="Inde">Inde</option>
										<option value="Indonesie">Indonesie
										</option>
										<option value="Irak">Irak</option>
										<option value="Iran">Iran</option>
										<option value="Irlande">Irlande</option>
										<option value="Islande">Islande</option>
										<option value="Israel">Israel</option>
										<option value="Italie">Italie</option>
										<option value="Jamaïque">Jamaïque
										</option>
										<option value="Japon">Japon</option>
										<option value="Jordanie">Jordanie
										</option>
										<option value="Kenya">Kenya</option>
										<option value="Kowéit">Kowéit</option>
										<option value="Lettonie">Lettonie
										</option>
										<option value="Liban">Liban</option>
										<option value="Libéria">Libéria</option>
										<option value="Libye">Libye</option>
										<option value="Lithuanie">Lithuanie
										</option>
										<option value="Luxembourg">Luxembourg
										</option>
										<option value="Madagascar">Madagascar
										</option>
										<option value="Malaisie">Malaisie
										</option>
										<option value="Mali">Mali</option>
										<option value="Malte">Malte</option>
										<option value="Maroc">Maroc</option>
										<option value="Mauritanie">Mauritanie
										</option>
										<option value="Mexique">Mexique</option>
										<option value="Moldavie">Moldavie
										</option>
										<option value="Monaco">Monaco</option>
										<option value="Mongolie">Mongolie
										</option>
										<option value="Namibie">Namibie</option>
										<option value="Népal">Népal</option>
										<option value="Niger">Niger</option>
										<option value="Norvège">Norvège</option>
										<option value="Nouvelle-Zélande">
										Nouvelle-Zélande</option>
										<option value="Ouganda">Ouganda</option>
										<option value="Ouzbekistan">Ouzbekistan
										</option>
										<option value="Pakistan">Pakistan
										</option>
										<option value="Panama">Panama</option>
										<option value="Papouasie N. Guinée">
										Papouasie N. Guinée</option>
										<option value="Paraguay">Paraguay
										</option>
										<option value="Perou">Perou</option>
										<option value="Philippines">Philippines
										</option>
										<option value="Pologne">Pologne</option>
										<option value="Portugal">Portugal
										</option>
										<option value="Rép. Tchèque">Rép. 
										Tchèque</option>
										<option value="Roumanie">Roumanie
										</option>
										<option value="Royaume Uni">Royaume Uni
										</option>
										<option value="Russie">Russie</option>
										<option value="Rwanda">Rwanda</option>
										<option value="Sao-Tomé-et-Principe">
										Sao-Tomé-et-Principe</option>
										<option value="Senegal">Senegal</option>
										<option value="Slovaquie">Slovaquie
										</option>
										<option value="Slovénie">Slovénie
										</option>
										<option value="Somalie">Somalie</option>
										<option value="Sri Lanka">Sri Lanka
										</option>
										<option value="Suède">Suède</option>
										<option value="Suisse">Suisse</option>
										<option value="Syrie">Syrie</option>
										<option value="Taiwan">Taiwan</option>
										<option value="Tanzanie">Tanzanie
										</option>
										<option value="Thaïlande">Thaïlande
										</option>
										<option value="Togo">Togo</option>
										<option value="Tunisie">Tunisie</option>
										<option value="Turquie">Turquie</option>
										<option value="Ukraine">Ukraine</option>
										<option value="Uruguay">Uruguay</option>
										<option value="USA">USA</option>
										<option value="Venezuela">Venezuela
										</option>
										<option value="Vietnam">Vietnam</option>
										<option value="Yougoslavie">Yougoslavie
										</option>
										<option value="Zaire">Zaire</option>
										<option value="Zambie">Zambie</option>
										<option value="Autre">Autre</option>
										</select></span></font><font style="font-size: 8pt">
										</font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
										</td>
									</tr>
									<tr class="codePostalNaissZone">
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Code Postal </font></span>
										</address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											de naissance</font></span></address>
										</th>
										<td align="left">
										<div class="codePostalDiv" id="codePostalNaissDiv">
											<font size="1">
											<span style="font-size: 8pt">
											<input id="lastCodePostalNaiss" type="hidden" name="lastCodePostalNaiss">
											<input id="dptNaiss" type="hidden" name="dptNaiss">
											</span>
											</font><font size="1">
											<span style="font-size: 8pt">
											<input class="codePostal" id="codePostalNaiss" onkeyup="searchVilles(this, 'villeNaiss', 'lastCodePostalNaiss', 'villeNaissSpan')" maxLength="5" onchange="searchVilles(this, 'villeNaiss', 'lastCodePostalNaiss', 'villeNaissSpan')" size="5" name="codePostalNaiss" autocomplete="off"></span></font><font style="font-size: 8pt"> 
											</font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
											* </font> </span>  
											</div>
										<font style="font-size: 8pt">
										</td>
									</tr>
									<tr>
										<th align="left">
										<address>
											<span style="font-weight: 400">
										<font style="font-size: 8pt; font-style:normal">
											Ville de </font></span>
										</address>
										<address>
											<span style="font-weight: 400">
											<font style="font-size: 8pt; font-style:normal">
											naissance</font></span></address>
										</th>
										<td align="left">
										<font size="1">
										<span style="font-size: 8pt">
										<input class="txt" id="villenaissance" name="villenaissance"></span></font><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span>  
									</td>
										
										</td>
									</tr>
								
										<td class="check" id="formValidatorTdvilleNaiss">
										<div id="erreurvilleNaiss">
										</td>
									</tr>
								
	
           
           </tr>
                              		                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p><b>
															Votre habitation</b></font></td>  
  
 <tr>
										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Habitat </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<select class="txt" id="typeHabitat" name="typeHabitat">
										<option value selected>Sélectionnez
										</option>
										<option value="Accession à la propriété">
										Propriétaire crédit immobilier en cours
										</option>
										<option value="Propriétaire">
										Propriétaire</option>
										<option value="Locataire">Locataire
										</option>
										<option value="Logé par famille">Logé 
										par famille</option>
										<option value="Logé par employeur-logement de fonction">
										Logé par employeur-logement de fonction
										</option>
										<option value="meublé-hôtel-foyer-caravane-sous location">
										meublé-hôtel-foyer-caravane-sous 
										location</option>
										<option value="Situation inconnue">
										Situation inconnue</option>
										<option value="Autre">Autre</option>
										</select></span><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span> 
										<span style="font-size: 8pt">
										&nbsp;</span></td>
										<td class="check" id="incoh_typeHabitat_1" style="display: none" align="left">
										<span style="font-size: 8pt">Incohérence 
										loyer / type logement
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										*</font></span></td>
										<td class="check" id="formValidatorTdtypeHabitat">
										<div id="erreurtypeHabitat">
&nbsp;</div>
										</td>
									</tr>
									<tr>
										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Depuis </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<select class="txt-3" id="moisHabitat" name="moisHabitat">
										<option value selected>Mois</option>
										<option value="01">Janvier</option>
										<option value="02">Février</option>
										<option value="03">Mars</option>
										<option value="04">Avril</option>
										<option value="05">Mai</option>
										<option value="06">Juin</option>
										<option value="07">Juillet</option>
										<option value="08">Août</option>
										<option value="09">Septembre</option>
										<option value="10">Octobre</option>
										<option value="11">Novembre</option>
										<option value="12">Décembre</option>
										</select>
 										<select class="txt-3" id="anneeHabitat" name="anneeHabitat">
										<option value selected>Année</option>
										<option value="2007">2007</option>
										<option value="2006">2006</option>
										<option value="2005">2005</option>
										<option value="2004">2004</option>
										<option value="2003">2003</option>
										<option value="2002">2002</option>
										<option value="2001">2001</option>
										<option value="2000">2000</option>
										<option value="1999">1999</option>
										<option value="1998">1998</option>
										<option value="1997">1997</option>
										<option value="1996">1996</option>
										<option value="1995">1995</option>
										<option value="1994">1994</option>
										<option value="1993">1993</option>
										<option value="1992">1992</option>
										<option value="1991">1991</option>
										<option value="1990">1990</option>
										<option value="1989">1989</option>
										<option value="1988">1988</option>
										<option value="1987">1987</option>
										<option value="1986">1986</option>
										<option value="1985">1985</option>
										<option value="1984">1984</option>
										<option value="1983">1983</option>
										<option value="1982">1982</option>
										<option value="1981">1981</option>
										<option value="1980">1980</option>
										<option value="1979">1979</option>
										<option value="1978">1978</option>
										<option value="1977">1977</option>
										<option value="1976">1976</option>
										<option value="1975">1975</option>
										<option value="1974">1974</option>
										<option value="1973">1973</option>
										<option value="1972">1972</option>
										<option value="1971">1971</option>
										<option value="1970">1970</option>
										<option value="1969">1969</option>
										<option value="1968">1968</option>
										<option value="1967">1967</option>
										<option value="1966">1966</option>
										<option value="1965">1965</option>
										<option value="1964">1964</option>
										<option value="1963">1963</option>
										<option value="1962">1962</option>
										<option value="1961">1961</option>
										<option value="1960">1960</option>
										<option value="1959">1959</option>
										<option value="1958">1958</option>
										<option value="1957">1957</option>
										<option value="1956">1956</option>
										<option value="1955">1955</option>
										<option value="1954">1954</option>
										<option value="1953">1953</option>
										<option value="1952">1952</option>
										<option value="1951">1951</option>
										<option value="1950">1950</option>
										<option value="1949">1949</option>
										<option value="1948">1948</option>
										<option value="1947">1947</option>
										<option value="1946">1946</option>
										<option value="1945">1945</option>
										<option value="1944">1944</option>
										<option value="1943">1943</option>
										<option value="1942">1942</option>
										<option value="1941">1941</option>
										<option value="1940">1940</option>
										<option value="1939">1939</option>
										<option value="1938">1938</option>
										<option value="1937">1937</option>
										<option value="1936">1936</option>
										<option value="1935">1935</option>
										<option value="1934">1934</option>
										<option value="1933">1933</option>
										<option value="1932">1932</option>
										<option value="1931">1931</option>
										<option value="1930">1930</option>
										</select>
 										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
 										</td>
										<td class="check" id="formValidatorTdmoisHabitat" align="left">
										<div id="erreurmoisHabitat">
&nbsp;</div>
           		                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p><b>
										Votre situation familiale</b></font></td>  
<tr>
										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Situation de famille </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<select class="txt" id="situation" onchange="checkCoEmp()" name="situation">
										<option value selected></option>
										<option value="Célibataire">Célibataire
										</option>
										<option value="Divorcé(e)-séparé(e)">
										Divorcé(e)-séparé(e)</option>
										<option value="Veuf / veuve">Veuf / 
										veuve</option>
										<option value="Marié">Marié</option>
										<option value="Concubinage - union libre">
										Concubinage - union libre</option>
										<option value="Pacs">Pacs</option>
										</select> </span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> </td>
										<td class="check" id="incoh_situation_1" style="display: none" align="left">
										<span style="font-size: 8pt">Incohérence 
										titre / situation familiale</span><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span> 
										<span style="font-size: 8pt">&nbsp;</span></td>
										<td class="check" id="formValidatorTdsituation">
										<div id="erreursituation">
&nbsp;</div>
										</td>
									</tr>

									<tr>
										<th align="left">
										<span style="font-size: 8pt; font-weight: 400">
										Nombre d'enfants à charge </span></th>
										<td align="left">
										<span style="font-size: 8pt">
										<input class="txt-2" id="nbEnfant" maxLength="2" size="4" name="nbEnfant">

badibad
Invité n'ayant pas de compte PHPfrance

29 mai 2007, 22:41

SUITE de createPOacount

					<input class="txt-2" id="nbEnfant" maxLength="2" size="4" name="nbEnfant"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td>
										<td class="check" id="formValidatorTdnbEnfant" align="left">
										<div id="erreurnbEnfant">
&nbsp;</div>
										</td>
									</tr>
										</td>
										
           		                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p><b>
										Vos coordonnées</b></font></td>  
              <tr>
                <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
                <td class="main"><?php echo tep_draw_input_field('street_address', $credit['entry_street_address']) . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
              </tr>
              
              <tr>
                <td class="main" height="5"><?php echo ENTRY_CITY; ?></td>
                <td class="main" height="5"><?php echo tep_draw_input_field('city', $credit['entry_city']) . '&nbsp;' . (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 '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
                </td>
              </tr>
<?php
  }
?>
 
              <tr>
                <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
                <td class="main"><?php  echo tep_draw_input_field('postcode', $credit['entry_postcode']) . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_COUNTRY ?></td>  
              <td class="main"><?php echo tep_draw_input_field('country', $credit['entry_country_id']). '&nbsp;' . (tep_not_null(ENTRY_COUNTRY) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
                <td class="main"><?php echo tep_draw_input_field('telephone', $account['customers_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', $account['customers_fax']) . '&nbsp;' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
              </tr> 
             		                    <tr><td  <font style="font-size: 8pt; font-style:normal">&nbsp;<p><b>
											Votre crédit</b></font></td> </tr> 
       

     


     </tr></td>
  <td>
              
       </td>
   	<tr>
                <td class="main"><?php echo ENTRY_TOTALCOM; ?></td>  
              <td class="main"><?php echo tep_draw_input_field('totalcom', $montant). '&nbsp;' . (tep_not_null(ENTRY_TOTALCOM) ? '<span class="inputRequirement">' . ENTRY_TOTALCOM_TEXT . '</span>': ''); ?></td>
              </tr>          
                    </tr>
										<span style="font-size: 8pt">
					</td></tr>  					
			
    <?php 
$req_query = mysql_query('SELECT * FROM mensualité_tbl');  
while ( $req_query && ($row = mysql_fetch_assoc($req_query)) ) { //lecture du résultat SQL  
    //Obtenir les montants 
    $montants = explode(";" , $row["montants"]); 
    //puis les afficher un par un 
    if (is_array($montants)) foreach ($montants as $un_montant){ 
?> 
<tr> 
                <td class="main"><?php echo ENTRY_MENSUALITE; ?></td> 
                <td class="main"><?php echo tep_draw_input_field('mensualite', $un_montant). '&nbsp;' . (tep_not_null(ENTRY_MENSUALITE_TEXT) ? '<span class="inputRequirement">' . ENTRY_MENSUALITE_TEXT . '</span>': ''); ?></td> 
</tr> 
<?php 
    }//fin foreach 
}//fin while 
?> 

							</tr><th align="left">
                <span style="font-weight: 100">
										<font style="font-size: 8pt">Apport:</font></span></th>
										<td>
										
										<span style="font-size: 8pt">
										
										<input type="text" name="apport" size="$sous . '<br />'">€
                						</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
                </td>
            </table></td>
          </tr>
        </table></td>
        


							
							

      <tr>
        <td width="297"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>          	
          	<font style="font-size: 10pt; font-style:normal"><b>Votre activité</b></font>                
           
          </tr>
        </table></td>
      </tr>
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%"cellspacing="2" cellpadding="2">
            	<tr>
										<th align="left" height="27">
										<span style="font-size: 8pt; font-weight: 400">
										Profession </span></th><td align="left" height="27">
										<span style="font-size: 8pt">
										<input id="estCDDObligatoire" type="hidden" value="non" name="estCDDObligatoire">
										</span><span style="font-size: 8pt">
										<select class="TexteForm" id="profession" onchange="javascript:showCDD(document.forms[sBeanToUse].profession, document.forms[sBeanToUse].typeContrat, document.forms[sBeanToUse].estCDDObligatoire, 'dynamic1'); GereAffichage(sBeanToUse,'profession',['Chômeur','Femme au foyer','Etudiant','Retraité','Autre Inactif'],'coord_transitional');gereControlesProfession();" name="profession">
										<option value selected>Profession
										</option>
										<option value="Agent de sécurité">Agent 
										de sécurité</option>
										<option value="Agent Hopitalier">Agent 
										Hospitalier</option>
										<option value="Agriculteurs">
										Agriculteurs</option>
										<option value="Artisan">Artisan</option>
										<option value="Artiste">Artiste</option>
										<option value="Autre Cadre Privé">Autre 
										Cadre Privé</option>
										<option value="Autre Inactif">Autre 
										Inactif</option>
										<option value="Cadre Ingénieur">Cadre 
										Ingénieur</option>
										<option value="Cadre Supérieur du Public">
										Cadre Supérieur du Public</option>
										<option value="Chauffeur">Chauffeur
										</option>
										<option value="Chef Entreprise">Chef 
										Entreprise</option>
										<option value="Chercheur">Chercheur
										</option>
										<option value="Chômeur">Chômeur</option>
										<option value="Commerçant Assimilé">
										Commerçant Assimilé</option>
										<option value="Commercial / Chef de Service">
										Commercial / Chef de Service</option>
										<option value="Contremaître / Agent Maîtrise">
										Contremaître / Agent Maîtrise</option>
										<option value="Employé Banque">Employé 
										Banque</option>
										<option value="Employé Bureau">Employé 
										Bureau</option>
										<option value="Employé Commerce">Employé 
										Commerce</option>
										<option value="Employé F.P.">Employé 
										F.P.</option>
										<option value="Employé Hôtel">Employé 
										Hôtel</option>
										<option value="Enseignant">Enseignant
										</option>
										<option value="Etudiant">Etudiant
										</option>
										<option value="Femme au foyer">Femme au 
										foyer</option>
										<option value="Forain">Forain</option>
										<option value="Infirmier">Infirmier
										</option>
										<option value="Infirmier salarié">
										Infirmier salarié</option>
										<option value="Intérimaire">Intérimaire
										</option>
										<option value="Medecin salarié">Médecin 
										salarié</option>
										<option value="Médico-Social F.P.">
										Médico-Social F.P.</option>
										<option value="Militaire">Militaire
										</option>
										<option value="Ouvrier Agricole">Ouvrier 
										Agricole</option>
										<option value="Ouvrier non Qualifié">
										Ouvrier non Qualifié</option>
										<option value="Ouvrier Qualifié">Ouvrier 
										Qualifié</option>
										<option value="Personnel de service">
										Personnel de service</option>
										<option value="Personnel F.P.">Personnel 
										F.P.</option>
										<option value="Personnel Médico-Social">
										Personnel Médico-Social</option>
										<option value="Policier">Policier
										</option>
										<option value="Profession Information">
										Profession Information</option>
										<option value="Profession libérale">
										Profession libérale</option>
										<option value="Retraité">Retraité
										</option>
										<option value="Technicien">Technicien
										</option>
										<option value="Vrp Représentant">Vrp 
										Représentant</option>
										</select> <span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 


										</td>
									</tr>
									<tr>
										<th align="left">
										<font class="dynamic1" style="font-size: 8pt; font-weight: 400">
										Type de contrat </font></th><td align="left"><font class="dynamic1">
										<span style="font-size: 8pt">
										<select id="typeContrat" onchange="checkFinContrat()" name="typeContrat">
										<option value selected>Type de contrat
										</option>
										<option value="CDI">CDI</option>
										<option value="CDD" checked="true">CDD
										</option>
										<option value="Q">
										Qualification/Apprentissage</option>
										<option value="C">CNE : Ctr Nouvelle 
										Embauche</option>
										<option value="M">En Alternance</option>
										<option value="S">Sans Objet</option>
										<option value="X">Autres</option>
										</select> </span> </font>
										<span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
										</td>
									</tr>
									<tr id="trFinContrat" style="display: none">
										<th align="left">
										<font class="dynamic1" style="font-size: 8pt; font-weight: 400">
										Date de fin de contrat </font></th><td align="left"><font class="dynamic1">
										<span style="font-size: 8pt">
										<select class="txt-3" id="finContratMois" name="finContratMois">
										<option value selected>Mois</option>
										<option value="01">Janvier</option>
										<option value="02">Février</option>
										<option value="03">Mars</option>
										<option value="04">Avril</option>
										<option value="05">Mai</option>
										<option value="06">Juin</option>
										<option value="07">Juillet</option>
										<option value="08">Août</option>
										<option value="09">Septembre</option>
										<option value="10">Octobre</option>
										<option value="11">Novembre</option>
										<option value="12">Décembre</option>
										</select>

 										<select class="txt-3" id="finContratAnnee" name="finContratAnnee">
										<option value selected>Année</option>
										<option value="2006">2006</option>
										<option value="2007">2007</option>
										<option value="2008">2008</option>
										<option value="2009">2009</option>
										<option value="2010">2010</option>
										<option value="2011">2011</option>
										<option value="2012">2012</option>
										<option value="2013">2013</option>
										<option value="2014">2014</option>
										<option value="2015">2015</option>
										</select>

									</span></font><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 

									<tr>
										<th align="left"><span style="font-weight: 400">
										<span style="font-size: 8pt">Nom de 
										l'employeur</span><font class="coord_transitional"><span style="font-size: 8pt">&nbsp;</span></font></span></th><td align="left">
										<span style="font-size: 8pt">
										<input class="txt" id="nomEmployeur" maxLength="30" size="16" name="nomEmployeur"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td>
									
										</td>

									</tr>
										<th>
										<p align="left"><span style="font-size: 8pt; font-weight: 400">
										Adresse</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="adresseemployeur"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>

              </tr>
										<th>
										<p align="left"><span style="font-size: 8pt; font-weight: 400">
										Ville</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="villemployeur" > 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </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 '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
                </td>
              </tr>
<?php
  }
?>

             </td>
									</tr>
										<th>
										<p align="left"><span style="font-size: 8pt; font-weight: 400">
										code postal</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="codepostalemployeur" size="7"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>

										<th>
										<p align="left"><span style="font-size: 8pt; font-weight: 400">
										Téléphone</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="telephoneemployeur" > 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </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><tr>
										<th align="left">
										<span style="font-weight: 400">
										<span style="font-size: 8pt">Ancienneté 
										dans le poste</span><font class="coord_transitional"><span style="font-size: 8pt">&nbsp;</span></font></span></th><td align="left">
										<span style="font-size: 8pt">
										<select class="txt-3" id="moisAncProf" name="moisAncProf">
										<option value selected>Mois</option>
										<option value="01">Janvier</option>
										<option value="02">Février</option>
										<option value="03">Mars</option>
										<option value="04">Avril</option>
										<option value="05">Mai</option>
										<option value="06">Juin</option>
										<option value="07">Juillet</option>
										<option value="08">Août</option>
										<option value="09">Septembre</option>
										<option value="10">Octobre</option>
										<option value="11">Novembre</option>
										<option value="12">Décembre</option>
										</select>

 										<select class="txt-3" id="anneeAncProf" name="anneeAncProf">
										<option value selected>Année</option>
										<option value="2007">2007</option>
										<option value="2006">2006</option>
										<option value="2005">2005</option>
										<option value="2004">2004</option>
										<option value="2003">2003</option>
										<option value="2002">2002</option>
										<option value="2001">2001</option>
										<option value="2000">2000</option>
										<option value="1999">1999</option>
										<option value="1998">1998</option>
										<option value="1997">1997</option>
										<option value="1996">1996</option>
										<option value="1995">1995</option>
										<option value="1994">1994</option>
										<option value="1993">1993</option>
										<option value="1992">1992</option>
										<option value="1991">1991</option>
										<option value="1990">1990</option>
										<option value="1989">1989</option>
										<option value="1988">1988</option>
										<option value="1987">1987</option>
										<option value="1986">1986</option>
										<option value="1985">1985</option>
										<option value="1984">1984</option>
										<option value="1983">1983</option>
										<option value="1982">1982</option>
										<option value="1981">1981</option>
										<option value="1980">1980</option>
										<option value="1979">1979</option>
										<option value="1978">1978</option>
										<option value="1977">1977</option>
										<option value="1976">1976</option>
										<option value="1975">1975</option>
										<option value="1974">1974</option>
										<option value="1973">1973</option>
										<option value="1972">1972</option>
										<option value="1971">1971</option>
										<option value="1970">1970</option>
										<option value="1969">1969</option>
										<option value="1968">1968</option>
										<option value="1967">1967</option>
										<option value="1966">1966</option>
										<option value="1965">1965</option>
										<option value="1964">1964</option>
										<option value="1963">1963</option>
										<option value="1962">1962</option>
										<option value="1961">1961</option>
										<option value="1960">1960</option>
										<option value="1959">1959</option>
										<option value="1958">1958</option>
										<option value="1957">1957</option>
										<option value="1956">1956</option>
										<option value="1955">1955</option>
										<option value="1954">1954</option>
										<option value="1953">1953</option>
										<option value="1952">1952</option>
										<option value="1951">1951</option>
										<option value="1950">1950</option>
										<option value="1949">1949</option>
										<option value="1948">1948</option>
										<option value="1947">1947</option>
										<option value="1946">1946</option>
										<option value="1945">1945</option>
										<option value="1944">1944</option>
										<option value="1943">1943</option>
										<option value="1942">1942</option>
										<option value="1941">1941</option>
										<option value="1940">1940</option>
										<option value="1939">1939</option>
										<option value="1938">1938</option>
										<option value="1937">1937</option>
										<option value="1936">1936</option>
										<option value="1935">1935</option>
										<option value="1934">1934</option>
										<option value="1933">1933</option>
										<option value="1932">1932</option>
										<option value="1931">1931</option>
										<option value="1930">1930</option>
										</select>

 										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
 										</td>
 										</tr>
                    <tr><td  <font style="font-size: 10pt; font-style:normal">&nbsp;<p><b>
						Ou non salarié</b></font></td></tr><tr>
              	<td class="main"><?php echo ENTRY_CREDIT_REQUEST; ?></td><td class="main"><?php echo tep_draw_input_field('creditrequest') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REQUEST_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REQUEST_TEXT . '</span>': ''); ?></td></td><tr>
                <td class="main"><?php echo ENTRY_TIME_IN_BUSINESS; ?></td><td class="main"><?php echo tep_draw_input_field('time_in_business') . '&nbsp;' . (tep_not_null(ENTRY_TIME_IN_BUSINESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_TIME_IN_BUSINESS_TEXT . '</span>': ''); ?></td></tr><th>
										<p align="left"><span style="font-size: 8pt; font-weight: 400">
										Nom et nature de l activite</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="natureactive" > 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>
              <tr>
                <td class="main"><?php echo ENTRY_NUMBER_OF_EMPLOYESS; ?></td><td class="main"><?php echo tep_draw_input_field('number_of_employees') . '&nbsp;' . (tep_not_null(ENTRY_NUMBER_OF_EMPLOYESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_NUMBER_OF_EMPLOYESS_TEXT . '</span>': ''); ?></td></tr></table></td></tr></table></td></tr><tr>
        <td width="297"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr><tr>
        <td class="main" width="297"><b><?php echo ENTRY_CREDIT_REF; ?></b></td></tr><tr>
        <td width="100%"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="2" cellpadding="2">
       
              <tr>
          <td class="main"
			<p align="left"><span style="font-size: 8pt; font-weight:700">
			Charges mensuelles</span><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span> 
			<span style="font-size: 8pt; font-weight:700">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></td>
         <td class="main" 
			<p align="right"><span style="font-size: 8pt; font-weight:700">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			Revenue mensuel nets</span><span class="inputRequirement"><font style="font-size: 8pt" color="#FF0000">* </font> </span> 
			<span style="font-size: 8pt; font-weight:700">&nbsp; </span></p>
			</td>
         
       
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF1CITY; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref1city') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF1CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF1CITY_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF1STATE; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref1state') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF1STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF1STATE_TEXT . '</span>': ''); ?></td></tr><tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF1PHONE; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref1phone') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF1PHONE_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF1PHONE_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF1FAX; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref1fax') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF1FAX_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF1FAX_TEXT . '</span>': ''); ?></td></tr><tr>
                <td></td>
                <td></td>
              </tr>
              <tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF2; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref2') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF2_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF2_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF2ADDRESS; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref2address') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF2ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF2ADDRESS_TEXT . '</span>': ''); ?></td></tr><tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF2CITY; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref2city') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF2CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF2CITY_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF2STATE; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref2state') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF2STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF2STATE_TEXT . '</span>': ''); ?></td></tr><tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF2PHONE; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref2phone') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF2PHONE_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF2PHONE_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF2FAX; ?></td></tr><tr>
                <td class="main"><?php echo ENTRY_CREDIT_REF3CITY; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref3city') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF3CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF3CITY_TEXT . '</span>': ''); ?></td><td class="main"><?php echo ENTRY_CREDIT_REF3STATE; ?></td><td class="main"><?php echo tep_draw_input_field('credit_ref3state') . '&nbsp;' . (tep_not_null(ENTRY_CREDIT_REF3STATE_TEXT) ? '<span class="inputRequirement">' . ENTRY_CREDIT_REF3STATE_TEXT . '</span>': ''); ?></td></tr></table></td></tr></table></td></tr><tr>
        <td width="297"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr><tr><td  <font style="font-size: 10pt; font-style:normal" width="297">&nbsp;<p><b>
		Votre banque</b></font></td><tr>
        <td width="297"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr><tr>
        <td width="100%"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table width="100%" border="0" cellspacing="2" cellpadding="2">

              <tr>
										<th>
										<span style="font-size: 8pt; font-weight: 400">
										Banque </span></th><td>
										<span style="font-size: 8pt">
										<select class="txt" id="banque" name="banque">
										<option value selected></option>
										<option value="CCP La Poste">CCP - La 
										Poste</option>
										<option value="Crédit Agricole">Crédit 
										Agricole</option>
										<option value="Crédit Lyonnais">Crédit 
										Lyonnais</option>
										<option value="BNP">BNP</option>
										<option value="Société Générale">Société 
										Générale</option>
										<option value="Caisse d épargne">Caisse 
										d'épargne</option>
										<option value="Banque Populaire">Banque 
										Populaire</option>
										<option value="Crédit Mutuel">Crédit 
										Mutuel</option>
										<option value="Crédit du Nord">Crédit du 
										Nord</option>
										<option value="CIC">CIC</option>
										<option value="Autres">Autres</option>
										</select>

 										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
 										</td>
										<td class="check" id="formValidatorTdbanque">
										<div id="erreurbanque">

										</td>
									</tr>
									<tr>
										<th height="29">
										<span style="font-size: 8pt; font-weight: 400">
										Date d'ouverture du compte </span></th>
										<td height="29">
										<span style="font-size: 8pt">
										<select class="txt-3" id="moisBanque" name="moisBanque">
										<option value selected>Mois</option>
										<option value="01">Janvier</option>
										<option value="02">Février</option>
										<option value="03">Mars</option>
										<option value="04">Avril</option>
										<option value="05">Mai</option>
										<option value="06">Juin</option>
										<option value="07">Juillet</option>
										<option value="08">Août</option>
										<option value="09">Septembre</option>
										<option value="10">Octobre</option>
										<option value="11">Novembre</option>
										<option value="12">Décembre</option>
										</select>

 										<select class="txt-3" id="anneeBanque" name="anneeBanque">
										<option value selected>Année</option>
										<option value="2007">2007</option>
										<option value="2006">2006</option>
										<option value="2005">2005</option>
										<option value="2004">2004</option>
										<option value="2003">2003</option>
										<option value="2002">2002</option>
										<option value="2001">2001</option>
										<option value="2000">2000</option>
										<option value="1999">1999</option>
										<option value="1998">1998</option>
										<option value="1997">1997</option>
										<option value="1996">1996</option>
										<option value="1995">1995</option>
										<option value="1994">1994</option>
										<option value="1993">1993</option>
										<option value="1992">1992</option>
										<option value="1991">1991</option>
										<option value="1990">1990</option>
										<option value="1989">1989</option>
										<option value="1988">1988</option>
										<option value="1987">1987</option>
										<option value="1986">1986</option>
										<option value="1985">1985</option>
										<option value="1984">1984</option>
										<option value="1983">1983</option>
										<option value="1982">1982</option>
										<option value="1981">1981</option>
										<option value="1980">1980</option>
										<option value="1979">1979</option>
										<option value="1978">1978</option>
										<option value="1977">1977</option>
										<option value="1976">1976</option>
										<option value="1975">1975</option>
										<option value="1974">1974</option>
										<option value="1973">1973</option>
										<option value="1972">1972</option>
										<option value="1971">1971</option>
										<option value="1970">1970</option>
										<option value="1969">1969</option>
										<option value="1968">1968</option>
										<option value="1967">1967</option>
										<option value="1966">1966</option>
										<option value="1965">1965</option>
										<option value="1964">1964</option>
										<option value="1963">1963</option>
										<option value="1962">1962</option>
										<option value="1961">1961</option>
										<option value="1960">1960</option>
										<option value="1959">1959</option>
										<option value="1958">1958</option>
										<option value="1957">1957</option>
										<option value="1956">1956</option>
										<option value="1955">1955</option>
										<option value="1954">1954</option>
										<option value="1953">1953</option>
										<option value="1952">1952</option>
										<option value="1951">1951</option>
										<option value="1950">1950</option>
										<option value="1949">1949</option>
										<option value="1948">1948</option>
										<option value="1947">1947</option>
										<option value="1946">1946</option>
										<option value="1945">1945</option>
										<option value="1944">1944</option>
										<option value="1943">1943</option>
										<option value="1942">1942</option>
										<option value="1941">1941</option>
										<option value="1940">1940</option>
										<option value="1939">1939</option>
										<option value="1938">1938</option>
										<option value="1937">1937</option>
										<option value="1936">1936</option>
										<option value="1935">1935</option>
										<option value="1934">1934</option>
										<option value="1933">1933</option>
										<option value="1932">1932</option>
										<option value="1931">1931</option>
										<option value="1930">1930</option>
										</select>

 										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span> 
 										</td>
										<td class="check" id="formValidatorTdmoisBanque" height="29">
										<div id="erreurmoisBanque">
&nbsp;</div></th>
										</td>
									</tr>
										<th><span style="font-size: 8pt; font-weight: 400">
										N°établissement</span></th><td>
										<span style="font-size: 8pt">
										<input class="txt" name="numeroetablissement"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td></tr>
										<th>
										<span style="font-size: 8pt; font-weight: 400">
										N° guichet</span><td>
										<span style="font-size: 8pt"><input class="txt" name="numeroguichet"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td>
										</td></tr>
										<th>
										<span style="font-size: 8pt; font-weight: 400">
										N° de compte</span><td>
										<span style="font-size: 8pt"><input class="txt" name="numerocompte"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td>
										</td></tr>
										<th>
										<span style="font-size: 8pt; font-weight: 400">
										clé 
										</span> <td>
										<span style="font-size: 8pt"><input class="txt" name="numerocle"> 
										</span><span class="inputRequirement">
										<font style="font-size: 8pt" color="#FF0000">
										* </font> </span>  
										</td>
										</th>
										
										
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td width="100%"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr><tr>
        <td class="main" width="297"><b><?php echo CATEGORY_POACCOUNT_PASSWORD; ?></b></td></tr><tr>
        <td width="100%"><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></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></tr></table></td></tr></table></td></tr><tr>
           <td class="main" width="100%"><?php echo ENTRY_CREDIT_TERMS_TEXT ?></td></tr><tr>
        <td width="100%"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr><tr>
        <td width="100%"><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_submit.gif', IMAGE_BUTTON_SUBMIT); ?></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><!-- 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'); ?>

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

30 mai 2007, 00:11

Voici, selon ce que j'ai compris:
En fait tu utilises des fonctions spéciales pour exécuter, lire et afficher les données de la base.
J'ai réadapter la solution que je t'ai proposé aux méthodes que tu utilises.
Bonne lecture:
<?php
        //tableau des montant à préparer pour une lite déroulente
		$montants_array = array();
		//Requête SQL
        $montant_mens_query = tep_db_query("select valeur_mens, montants from mensualité_tbl order by valeur_mens");
        //Lecture du résultat
		while ($montant_mens_values = tep_db_fetch_array($montant_mens_query)) {
          //une mensulatité = N montants
		  $valeur_mens = $montant_mens_values["valeur_mens"];
		  $montants = explode(";" , $montant_mens_values["montants"]); //récup des montants séparés par ;
		  //construction du tableau source de la liste déroulente
		  foreach ($montants as $un_montant){
		  	//l'id de la liste est le value d'un SELECT HTML et le text est ce qui s'affiche
		  	$montants_array[] = array('id' => $un_montant, 'text' => $un_montant); //ce qui s'affiche = ce qui est sélectionné
		  }
        //afficher la mensulaité en cours
?>
<tr>
                <td class="main"><?php echo ENTRY_MENSUALITE; ?></td>
                <td class="main"><?php echo tep_draw_input_field('mensualite', $valeur_mens). '&nbsp;' . (tep_not_null(ENTRY_MENSUALITE_TEXT) ? '<span class="inputRequirement">' . ENTRY_MENSUALITE_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
				<td class="main"><?php echo ENTRY_TOTAL_MENSUALITE; ?></td>
				<td class="main">
<?php					
		//afficher la liste déroulante de ses montants
        echo tep_draw_pull_down_menu('total_mensualite', $montants_array);
        if (tep_not_null(ENTRY_TOTAL_MENSUALITE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_TOTAL_MENSUALITE_TEXT;
?>
</tr>
<?php
      	}//fin while
?>
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène

badibad
Invité n'ayant pas de compte PHPfrance

30 mai 2007, 09:25

rebonjour et merci encor
j'ai eseyer ton code mais j'ai cette erreur qui s'affiche

1146 - Table 'esinger.mensualité_tbl' doesn't exist

select valeur_mens, montants from mensualité_tbl order by valeur_mens

[TEP STOP]
je croyais que l'erreur venais du fait de l'accent é du mensualité donc je l'ai renomer en mensualit mais ca ma mis la meme erreur et valeur

voici ma table
CREATE TABLE `mensualité` (
  `valeur_mens` float default NULL,
  `montants` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `mensualité`
-- 

INSERT INTO `mensualité` VALUES (15, '75,');
INSERT INTO `mensualité` VALUES (15, '270,');
INSERT INTO `mensualité` VALUES (15, '100,');
merci enormement

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

30 mai 2007, 12:03

Alors oui effectivement, évite les accents ça vaudrait mieux mais ce n'est pas de celà qu'il s'agit.
Selon le message
1146 - Table 'esinger.mensualité_tbl' doesn't exist
la table doit être créée dans la base de données nommée "esinger".

Toute fois, si ta table est dans cette base et tu as toujours ce message essaye d'utiliser la constante TABLE_MENSUALITES si ta table est nommée "mensualites" car comme j'ai constaté, dans ton code et dans toutes les requête select delete ou update OsCommerce désigne les tables par des constantes qui commencent par TABLE_xxxxxx où les x désignent le nom de la table.

Donc récap:
1. Crée ta table "mensualites" dans la base "esinger"

Code : Tout sélectionner

CREATE TABLE `mensualites` ( `valeur_mens` float default NULL, `montants` varchar(255) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Contenu de la table `mensualité` -- INSERT INTO `mensualites` VALUES (15, '50;100;200'); INSERT INTO `mensualites` VALUES (25, '200;300'); INSERT INTO `mensualites` VALUES (35, '100;400;600');
Je tiens à rappeler aussi que les montants doivent être séparés par un point-virgule

2. utilise la constante TABLE_MENSUALITES dans la requête
$montant_mens_query = tep_db_query("select valeur_mens, montants from ".TABLE_MENSUALITES." order by valeur_mens");
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène

badibad
Invité n'ayant pas de compte PHPfrance

30 mai 2007, 14:10

re re bonjour je suis vraiment désoler mais le probleme presiste et la je comprent pas pourquoi pourtant les autre code en tep query marche donc c'est pas logique voici l'erreur que j'ai
1146 - Table 'esinger.TABLE_MENSUALITES' doesn't exist

select valeur_mens, montants from TABLE_MENSUALITES order by valeur_mens

[TEP STOP]
merci

Avatar du membre
Modérateur PHPfrance
Modérateur PHPfrance | 10684 Messages

30 mai 2007, 14:22

Euh..... au final ta table s'appelle "mensualites", "mensualité" ou "mensualité_tbl" ?

Si tu utilises une constante pour définir le nom de la table, il te faut la définir avant de l'utiliser, sinon php considèrera qu'il s'agit d'une chaine de caractère, et il te dira que la table n'existe pas :
define('TABLE_MENSUALITES', 'nom_de_ta_table');

...

$montant_mens_query = tep_db_query("select valeur_mens, montants from ".TABLE_MENSUALITES." order by valeur_mens");
Ce n'est pas en améliorant la bougie que l'on a inventé l'ampoule...

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

30 mai 2007, 15:57

Je ne connais pas trés bien OsCommerce, mais Ryle a raison, il faut chercher où OsCommerce déclare les constantes TABLE_xxxxx
pour rajouter celle pour TABLE_MENSUALITES comme l'a bien montré Ryle
Je te l'ai pas fait remarqué car je croyait que OsCommerce le fait automatiquement.
Si ce n'est pas automatique, je crois que tu auras aussi des problèmes avec les autres constantes qu'on a ajouté dans le nouveau code. Je pense à ENTRY_MENSUALITE, ENTRY_MENSUALITE_TEXT, ENTRY_TOTAL_MENSUALITE et ENTRY_TOTAL_MENSUALITE_TEXT par exemple.
Alors, ma question est : comment OsCommerce déclare-t-il ce genre de constantes ?

Ceci dit, tu peux te passer de ce détail actuellement en remettant directement le nom de ta table "mensualites" après le From dans ta requête et vérifier.

Remarque: J'ai beaucoups de questions, mais il parait évident que tu ne connais pas OsCommerce ce qui risque de rendre difficile l'ajout de nouveaux codes.
Je te suggère de te documenter sur OsCommerce pour répondre à ces question.
Avec de la perséverence je suis sûr que tu arriveras. Et ne redit jamais qu'on va être faché ou qu'on va rire de tes questions.

La programmation ça s'apprend par la difficulté et les erreurs et personne n'est parfait. Dieu seul sait tout.
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène

badibad
Invité n'ayant pas de compte PHPfrance

30 mai 2007, 17:15

en effet le probleme venais bien du define merci beaucoup meintenent ca marche mais y a un problem j'ai plusieur fenetre qui s'affiche et les montant ne corresponde pas au mensualité
<table cellSpacing="2" cellPadding="2" border="0">
	<span style="FONT-SIZE: 8pt">
	<tr>
		<td class="main">Sélectionner les mensualités et le montant du crédit :</td>
		<td class="main"><input value="15" name="mensualite1" size="20">&nbsp;<span class="inputRequirement">*</span></td>
	</tr>
	<tr>
		<td class="main">ENTRY_TOTAL_MENSUALITE</td>
		<td class="main"><select name="total_mensualite1">
		<option value="75" selected>75</option>
		<option value="270">270</option>
		<option value="100">100</option>
		<option value="110">110</option>
		<option value="130">130</option>
		<option value="140">140</option>
		</select>&nbsp;<span class="inputRequirement">ENTRY_TOTAL_MENSUALITE_TEXT
		</span></td>
	</tr>
	<tr>
		<td class="main">Sélectionner les mensualités et le montant du crédit :</td>
		<td class="main"><input value="25" name="mensualite2" size="20">&nbsp;<span class="inputRequirement">*</span></td>
	</tr>
	<tr>
		<td class="main">ENTRY_TOTAL_MENSUALITE</td>
		<td class="main"><select name="total_mensualite2">
		<option value="75" selected>75</option>
		<option value="270">270</option>
		<option value="100">100</option>
		<option value="110">110</option>
		<option value="130">130</option>
		<option value="140">140</option>
		<option value="100">100</option>
		<option value="120">120</option>
		</select>&nbsp;<span class="inputRequirement">ENTRY_TOTAL_MENSUALITE_TEXT
		</span></td>
	</tr>
	<tr>
		<td class="main">Sélectionner les mensualités et le montant du crédit :</td>
		<td class="main"><input value="35" name="mensualite">&nbsp;<span class="inputRequirement">*</span></td>
	</tr>
	<tr>
		<td class="main">ENTRY_TOTAL_MENSUALITE</td>
		<td class="main"><select name="total_mensualite">
		<option value="75" selected>75</option>
		<option value="270">270</option>
		<option value="100">100</option>
		<option value="110">110</option>
		<option value="130">130</option>
		<option value="140">140</option>
		<option value="100">100</option>
		<option value="120">120</option>
		<option value="140">140</option>
		<option value="170">170</option>
		<option value="200">200</option>
		</select>&nbsp;<span class="inputRequirement">ENTRY_TOTAL_MENSUALITE_TEXT
		</span></td>
	</tr>
	</span>
</table>
je ne comprend pas

pourtant ma table et correct

Code : Tout sélectionner

CREATE TABLE `mensualites` ( `valeur_mens` float default NULL, `montants` varchar(255) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Contenu de la table `mensualites` -- INSERT INTO `mensualites` VALUES (15, '75;270;100;110;130;140'); INSERT INTO `mensualites` VALUES (25, '100;120'); INSERT INTO `mensualites` VALUES (35, '140;170;200');
je sais pas pourquoi il me met n'inporte quoi
et si j'appuis sur entrer c'est pir tout les mensualiter sont à 35 et c'a melange les montants.

merci à tous de votre aide c'est vraiment très genti [/php]

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

30 mai 2007, 18:15

oops c'est normal et c'est de ma faute en plus, dans le code que je t'ai filé le tableau $montant_array qui alimente chaque liste déroulente de montants n'est pas initialisé dans la boucle de lecture des mensualités c'est pourquoi il garde son contenu précédent auquel s'ajoutent les montants suivants.

Pour corriger il suffit de placer la ligne d'initialisation : $montants_array = array(); à l'intérieur de la boucle while.

Correction:
<?php
        //Requête SQL
        $montant_mens_query = tep_db_query("select valeur_mens, montants from mensualité_tbl order by valeur_mens");
        //Lecture du résultat
        while ($montant_mens_values = tep_db_fetch_array($montant_mens_query)) {
          //une mensulatité = N montants
          $valeur_mens = $montant_mens_values["valeur_mens"];
          $montants = explode(";" , $montant_mens_values["montants"]); //récup des montants séparés par ;
          
           //tableau des montant à préparer pour une lite déroulente
            $montants_array = array();

          //construction du tableau source de la liste déroulente
          foreach ($montants as $un_montant){
              //l'id de la liste est le value d'un SELECT HTML et le text est ce qui s'affiche
              $montants_array[] = array('id' => $un_montant, 'text' => $un_montant); //ce qui s'affiche = ce qui est sélectionné
          }
        //afficher la mensulaité en cours
?>
<tr>
                <td class="main"><?php echo ENTRY_MENSUALITE; ?></td>
                <td class="main"><?php echo tep_draw_input_field('mensualite', $valeur_mens). '&nbsp;' . (tep_not_null(ENTRY_MENSUALITE_TEXT) ? '<span class="inputRequirement">' . ENTRY_MENSUALITE_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
                <td class="main"><?php echo ENTRY_TOTAL_MENSUALITE; ?></td>
                <td class="main">
<?php                    
        //afficher la liste déroulante de ses montants
        echo tep_draw_pull_down_menu('total_mensualite', $montants_array);
        if (tep_not_null(ENTRY_TOTAL_MENSUALITE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_TOTAL_MENSUALITE_TEXT;
?>
</tr>
<?php
          }//fin while
?>
Mais en réalité, je t'ai donné ce code à titre indicatif, je ne sais pas comment tu veux afficher les mensualités et leurs listes de montants.

En principe, selon toute logique et apès reflexion ce n'est pas comme ça qu'il faut afficher. A la rigueur, les mensualités peuvent être des options à cocher et devant chacune une liste de montants à choisir.
En tout cas les mensualités ne sont pas des zones de saisie (tep_draw_input_field) Non :lol:

ps: Comment insérer un radio button sous OsCommerce ?
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène

badibad
Invité n'ayant pas de compte PHPfrance

30 mai 2007, 18:54

merci beaucoup ca commence à marcher

meintenent les montants sont bon mais les mensualité deconne en fait je voudrais l'affiche sur deux champ comme ceci


le type selectionne la mensualiter dans un menu deroulant ( 15; 25; 35 etc ) puis les montant caparais dans la deuxieme fenetre

[champ mensualite] [montant de la mensualite selectionner]

merci beaucoup

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

31 mai 2007, 12:12

D'accord, alors je t'explique comment faire, regarde moi bien dans les yeux.
On va placer une liste déroulante à gauche pour le choix d'une mensualité et une seconde liste à droite de la première sera réservée pour le choix des montants de la mensualité choisie.

OK!

On sait comment remplir des listes déroulantes à partir de la table on verra tout à l’heure mais, maintenant on veut trouver comment dynamiser le truc, c'est à dire lorsqu’on choisit une mensualité on doit afficher la liste de ses montants.
C’est dit, en fait le truc c’est qu’il ne faut pas afficher toutes les listes des montants existant dans la table ; il faut se contenter d’afficher la liste des montants correspondant à la mensualité choisie c’est à dire postée.
Et donc la solution technique est celle qui consiste à n’exécuter l’algorithme de remplissage de la liste des montants que pour la mensualité postée ou par défaut pour la première mensualité.

Ce qui donne l’algorithme suivant :

Objectif : Remplir 2 listes déroulantes : « mensualite » et « total_mensualite » le contenu cette dernière correspond à une mensualité postée à partir de la première liste ou à défaut, à la première mensualité enregistrée dans la base de données.
  • 1. Exécuter la requête « select valeur_mens, montants from TABLE_MENSUALITES order by valeur_mens »
    2. initialiser un compteur de lignes i à 0
    3. Entrer dans la boucle qui lit le résultat de cette requête
    4. extraire de la ligne en cours les champs « valeur_mens » et « montants »
    5. Ajouter le champ « valeur_mens » dans la liste déroulante « mensualite »
    6. S’il y a une mensualité postée ($_POST[mensualite]) et si $_POST[mensualite] = « valeur_mens » ou pas de postage et le compteur i = 0 Alors : remplir la liste « total_mensualite » et voici comment :
    • a. Transformer le contenu du champ « montants » en tableau selon le séparateur point-virgule
      b. Parcourir ce tableau et affecter un par un les montants dans la liste déroulante « total_mensualite
    7. incrémenter le compteur i à i + 1
    8. lire la ligne suivante et répéter à partir de l’étape n°4 jusqu’à la fin des lignes du résultat
    9. afficher les 2 listes « mensualite » et « total_mensualite » au format HTML
Maintenant il reste à coder en PHP, voici un essai:
<?php
//Requête SQL 
$mens_query = tep_db_query("select valeur_mens, montants from ".TABLE_MENSUALITES." order by valeur_mens"); 
//pour compter les enregistrements
$i=0; 
//pour la liste déroulante des mensualités
$mens_array = array(); 
//Lecture du résultat 
while ($row = tep_db_fetch_array($mens_query)) { 
	//Remplir la liste des mensualités tout en sélectionnant celle déjà choisie ou par défaut la première
    $if_selected = $_POST["mensualite"] == $row["valeur_mens"]?true:false;
	$mens_array[] = array('id' => $row["valeur_mens"], 'text' => $row["valeur_mens"], 'selected' => $if_selected); 
   
    //Préparer la liste des montants de la mensualité choisie ou par défaut pour la première  
    if ( ($_POST["mensualite"] && $_POST["mensualite"] == $row["valeur_mens"]) 
	|| (!$_POST["mensualite"] && $i==0) ){
		$montants_array = array(); 
		$montants = explode(";" , $row["montants"]); //récup des montants séparés par ; 
    	//construction du tableau source de la liste déroulante 
    	foreach ($montants as $un_montant){ 
    		$montants_array[] = array('id' => $un_montant, 'text' => $un_montant);  
    	} 
	}
	//compteur d'enregitrements
	$i++;
}//fin while
//afficher la mensulaité en cours 
?> 
<tr> 
  <td class="main"><?php echo ENTRY_MENSUALITE; ?></td> 
  <td class="main">
<?php 
echo tep_draw_pull_down_menu('mensualite', $mens_array);
if (tep_not_null(ENTRY_MENSUALITE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_MENSUALITE_TEXT . '</span>'; 
?>
  </td> 
  <td class="main"><?php echo ENTRY_TOTAL_MENSUALITE; ?></td> 
  <td class="main"> 
<?php                     
//afficher la liste déroulante de ses montants 
echo tep_draw_pull_down_menu('total_mensualite', $montants_array); 
if (tep_not_null(ENTRY_TOTAL_MENSUALITE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_TOTAL_MENSUALITE_TEXT. '</span>'; 
?> 
   </td>
</tr> 
Mais, il faut ajouter un évènement javascript dans la liste "mensualite" qui déclenche le submit du formulaire dans le cas où la sélection change. Comme ça:

Code : Tout sélectionner

<SELECT name="mensualite" onChange="form1.submit()">
où form1 est le nom de ton form.

Remarque:
Fait attention à cette ligne du code:
$mens_array[] = array('id' => $row["valeur_mens"], 'text' => $row["valeur_mens"], 'selected' => $if_selected); 
Tu remarque le champ "selected": il sert à sélectionner une option de la liste si true et l'inverse si false
Ceci n'est possible que si la fonction OsCommerce "tep_draw_pull_down_menu()" prend en compte ce paramètre de sélection et pour en être sûr il faut voir la doc de OsCommerce sur cette fonction et sur comment elle prévoit la sélection d'une option.
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène

badibad
Invité n'ayant pas de compte PHPfrance

31 mai 2007, 13:57

bonjour à tous et merci encore

bon en effet ca a l'air de commencer à marcher j'ai mes deux champ mais c'est l'histoire du
<SELECT name="mensualite" onChange="form1.submit()"> 
que j'ai pas bien compris aparament il sert à fair aparaitre un bouton pour changer les montants donc je l'ai mis après
if (tep_not_null(ENTRY_MENSUALITE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_MENSUALITE_TEXT . '</span>';  
je sais que je suis chian c'a doit venir de mes meches bonde si je comprend pas :wink: :D

p.s t'a été plus rapide que moi j'étais en train d'essayer de modifier l'ancien code mais celui la et netement mieux c'est normal t'est plus intelegent :D

merci beaucoup

Modérateur PHPfrance
Modérateur PHPfrance | 2575 Messages

31 mai 2007, 14:33

Lit bien ma remarque de tout à l'heure, le

Code : Tout sélectionner

onChange="form1.submit()
doit être dans la liste "mensualite" il servira à déclencher l'envoi du formulaire à chaque choix dans cette liste.
Il n'ajoute aucun bouton.
Tiens voici un exmple simple pour comprendre l'effet de onChange:
<?php
//base de données
$pays = array("France", "Maroc");
$villes = array("France"=>array("Le Mans", "Paris"), "Maroc"=>array("Marrakech", "Oujda"));

//Affichage HTML, début de la liste pays
echo "<form name="formX" method="post">
<p>Pays <select name="nom_pays" onChange="formX.submit();">";
if (is_array($pays))foreach ($pays as $nom_pays){
	//Pays
	$nom_pays_choisi = $_POST["nom_pays"];
	$selected = $nom_pays_choisi==$nom_pays ? " SELECTED " : ""; //sélectionne le pays choisie (posté)
	echo "<option value="$nom_pays" $selected>$nom_pays</option>";
	
	//mémoriser les villes du pays choisi (posté)
	$villes_pays = $nom_pays_choisi ? $villes[$nom_pays_choisi] : $villes["France"];
}
//fin de la liste pays et début de la liste villes
echo "</select><p>Ville <select name="nom_ville">";
if (is_array($villes_pays)) foreach ($villes_pays as $nom_ville){
	echo "<option value="$nom_ville">$nom_ville</option>";
}
echo "</select></p></form>";
//fin
?>
Mais de toutes façons toi tu ne pourras pas mettre le "onChange" dans ton code tantque tu n'as pas regardé comment ça marche la fonction tep_draw_pull_down_menu() dans la doc OsCommerce exactement comme j'ai dit par rapport à selected :
Tu remarque le champ "selected": il sert à sélectionner une option de la liste si true et l'inverse si false
Ceci n'est possible que si la fonction OsCommerce "tep_draw_pull_down_menu()" prend en compte ce paramètre de sélection et pour en être sûr il faut voir la doc de OsCommerce sur cette fonction et sur comment elle prévoit la sélection d'une option.
--------//////----//---//----//////
-------//---//----//---//----//---//
------//////----//////-----//////
-----||--------||--||---||
Prendre le recul n'est pas une perte de temps.


ps: Affrontez moi dans l'arène