<?php
	/*
	** File: create_account
	** Description: allows a shopper to create an account
	** Version: $Revision: 1.17 $
	** Created: 06/08/1999
	** Author: Leon Atkinson
	** Email: leon@clearink.com
	** CVS Author: $Author: leon $
	** Last Revised: $Date: 1999/12/08 00:55:09 $
	** Log : $Log: create_account,v $
	** Log : Revision 1.17  1999/12/08 00:55:09  leon
	** Log : Pulled functions for creating table rows out of addressFunctions and
	** Log : generalized them.  I'm leaving wrappers for the old functions, but I
	** Log : will removed them in the coming weeks.
	** Log :
	** Log : Revision 1.16  1999/12/06 21:17:25  leon
	** Log : ECML compliance
	** Log : Overhauled address functions to use ECML form field names.  Ditto with
	** Log : the billing fields on the checkout forms.  Note the change to build.sql.
	** Log : Yes, the address table changed to accomodate new fields.  The billing
	** Log : table changed too.
	** Log :
	** Log : Revision 1.15  1999/11/08 22:32:23  leon
	** Log : Added prepareText() function to use everywhere we were using htmlentities.
	** Log :
	** Log : Revision 1.14  1999/11/04 21:35:39  leon
	** Log : Cleaned up the use of paths.  Paths are now all set in index.php3 as
	** Log : constants.  Example settings for Apache/Unix, Apache/Win32, and IIS.
	** Log :
	** Log : Revision 1.13  1999/10/25 22:41:34  leon
	** Log : Made constant for privacy statement, printed statement on relavant pages.
	** Log :
	** Log : Revision 1.12  1999/10/12 23:14:49  leon
	** Log : Moved localization constants into 'english' module.  Added constant to
	** Log : control whether unregistered shoppers may checkout.
	** Log :
	** Log : Revision 1.11  1999/10/12 00:39:09  chris
	** Log : Moving text into constants in preparation of localization support.
	** Log :
	** Log : Revision 1.9  1999/09/10 00:21:09  jj
	** Log : Changed include("addressfunctions") -> require("addressfunctions");
	** Log :
	** Log : Revision 1.8  1999/09/09 22:19:38  jj
	** Log : No longer any need to use the variable $addressFunctionsDefined.
	** Log :
	** Log : Revision 1.7  1999/08/20 16:37:09  jj
	** Log : Mike Potter found a bug in create_user.
	** Log :
	** Log : Revision 1.6  1999/08/18 22:32:14  leon
	** Log : Returning opening PHP tag to XML-friendly tag
	** Log :
	** Log : Revision 1.5  1999/08/17 17:56:41  jj
	** Log : Modularized everything to do with addresses. Please see include/addressFunctions
	** Log :
	** Log : Revision 1.4  1999/07/28 19:27:30  leon
	** Log : Mass update based on code donation from a live project
	** Log :
	**
	** Copyright (c) 1999 Working Dogs.  All rights reserved.
	*/

	/* Include my cool address functions. */
	include (APPLICATION_ROOT . "/modules/include/addressFunctions");

	print(StartForm("department", 'post', 'ADD_USER', TRUE));

	print("<TABLE BORDER=\"0\">\n");
	
	printEditRow(L_CREATEACCOUNT_LOGIN, "inputLogin", $inputLogin);
	
	print("<TR>\n");
	print("<TD>" . L_CREATEACCOUNT_PASSWORD . "</TD>\n");
	print("<TD><INPUT TYPE=\"password\" NAME=\"inputPassword\" ");
	print("VALUE=\"" . prepareText($inputPassword) . 
		"\" SIZE=\"32\"></TD>\n");
	print("</TR>\n");
		
	print("<TR>\n");
	print("<TD>&nbsp;</TD>\n");
	print("<TD><FONT SIZE=\"-1\">");
	print(L_CREATEACCOUNT_FOURCHARACTERSLONG);
	print("</FONT></TD>\n");
	print("</TR>\n");


	//create full set of address input fields
	//pull values from environment in case the form was submitted with errors
	//prefix fields with "input"
	printAddressFields(
		getAddressFromEnvironment("input"), 
		"input", 
		"ALL", 
		L_CREATEACCOUNT_CREATEACCOUNT, 
		L_CREATEACCOUNT_RESET, 
		FALSE);

	
	print("</TABLE>\n");
	print("</FORM>\n");
	
	print(PRIVACY_STATEMENT);

?>
