refactor the site_users table into bse_siteusers
authorTony Cook <tony@develop-help.com>
Wed, 14 Dec 2011 05:18:59 +0000 (16:18 +1100)
committerTony Cook <tony@develop-help.com>
Wed, 14 Dec 2011 05:18:59 +0000 (16:18 +1100)
27 files changed:
Changes.txt
INSTALL.pod
MANIFEST
MANIFEST.SKIP
schema/bse.sql
schema/site_users_to_members.sql [new file with mode: 0644]
site/cgi-bin/admin/bse_modules.pl
site/cgi-bin/admin/userlist.pl
site/cgi-bin/bse.cfg
site/cgi-bin/modules/BSE/AdminSiteUsers.pm
site/cgi-bin/modules/BSE/DB/Mysql.pm
site/cgi-bin/modules/BSE/NLFilter/SQL.pm
site/cgi-bin/modules/BSE/TB/Order.pm
site/cgi-bin/modules/BSE/UI/Shop.pm
site/cgi-bin/modules/BSE/UserReg.pm
site/cgi-bin/modules/SiteUser.pm
site/cgi-bin/modules/Squirrel/Table.pm
site/docs/config.pod
site/templates/admin/users/add.tmpl
site/templates/admin/users/edit.tmpl
site/templates/admin/users/view.tmpl
site/templates/user/options_base.tmpl
site/templates/user/options_billing_base.tmpl [deleted file]
site/templates/user/options_delivery_base.tmpl [new file with mode: 0644]
site/templates/user/register_base.tmpl
site/util/mysql.str
test.cfg-dist

index 6e1c0b1..bb25980 100644 (file)
@@ -1,6 +1,8 @@
 BSE 0.20 (unreleased)
 ========
 
+Please read any NOTES below carefully.
+
  - store a truncated card number for credit card payments (both online
    and email).  Reinstate storage of the card holder name in ccName.
    ccNumberHash is no longer populated.
@@ -8,10 +10,40 @@ BSE 0.20 (unreleased)
  - ifNeedDelivery (checkoutnew_base.tmpl) wasn't being reset on order
    submission.
 
+ - the site_users table has been refactored into the bse_siteusers
+   table, removing the bill* fields and adding deliv* fields.  Other
+   obsolete fields have also been removed.
+
+   NOTE: To preserve your registered users on upgrade, run the
+   provided schema/site_users_to_members.sql SQL through the mysql
+   tool.  This will create entries in bse_siteusers corresponding to
+   those in your original site_users table.  You MUST start with an
+   empty bse_siteusers table or the script will throw an error.
+
+   NOTE: Any configuration such as report definitions, query group
+   definitions should now refer to bse_siteusers instead of
+   site_users.
+
+ - Data::UUID 1.148 is now required
+
 Template updates:
 
-- checkoutpay_base.tmpl - the name of the cardHolder payment field is
-  now ccName.
+ - checkoutpay_base.tmpl - the name of the cardHolder payment field is
+   now ccName.
+
+ - admin/order_detail.tmpl - order ccPAN can be used to display the
+   truncated card number.
+
+ - user/options_billing_base.tmpl and its generated template have been
+   renamed with s/billing/delivery/ since it now contains delivery
+   details.  The link to it from user/options(_base).tmpl has also
+   been updated.
+
+ - user/options_base.tmpl, user/register_base.tmpl,
+   admin/users/(add,edit,view).tmpl have been updated to match the new
+   site users schema.
+
+Internals:
 
-- admin/order_detail.tmpl - order ccPAN can be used to display the
-  truncated card number.
+ - Squirrel::Table->make now looks for default_I<colname> when looking
+   for default values for a column.
index d0c9146..a0b80e9 100644 (file)
@@ -93,6 +93,10 @@ JSON
 
 Date::Format
 
+=item *
+
+Data::UUID
+
 =back
 
 and their dependants.  If you use the CPAN shell to install these then
index 3f8ab37..b7d56d6 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -13,6 +13,7 @@ schema/article.txt
 schema/bse.sql
 schema/mssql.sql
 schema/mysql_build.pl          # builds site/util/mysql.str
+schema/site_users_to_members.sql
 site/cgi-bin/admin/add.pl
 site/cgi-bin/admin/admin.pl
 site/cgi-bin/admin/admin_seminar.pl
@@ -754,7 +755,7 @@ site/templates/user/nopassword_base.tmpl
 site/templates/user/notify_file.tmpl
 site/templates/user/notify_file_html.tmpl
 site/templates/user/options_base.tmpl
-site/templates/user/options_billing_base.tmpl
+site/templates/user/options_delivery_base.tmpl
 site/templates/user/options_images_base.tmpl
 site/templates/user/options_saved_base.tmpl
 site/templates/user/orderdetaillow.tmpl
index a2b666e..03df954 100644 (file)
@@ -20,3 +20,4 @@
 ^site/cgi-bin/modules/BSE/FileEditor\.pm$
 ^site/cgi-bin/modules/BSE/Modules\.pm$
 ^site/cgi-bin/modules/Squirrel/ImageEditor\.pm$
+^\.?\#
index 37c03bf..3527024 100644 (file)
@@ -552,33 +552,35 @@ create table subscribed_users (
 
 -- contains web site users
 -- there will be a separate admin users table at some point
-drop table if exists site_users;
-create table site_users (
+drop table if exists bse_siteusers;
+create table bse_siteusers (
   id integer not null auto_increment,
 
+  idUUID varchar(40) not null,
+
   userId varchar(40) not null,
   password varchar(255) not null,
+  password_type varchar(20) not null default 'plain',
+
   email varchar(255) not null,
 
-  keepAddress integer not null default 1,
   whenRegistered datetime not null,
   lastLogon datetime not null,
 
   -- used to fill in the checkout form
+  title varchar(127),
   name1 varchar(127),
   name2 varchar(127),
-  address varchar(127),
-  city varchar(127),
+  street varchar(127),
+  street2 varchar(127),
+  suburb varchar(127),
   state varchar(40),
   postcode varchar(40),
+  country varchar(127),
   telephone varchar(80),
   facsimile varchar(80),
-  country varchar(127),
-
-  -- the user wants to receive the site newsletter if any
-  -- this should default to NO
-  -- this is probably ignored for now
-  wantLetter integer not null default 0,
+  mobile varchar(80) not null default '',
+  organization varchar(127),
 
   -- if this is non-zero, we have permission to send email to this
   -- user
@@ -593,31 +595,25 @@ create table site_users (
 
   textOnlyMail integer not null,
 
-  title varchar(127),
-  organization varchar(127),
-  
-  referral integer,
-  otherReferral varchar(127) not null,
-  prompt integer,
-  otherPrompt varchar(127) not null,
-  profession integer not null,
-  otherProfession varchar(127) not null,
-
   previousLogon datetime not null,
 
-  -- used for billing information on the checkout form
-  billFirstName varchar(127) not null default '',
-  billLastName varchar(127) not null default '',
-  billStreet varchar(127) not null default '',
-  billSuburb varchar(127) not null default '',
-  billState varchar(40) not null default '',
-  billPostCode varchar(40) not null default '',
-  billCountry varchar(127) not null default '',
+  -- used for shipping information on the checkout form
+  delivTitle varchar(127),
+  delivEmail varchar(255) not null default '',
+  delivFirstName varchar(127) not null default '',
+  delivLastName varchar(127) not null default '',
+  delivStreet varchar(127) not null default '',
+  delivStreet2 varchar(127) not null default '',
+  delivSuburb varchar(127) not null default '',
+  delivState varchar(40) not null default '',
+  delivPostCode varchar(40) not null default '',
+  delivCountry varchar(127) not null default '',
+  delivTelephone varchar(80) not null default '',
+  delivFacsimile varchar(80) not null default '',
+  delivMobile varchar(80) not null default '',
+  delivOrganization varchar(127),
 
   instructions text not null default '',
-  billTelephone varchar(80) not null default '',
-  billFacsimile varchar(80) not null default '',
-  billEmail varchar(255) not null default '',
 
   adminNotes text not null default '',
 
@@ -625,6 +621,16 @@ create table site_users (
 
   flags varchar(80) not null default '',
 
+  affiliate_name varchar(40) not null default '',
+
+  -- for password recovery
+  -- number of attempts today
+  lost_today integer not null default 0,
+  -- what today refers to
+  lost_date date null,
+  -- the hash the customer needs to supply to change their password
+  lost_id varchar(32) null,
+
   customText1 text,
   customText2 text,
   customText3 text,
@@ -632,32 +638,15 @@ create table site_users (
   customStr2 varchar(255),
   customStr3 varchar(255),
 
-  affiliate_name varchar(40) not null default '',
-
-  delivMobile varchar(80) not null default '',
-  billMobile varchar(80) not null default '',
-
-  delivStreet2 varchar(127) not null default '',
-  billStreet2 varchar(127) not null default '',
-
-  billOrganization varchar(127) not null default '',
-
   customInt1 integer,
   customInt2 integer,
 
-  password_type varchar(20) not null default 'plain',
-
-  -- for password recovery
-  -- number of attempts today
-  lost_today integer not null default 0,
-  -- what today refers to
-  lost_date date null,
-  -- the hash the customer needs to supply to change their password
-  lost_id varchar(32) null,
+  customWhen1 datetime,
 
   primary key (id),
   unique (userId),
-  index (affiliate_name)
+  index (affiliate_name),
+  unique (idUUID)
 );
 
 -- this is used to track email addresses that we've sent subscription
diff --git a/schema/site_users_to_members.sql b/schema/site_users_to_members.sql
new file mode 100644 (file)
index 0000000..242210d
--- /dev/null
@@ -0,0 +1,80 @@
+delimiter ;;
+
+drop procedure if exists bse_update_siteusers;;
+create procedure bse_update_siteusers()
+begin
+  declare sucount integer;
+  declare cur cursor for
+    select count(*) from bse_siteusers;
+  open cur;
+  fetch cur into sucount;
+  if sucount <> 0 then
+    call error_bse_siteusers_must_be_empty;
+  end if;
+  insert into bse_siteusers
+select
+  id,
+  uuid() as "idUUID",
+  userId,
+  password,
+  password_type,
+  email,
+  whenRegistered,
+  lastLogon,
+  title,
+  name1,
+  name2,
+  address as "street",
+  delivStreet2 as "street2",
+  city as "billSuburb",
+  state as "billState",
+  postcode,
+  country,
+  telephone,
+  facsimile,
+  delivMobile as "mobile",
+  organization,
+  confirmed,
+  confirmSecret,
+  waitingForConfirmation,
+  textOnlyMail,
+  previousLogon,
+  '' as delivTitle,
+  '' as delivEmail,
+  '' as delivFirstName,
+  '' as delivLastName,
+  '' as delivStreet,
+  '' as delivStreet2,
+  '' as delivSuburb,
+  '' as delivState,
+  '' as delivPostCode,
+  '' as delivCountry,
+  '' as delivTelephone,
+  '' as delivFacsimile,
+  '' as delivMobile,
+  '' as delivOrganization,
+  instructions,
+  adminNotes,
+  disabled,
+  flags,
+  affiliate_name,
+  lost_today,
+  lost_date,
+  lost_id,
+  customText1,
+  customText2,
+  customText3,
+  customStr1,
+  customStr2,
+  customStr3,
+  customInt1,
+  customInt2,
+  null as customWhen1
+from site_users;
+end;;
+
+delimiter ;
+
+call bse_update_siteusers;
+
+drop procedure bse_update_siteusers;
index eb7c758..ff359f9 100755 (executable)
@@ -41,6 +41,7 @@ my @base_check =
       'JSON' => 0,
       'MIME::Lite' => 0,
       'Date::Format' => 0,
+      'Data::UUID' => '1.148',
      }
    },
    {
index f87c6e2..575cfa3 100755 (executable)
@@ -36,21 +36,21 @@ sub do_dump {
   my @parms;
   if (defined $min and length $min) {
     if (defined $max and length $max) {
-      $sql = "select * from site_users where $field >= ? and $field <= ?";
+      $sql = "select * from bse_siteusers where $field >= ? and $field <= ?";
       @parms = ( $min, $max );
     }
     else {
-      $sql = "select * from site_users where $field >= ?";
+      $sql = "select * from bse_siteusers where $field >= ?";
       @parms = ( $min );
     }
   }
   else {
     if (defined $max and length $max) {
-      $sql = "select * from site_users where $field <= ?";
+      $sql = "select * from bse_siteusers where $field <= ?";
       @parms = ( $max );
     }
     else {
-      $sql = 'select * from site_users';
+      $sql = 'select * from bse_siteusers';
     }
   }
   
index 5c17327..457924b 100644 (file)
@@ -41,7 +41,7 @@ user/lost_prompt.tmpl = user,user/base_lost_prompt.tmpl
 user/nopassword.tmpl = user,user/nopassword_base.tmpl
 user/options.tmpl = user,user/options_base.tmpl
 user/options_saved.tmpl = user,user/options_saved_base.tmpl
-user/options_billing.tmpl = user,user/options_billing_base.tmpl
+user/options_delivery.tmpl = user,user/options_delivery_base.tmpl
 user/options_images.tmpl = user,user/options_images_base.tmpl
 user/register.tmpl = user,user/register_base.tmpl
 user/toomany.tmpl = user,user/toomany_base.tmpl
@@ -132,10 +132,6 @@ address1=First address line in configuration
 address2=Second address line in configuration
 address3=Third address line in configuration
 enabled=1
-display_billAddress=Billing Address
-display_name1=First Name
-display_name2=Last Name
-display_address=Address
 
 [level 1]
 template=common/default.tmpl
@@ -328,22 +324,22 @@ sort3=-Units;By units desc;order by 3 desc
 sort4=+Units;By units asc;order by 3 asc
 
 [report weekly_sales]
-sql1=select year(od.orderDate) as "Year", week(od.orderDate) as "Week", count(*) as 'Orders', format(sum(od.total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join site_users su on od.userId =su.userId group by year(od.orderDate), week(od.orderDate) order by 1 DESC, 2 DESC
+sql1=select year(od.orderDate) as "Year", week(od.orderDate) as "Week", count(*) as 'Orders', format(sum(od.total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join bse_siteusers su on od.userId =su.userId group by year(od.orderDate), week(od.orderDate) order by 1 DESC, 2 DESC
 
 [report monthly_sales]
-sql1=select year(od.orderDate) as "Year", month(od.orderDate) as "Month", format(sum(od.total)/100.0,2) as 'Total', count(*) as 'Count', count(su.userId) as 'User Registered' from orders od left join site_users su on od.userId = su.userId group by year(od.orderDate), month(od.orderDate) order by 1 DESC, 2 DESC
+sql1=select year(od.orderDate) as "Year", month(od.orderDate) as "Month", format(sum(od.total)/100.0,2) as 'Total', count(*) as 'Count', count(su.userId) as 'User Registered' from orders od left join bse_siteusers su on od.userId = su.userId group by year(od.orderDate), month(od.orderDate) order by 1 DESC, 2 DESC
 
 [report quarterly_sales]
 sql1=select year(od.orderDate) as "Year", quarter(od.orderDate) as "Quarter", format(sum(od.total)/100.0,2) as 'Total', count(*) as 'Count' from orders od group by year(od.orderDate), quarter(od.orderDate) order by 1 DESC, 2 DESC
 
 [report yearly_sales]
-sql1=select year(od.orderDate) as "Year", count(*) as "Orders",format(sum(od.total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join site_users su on od.userId = su.userId group by year(od.orderDate) order by 1 DESC
+sql1=select year(od.orderDate) as "Year", count(*) as "Orders",format(sum(od.total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join bse_siteusers su on od.userId = su.userId group by year(od.orderDate) order by 1 DESC
 
 [report total_sales]
-sql1=select count(*) as "Orders", format(sum(total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join site_users su on od.userId = su.userId
+sql1=select count(*) as "Orders", format(sum(total)/100.0,2) as '$ Total', count(su.userId) as 'Logon Orders' from orders od left join bse_siteusers su on od.userId = su.userId
 
 [report user_products]
-sql1=select pr.title, count(*) as 'Count' from orders od, order_item oi, article pr, site_users su where oi.orderId = od.id and oi.productId = pr.id and su.userId = od.userId and su.id = ? group by pr.id
+sql1=select pr.title, count(*) as 'Count' from orders od, order_item oi, article pr, bse_siteusers su where oi.orderId = od.id and oi.productId = pr.id and su.userId = od.userId and su.id = ? group by pr.id
 sql1params=1
 param1=site_user,User
 
@@ -358,7 +354,7 @@ novalues=[ You don't have any products ]
 [report bse_recent_regos]
 sql1=<<SQL
 select id, userId as "Logon", name1 as "First Name", name2 as "Last Name", whenRegistered as "When Registered"
-from site_users
+from bse_siteusers
 where whenRegistered > date_sub(now(), interval 7 day)
 order by whenRegistered desc
 SQL
@@ -370,7 +366,7 @@ sql=select id, concat(title, ' (', id, ')') as "label" from article
 
 [report datatype site_user]
 type=sql
-sql=select id, userId as "label" from site_users
+sql=select id, userId as "label" from bse_siteusers
 novalues=[ There are no registered users ]
 
 [report bse_test]
@@ -400,7 +396,7 @@ file_display=small
 [site users]
 display_name1=First Name
 display_name2=Last Name
-display_address=Street
+display_street=Street
 display_postcode=Post code
 display_telephone=Phone
 
index 8b209e6..43d353f 100644 (file)
@@ -13,7 +13,7 @@ use constant SITEUSER_GROUP_SECT => 'BSE Siteuser groups validation';
 use BSE::Template;
 use DevHelp::Date qw(dh_parse_date_sql dh_parse_time_sql);
 
-our $VERSION = "1.004";
+our $VERSION = "1.005";
 
 my %actions =
   (
@@ -463,8 +463,6 @@ sub req_save {
 
   $user->{textOnlyMail} = 0 
     if $cgi->param('saveTextOnlyMail') && !defined $cgi->param('textOnlyMail');
-  $user->{keepAddress} = 0 
-    if $cgi->param('saveKeepAddress') && !defined $cgi->param('keepAddress');
   $user->{disabled} = 0
     if $cgi->param('saveDisabled') && !defined $cgi->param('disabled');
   $user->save;
@@ -736,10 +734,6 @@ sub req_add {
   }
 
   $user{email} = $email;
-  $user{lastLogon} = $user{whenRegistered} = 
-    $user{previousLogon} = now_datetime;
-  $user{keepAddress} = 0;
-  $user{wantLetter} = 0;
   $user{affiliate_name} = $aff_name;
   if ($nopassword) {
     use BSE::Util::Secure qw/make_secret/;
@@ -800,7 +794,7 @@ sub req_add {
     return BSE::Template->get_refresh($r, $cfg);
   }
   else {
-    $class->req_add($req, "Database error $@");
+    $class->req_addform($req, "Database error $@");
   }
 }
 
index 975cad7..814eef5 100644 (file)
@@ -5,7 +5,7 @@ use vars qw/@ISA/;
 use Carp 'confess';
 @ISA = qw(BSE::DB);
 
-our $VERSION = "1.005";
+our $VERSION = "1.006";
 
 use vars qw($VERSION $MAX_CONNECTION_AGE);
 
@@ -205,17 +205,17 @@ SQL
    'SiteUsers.removeSub'=>
    'delete from subscribed_users where userId = ? and subId = ?',
    'SiteUsers.subRecipients' => <<EOS,
-select si.* from site_users si, subscribed_users su
+select si.* from bse_siteusers si, subscribed_users su
   where confirmed <> 0 and disabled = 0 and si.id = su.userId and su.subId = ?
 EOS
-   SiteUsers => 'select * from site_users',
+   SiteUsers => 'select * from bse_siteusers',
    'SiteUsers.allSubscribers' => <<SQL,
 select distinct su.* 
-  from site_users su, orders od, order_item oi
+  from bse_siteusers su, orders od, order_item oi
   where su.id = od.siteuser_id and od.id = oi.orderId 
         and oi.subscription_id <> -1
 SQL
-   siteuserAllIds => 'select id from site_users',
+   siteuserAllIds => 'select id from bse_siteusers',
    getBSESiteuserImage => <<SQL,
 select * from bse_siteuser_images
   where siteuser_id = ? and image_id = ?
@@ -244,7 +244,7 @@ SQL
    deleteSubscriptionType =>
    'delete from subscription_types where id = ?',
    subRecipientCount => <<EOS,
-select count(*) as "count" from site_users si, subscribed_users su
+select count(*) as "count" from bse_siteusers si, subscribed_users su
   where confirmed <> 0 and disabled = 0 and si.id = su.userId and su.subId = ?
 EOS
    'SubscriptionTypes.userSubscribedTo' => <<'EOS',
@@ -387,7 +387,7 @@ select od.id, od.userId, od.orderDate, od.siteuser_id,
 SQL
    subscriptionUserSummary => <<SQL,
 select su.*, us.*
-  from site_users su, bse_user_subscribed us
+  from bse_siteusers su, bse_user_subscribed us
 where su.id = us.siteuser_id and us.subscription_id = ?
 SQL
    subscriptionProductCount => <<SQL,
@@ -496,7 +496,7 @@ select *
   where seminar_id = ? and location_id = ? and when_at > ?
 SQL
    'SiteUsers.sessionBookings' => <<SQL,
-select su.* from site_users su, bse_seminar_bookings sb
+select su.* from bse_siteusers su, bse_seminar_bookings sb
   where sb.session_id = ? and su.id = sb.siteuser_id
 SQL
    cancelSeminarSessionBookings => <<SQL,
@@ -517,7 +517,7 @@ SQL
    seminarSessionRollCallEntries => <<SQL,
 select bo.roll_present, su.id, su.userId, su.name1, su.name2, su.email,
     bo.id as booking_id
-  from bse_seminar_bookings bo, site_users su
+  from bse_seminar_bookings bo, bse_siteusers su
 where bo.session_id = ? and bo.siteuser_id = su.id
 SQL
   updateSessionRollPresent => <<SQL,
index c93d46f..403da5e 100644 (file)
@@ -2,7 +2,7 @@ package BSE::NLFilter::SQL;
 use strict;
 use Carp 'confess';
 
-our $VERSION = "1.000";
+our $VERSION = "1.001";
 
 sub new {
   my ($class, %opts) = @_;
@@ -97,7 +97,7 @@ c:
 
   [section name]
   ; the 1=0 makes the leading "or " valid on the other fragments
-  prefix=select id from site_users where 1=0
+  prefix=select id from bse_siteusers where 1=0
   suffix=
   leadinga=or userId like 'a%'
   leadingb=or userId like 'b%'
@@ -108,7 +108,7 @@ c:
 There is nothing preventing joins or more complex SQL.
 
 The only requirement is that the SQL result set includes a single
-column which is the id from the site_users table for that user.
+column which is the id from the bse_siteusers table for that user.
 
 You will need to edit the admin/subs/send_filter.tmpl template to add
 form elements to accept the CGI parameters above.  For our example we
index 4ad931c..d682f7b 100644 (file)
@@ -6,7 +6,7 @@ use vars qw/@ISA/;
 @ISA = qw/Squirrel::Row/;
 use Carp 'confess';
 
-our $VERSION = "1.013";
+our $VERSION = "1.014";
 
 sub columns {
   return qw/id
@@ -211,41 +211,41 @@ sub valid_fields {
 
   my %fields =
     (
-     delivFirstName => { description=>'Delivery First Name', 
+     delivFirstName => { description=>'Delivery First Name',
                         rules=>'dh_one_line' },
-     delivLastName => { description => 'Delivery Last Name', 
+     delivLastName => { description => 'Delivery Last Name',
                         rules=>'dh_one_line'  },
-     delivOrganization => { description => 'Delivery Organization', 
+     delivOrganization => { description => 'Delivery Organization',
                            rules=>'dh_one_line'  },
-     delivStreet => { description => 'Delivery Street', 
+     delivStreet => { description => 'Delivery Street',
                         rules=>'dh_one_line'  },
-     delivStreet2 => { description => 'Delivery Street 2', 
+     delivStreet2 => { description => 'Delivery Street 2',
                         rules=>'dh_one_line'  },
-     delivState => { description => 'Delivery State', 
+     delivState => { description => 'Delivery State',
                         rules=>'dh_one_line'  },
-     delivSuburb => { description => 'Delivery Suburb', 
+     delivSuburb => { description => 'Delivery Suburb',
                         rules=>'dh_one_line'  },
-     delivPostCode => { description => 'Delivery Post Code', 
+     delivPostCode => { description => 'Delivery Post Code',
                         rules=>'dh_one_line;dh_int_postcode'  },
-     delivCountry => { description => 'Delivery Country', 
+     delivCountry => { description => 'Delivery Country',
                         rules=>'dh_one_line'  },
-     billFirstName => { description => 'Billing First Name', 
+     billFirstName => { description => 'Billing First Name',
                         rules=>'dh_one_line'  },
-     billLastName => { description => 'Billing Last Name', 
+     billLastName => { description => 'Billing Last Name',
                         rules=>'dh_one_line'  },
-     billOrganization => { description => 'Billing Organization', 
+     billOrganization => { description => 'Billing Organization',
                           rules=>'dh_one_line'  },
-     billStreet => { description => 'Billing Street', 
+     billStreet => { description => 'Billing Street',
                         rules=>'dh_one_line'  },
-     billStreet2 => { description => 'Billing Street 2', 
+     billStreet2 => { description => 'Billing Street 2',
                         rules=>'dh_one_line'  },
-     billSuburb => { description => 'Billing Suburb', 
+     billSuburb => { description => 'Billing Suburb',
                         rules=>'dh_one_line'  },
-     billState => { description => 'Billing State', 
+     billState => { description => 'Billing State',
                         rules=>'dh_one_line'  },
-     billPostCode => { description => 'Billing Post Code', 
+     billPostCode => { description => 'Billing Post Code',
                         rules=>'dh_one_line;dh_int_postcode'  },
-     billCountry => { description => 'Billing First Name', 
+     billCountry => { description => 'Billing First Name',
                         rules=>'dh_one_line'  },
      telephone => { description => 'Telephone Number',
                    rules => "phone" },
@@ -254,7 +254,7 @@ sub valid_fields {
      emailAddress => { description => 'Email Address',
                       rules=>'email' },
      instructions => { description => 'Instructions' },
-     billTelephone => { description => 'Billing Telephone Number', 
+     billTelephone => { description => 'Billing Telephone Number',
                        rules=>'phone' },
      billFacsimile => { description => 'Billing Facsimile Number',
                        rules=>'phone' },
@@ -289,20 +289,20 @@ sub valid_payment_fields {
 
   my %fields =
     (
-     cardNumber => 
-     { 
+     cardNumber =>
+     {
       description => "Credit Card Number",
       rules=>"creditcardnumber",
      },
-     cardExpiry => 
+     cardExpiry =>
      {
       description => "Credit Card Expiry Date",
       rules => 'creditcardexpirysingle',
      },
      ccName => { description => "Credit Card Holder" },
      ccType => { description => "Credit Card Type" },
-     cardVerify => 
-     { 
+     cardVerify =>
+     {
       description => 'Card Verification Value',
       rules => 'creditcardcvv',
      },
@@ -325,7 +325,7 @@ sub clear_items {
 
   confess "Attempt to clear items on completed order $self->{id}"
     if $self->{complete};
-  
+
   BSE::DB->run(deleteOrdersItems => $self->{id});
 }
 
@@ -346,7 +346,7 @@ sub add_item {
       $options = delete $opts{options};
     }
   }
-  
+
   require BSE::TB::OrderItems;
   my %item =
     (
index eacc0e7..6688673 100644 (file)
@@ -17,7 +17,7 @@ use BSE::Shipping;
 use BSE::Countries qw(bse_country_code);
 use BSE::Util::Secure qw(make_secret);
 
-our $VERSION = "1.025";
+our $VERSION = "1.026";
 
 use constant MSG_SHOP_CART_FULL => 'Your shopping cart is full, please remove an item and try adding an item again';
 
@@ -48,17 +48,17 @@ my %field_map =
   (
    name1 => 'billFirstName',
    name2 => 'billLastName',
-   address => 'billStreet',
-   organization => 'billOrganization',
-   city => 'billSuburb',
+   street => 'billStreet',
+   street2 => 'billStreet2',
+   suburb => 'billSuburb',
    postcode => 'billPostCode',
    state => 'billState',
    country => 'billCountry',
-   email => 'billEmail',
    telephone => 'billTelephone',
    facsimile => 'billFacsimile',
-   delivMobile => 'billMobile', # temporary hack
-   unknown1 => 'delivMobile', # more hackery
+   mobile => 'billMobile',
+   organization => 'billOrganization',
+   email => 'billEmail',
   );
 
 my %rev_field_map = reverse %field_map;
@@ -497,11 +497,20 @@ sub req_checkout {
 
   my $order_info = $req->session->{order_info};
 
+  my $billing_map = BSE::TB::Order->billing_to_delivery_map;
+  my %delivery_map = reverse %$billing_map;
+
+  if ($order_info && !$need_delivery) {
+    # if need delivery is off, remove any delivery fields
+    my $map = BSE::TB::Order->billing_to_delivery_map;
+    delete @{$order_info}{keys %delivery_map};
+  }
+
   my $old = sub {
     my $field = $_[0];
     my $value;
 
-    if ($olddata) {
+    if ($olddata && defined($cgi->param($field))) {
       $value = $cgi->param($field);
     }
     elsif ($order_info && defined $order_info->{$field}) {
@@ -523,18 +532,26 @@ sub req_checkout {
   my $shipping_name = '';
   my $prompt_ship = $cfg->entry("shop", "shipping", 0);
   if ($prompt_ship) {
+    my $work_order;
+    $work_order = $order_info unless $olddata;
+    unless ($work_order) {
+      my %fake_order;
+      my %fields = $class->_order_fields($req);
+      $class->_order_hash($req, \%fake_order, \%fields, user => 1);
+      $work_order = \%fake_order;
+    }
+
     # Get a list of couriers
     my $sel_cn = $old->("shipping_name") || "";
-    my %fake_order;
-    my %fields = $class->_order_fields($req);
-    $class->_order_hash($req, \%fake_order, \%fields, user => 1);
-    my $country = $fake_order{delivCountry} || bse_default_country($cfg);
+    my $country_field = $need_delivery ? "delivCountry" : "billCountry";
+    my $country = $old->($country_field)
+      || bse_default_country($cfg);
     my $country_code = bse_country_code($country);
-    my $suburb = $fake_order{delivSuburb};
-    my $postcode = $fake_order{delivPostCode};
+    my $suburb = $old->($need_delivery ? "delivSuburb" : "billSuburb");
+    my $postcode = $old->($need_delivery ? "delivPostCode" : "billPostCode");
 
     $country_code
-      or $errors->{delivCountry} = "Unknown country name $country";
+      or $errors->{$country_field} = "Unknown country name $country";
 
     my @couriers = BSE::Shipping->get_couriers($cfg);
 
@@ -554,7 +571,7 @@ sub req_checkout {
       $sel_cn = $sel_cour->name;
     }
     if ($sel_cour and $postcode and $suburb and $country_code) {
-      my @parcels = BSE::Shipping->package_order($cfg, \%fake_order, \@items);
+      my @parcels = BSE::Shipping->package_order($cfg, $order_info, \@items);
       $shipping_cost = $sel_cour->calculate_shipping
        (
         parcels => \@parcels,
index b850754..ca726ae 100644 (file)
@@ -18,7 +18,7 @@ use BSE::Util::Iterate;
 use base 'BSE::UI::UserCommon';
 use Carp qw(confess);
 
-our $VERSION = "1.018";
+our $VERSION = "1.019";
 
 use constant MAX_UNACKED_CONF_MSGS => 3;
 use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -757,8 +757,6 @@ sub req_saveopts {
 
   $user->{textOnlyMail} = 0 
     if $cgi->param('saveTextOnlyMail') && !defined $cgi->param('textOnlyMail');
-  $user->{keepAddress} = 0 
-    if $cgi->param('saveKeepAddress') && !defined $cgi->param('keepAddress');
   $user->save;
 
   # subscriptions
@@ -876,9 +874,6 @@ sub req_register {
   my %user;
   my @cols = SiteUser->columns;
   shift @cols;
-  for my $field (@cols) {
-    $user{$field} = '';
-  }
 
   my %errors;
   my %fields = SiteUser->valid_fields($cfg);
@@ -972,7 +967,7 @@ sub req_register {
     if ($cfg->entryBool('site users', "require_$col")) {
       unless (defined $value && $value ne '') {
        my $disp = $cfg->entry('site users', "display_$col", "\u$col");
-       
+
        $errors{$col} = $msgs->(regrequired => "$disp is a required field", 
                                $col, $disp);
       }
@@ -990,10 +985,6 @@ sub req_register {
   }
 
   $user{email} = $email;
-  $user{lastLogon} = $user{whenRegistered} = 
-    $user{previousLogon} = now_datetime;
-  $user{keepAddress} = 0;
-  $user{wantLetter} = 0;
   $user{affiliate_name} = $aff_name;
   if ($nopassword) {
     use BSE::Util::Secure qw/make_secret/;
@@ -1050,7 +1041,7 @@ sub req_register {
     }
   }
   else {
-    $self->req_show_register($req, $msgs->(regdberr=> "Database error $@"));
+    return $self->req_show_register($req, $msgs->(regdberr=> "Database error $@"));
   }
 
   return;
index ec90644..9893058 100644 (file)
@@ -8,99 +8,104 @@ use Constants qw($SHOP_FROM);
 use Carp qw(confess);
 use BSE::Util::SQL qw/now_datetime now_sqldate sql_normal_date sql_add_date_days/;
 
-our $VERSION = "1.006";
+our $VERSION = "1.007";
 
 use constant MAX_UNACKED_CONF_MSGS => 3;
 use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
 use constant OWNER_TYPE => "U";
 
 sub columns {
-  return qw/id userId password email keepAddress whenRegistered lastLogon
-            name1 name2 address city state postcode telephone facsimile 
-            country wantLetter confirmed confirmSecret waitingForConfirmation
-            textOnlyMail title organization referral otherReferral
-            prompt otherPrompt profession otherProfession previousLogon
-            billFirstName billLastName billStreet billSuburb billState 
-            billPostCode billCountry instructions billTelephone billFacsimile 
-            billEmail adminNotes disabled flags
+  return qw/id idUUID userId password password_type email whenRegistered
+           lastLogon
+           title name1 name2 street street2
+           suburb state postcode country
+           telephone facsimile mobile organization
+            confirmed confirmSecret waitingForConfirmation
+            textOnlyMail previousLogon
+            delivTitle delivEmail delivFirstName delivLastName delivStreet
+           delivStreet2 delivSuburb delivState delivPostCode delivCountry
+           delivTelephone delivFacsimile delivMobile delivOrganization
+           instructions adminNotes disabled flags
+           affiliate_name lost_today lost_date lost_id
             customText1 customText2 customText3
             customStr1 customStr2 customStr3
-            affiliate_name delivMobile billMobile
-            delivStreet2 billStreet2
-            billOrganization
-            customInt1 customInt2 password_type
-            lost_today lost_date lost_id/;
+            customInt1 customInt2 customWhen1
+            /;
 }
 
 sub table {
-  return "site_users";
+  return "bse_siteusers";
 }
 
 sub defaults {
   require BSE::Util::SQL;
   return
     (
-     keepAddress => 1, # what am I for - appears unused
+     # idUUID handled by default_idUUID()
+     # userId - required
+     # password - required (and generates password and password_type)
+     # password_type - generated
+     # email - required
      whenRegistered => BSE::Util::SQL::now_datetime(),
      lastLogon => BSE::Util::SQL::now_datetime(),
+     title => "",
      name1 => "",
      name2 => "",
-     address => "",
-     city => "",
+     street => "",
+     street2 => "",
+     suburb => "",
      state => "",
      postcode => "",
+     country => "",
      telephone => "",
      facsimile => "",
-     country => "",
-     wantLetter => 0, # also unused
+     mobile => "",
+     organization => "",
      confirmed => 0,
      confirmSecret => "",
      waitingForConfirmation => 0,
      textOnlyMail => 0,
-     title => "",
-     organization => "",
-     referral => 0,
-     otherReferral => "",
-     prompt => 0,
-     otherPrompt => "",
-     profession => 0,
-     otherProfession => "",
      previousLogon => BSE::Util::SQL::now_datetime(),
-     billFirstName => "",
-     billLastName => "",
-     billStreet => "",
-     billSuburb => "",
-     billState => "", 
-     billPostCode => "",
-     billCountry => "",
+     delivTitle => "",
+     delivEmail => "",
+     delivFirstName => "",
+     delivLastName => "",
+     delivStreet => "",
+     delivStreet2 => "",
+     delivSuburb => "",
+     delivState => "", 
+     delivPostCode => "",
+     delivCountry => "",
+     delivTelephone => "",
+     delivFacsimile => "", 
+     delivMobile => "",
+     delivOrganization => "",
      instructions => "",
-     billTelephone => "",
-     billFacsimile => "", 
-     billEmail => "",
      adminNotes => "",
      disabled => 0,
      flags => "",
+     affiliate_name => "",
+     lost_today => 0,
+     lost_date => undef,
+     lost_id => undef,
      customText1 => undef,
      customText2 => undef,
      customText3 => undef,
      customStr1 => undef,
      customStr2 => undef,
      customStr3 => undef,
-     affiliate_name => "",
-     delivMobile => "",
-     billMobile => "",
-     delivStreet2 => "",
-     billStreet2 => "",
-     billOrganization => "",
      customInt1 => "",
      customInt2 => "",
-     #password_type,
-     lost_today => 0,
-     lost_date => undef,
-     lost_id => undef,
+     customWhen1 => "",
     );
 }
 
+sub default_idUUID {
+  require Data::UUID;
+  my $ug = Data::UUID->new;
+  return $ug->create_str;
+}
+
 sub valid_fields {
   my ($class, $cfg, $admin) = @_;
 
@@ -108,58 +113,49 @@ sub valid_fields {
     (
      email => { rules=>'email', description=>'Email Address',
                maxlen => 255},
+     title => { description => 'Title', rules => 'dh_one_line', maxlen => 127 },
      name1 => { description=>'First Name', rules=>"dh_one_line", maxlen=>127 },
-     name2 => { description=>'Surname', rules=>"dh_one_line", maxlen=>127 },
-     address => { description => 'Address', rules=>"dh_one_line", maxlen=>127 },
-     city => { description=>'City/Suburb', rules=>"dh_one_line", maxlen=>127 },
+     name2 => { description=>'Last Name', rules=>"dh_one_line", maxlen=>127 },
+     street => { description => 'Address', rules=>"dh_one_line", maxlen=>127 },
+     street2 => { description => 'Address', rules=>"dh_one_line", maxlen=>127 },
+     suburb => { description=>'City/Suburb', rules=>"dh_one_line", maxlen=>127 },
      state => { description => 'State', rules=>"dh_one_line", maxlen=>40 },
      postcode => { rules=>'postcode', description=>'Post Code', maxlen=>40 },
+     country => { description=>'Country', rules=>"dh_one_line", maxlen=>127 },
      telephone => { rules=>'phone', description=>'Telephone', maxlen=>80 },
      facsimile => { rules=>'phone', description=>'Facsimile', maxlen=>80 },
-     country => { description=>'Country', rules=>"dh_one_line", maxlen=>127 },
-     title => { description=>'Title', rules=>"dh_one_line", maxlen=>127  },
+     mobile => { description => "Mobile", rules=>"phone", maxlen => 80 },
      organization => { description=>'Organization', rules=>"dh_one_line", 
                       maxlen=>127  },
-     delivMobile => { description => "Mobile", rules=>"phone",
-                     maxlen => 80 },
-     delivStreet2 => { description => 'Address2', rules => "dh_one_line",
-                      maxlen=> 127 },
      textOnlyEmail => { description => "Text Only Email", type=>"boolean" },
-     referral => { description=>'Referral', rules=>"natural"  },
-     otherReferral => { description=>'Other Referral', rules=>"dh_one_line",
-                     maxlen=>127},
-     prompt => { description=>'Prompt', rules=>"natural" },
-     otherPrompt => { description => 'Other Prompt', rules=>"dh_one_line",
-                   maxlen=>127 },
-     profession => { description => 'Profession', rules=>"natural" },
-     otherProfession => { description=>'Other Profession',
-                         rules=>"dh_one_line", maxlen=>127 },
-     billFirstName => { description=>"Billing First Name",
+     delivTitle => { description=>"Delivery Title",
+                       rules=>"dh_one_line", maxlen=>127 },
+     delivEmail => { description => "Delivery Email", rules=>"email", 
+                   maxlen=>255 },
+     delivFirstName => { description=>"Delivery First Name",
                        rules=>"dh_one_line", maxlen=>127 },
-     billLastName => { descriptin=>"Billing Last Name", rules=>"dh_one_line" },
-     billStreet => { description => "Billing Street Address",
+     delivLastName => { descriptin=>"Delivery Last Name", rules=>"dh_one_line" },
+     delivStreet => { description => "Delivery Street Address",
                     rules=>"dh_one_line", maxlen=>127 },
-     billStreet2 => { description => 'Billing Street Address 2', 
+     delivStreet2 => { description => 'Delivery Street Address 2', 
                      rules => "dh_one_line", maxlen=> 127 },
-     billSuburb => { description => "Billing Suburb", rules=>"dh_one_line", 
+     delivSuburb => { description => "Delivery Suburb", rules=>"dh_one_line", 
                     maxlen=>127 },
-     billState => { description => "Billing State", rules=>"dh_one_line", 
+     delivState => { description => "Delivery State", rules=>"dh_one_line", 
                    maxlen=>40 },
-     billPostCode => { description => "Billing Post Code", rules=>"postcode", 
+     delivPostCode => { description => "Delivery Post Code", rules=>"postcode", 
                       maxlen=>40 },
-     billCountry => { description => "Billing Country", rules=>"dh_one_line", 
+     delivCountry => { description => "Delivery Country", rules=>"dh_one_line", 
                      maxlen=>127 },
-     instructions => { description => "Delivery Instructions" },
-     billTelephone => { description => "Billing Phone", rules=>"phone", 
+     delivTelephone => { description => "Delivery Phone", rules=>"phone", 
                        maxlen=>80 },
-     billFacsimile => { description => "Billing Facsimie", rules=>"phone", 
+     delivFacsimile => { description => "Delivery Facsimie", rules=>"phone", 
                        maxlen=>80 },
-     billEmail => { description => "Billing Email", rules=>"email", 
-                   maxlen=>255 },
-     billMobile => { description => "Billing Mobile", rules=>"phone",
+     delivMobile => { description => "Delivery Mobile", rules=>"phone",
                     maxlen => 80 },
-     billOrganization => { description => "Billing Organization",
+     delivOrganization => { description => "Delivery Organization",
                           rules=>"dh_one_line", maxlen => 127 },
+     instructions => { description => "Delivery Instructions" },
      customText1 => { description => "Custom Text 1" },
      customText2 => { description => "Custom Text 2" },
      customText3 => { description => "Custom Text 3" },
index eafc89a..d8de0d7 100644 (file)
@@ -1,6 +1,6 @@
 package Squirrel::Table;
 
-our $VERSION = "1.005";
+our $VERSION = "1.006";
 
 use Carp;
 use strict;
@@ -526,13 +526,15 @@ sub query {
 sub make {
   my ($self, %values) = @_;
 
-  my @cols = $self->rowClass->columns;
-  my %defaults = $self->rowClass->defaults;
+  my $row_class = $self->rowClass;
+  my @cols = $row_class->columns;
+  my %defaults = $row_class->defaults;
   shift @cols; # presumably the generated private key
-  my $bases = $self->rowClass->bases;
+  my $bases = $row_class->bases;
   my @values;
   for my $col (@cols) {
     my $value;
+    my $def_method = "default_$col";
     # a defined test is inappropriate here, the caller might want to
     # set a column to null.
     if (exists $values{$col}) {
@@ -541,6 +543,9 @@ sub make {
     elsif (exists $defaults{$col}) {
       $value = $defaults{$col};
     }
+    elsif ($row_class->can($def_method)) {
+      $value = $row_class->$def_method();
+    }
     elsif ($bases->{$col}) {
       # populated elsewhere
     }
index 783e53d..d1ff709 100644 (file)
@@ -1209,9 +1209,9 @@ You cannot use this to control access to the shop.
 
 =item require_name2
 
-=item require_address
+=item require_street
 
-=item require_city
+=item require_suburb
 
 =item require_state
 
@@ -1692,7 +1692,7 @@ values are the name of the query group.  For example:
   1=some name
 
   [query group some name]
-  sql=select id from site_users where id = ? and name1 like '%some%'
+  sql=select id from bse_siteusers where id = ? and name1 like '%some%'
 
 Each entry also has a corresponding [Query Group I<name>] section.
 
index b92d551..dfc6b7a 100644 (file)
             <td class="help"><:help editsiteuser name2:>  <:error_img name2:></td>
           </tr>
           <tr> 
-            <th>address: </th>
+            <th>Address: </th>
             <td> 
-              <input type="text" name="address" value="<:old address:>" size="60" /><:ifRequired address:>*<:or:><:eif:>
+              <input type="text" name="street" value="<:old street:>" size="60" /><:ifRequired street:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser address:>  <:error_img address:></td>
+            <td class="help"><:help editsiteuser street:>  <:error_img street:></td>
           </tr>
           <tr> 
-            <th>city: </th>
+            <th></th>
             <td> 
-              <input type="text" name="city" value="<:old city :>" /><:ifRequired city:>*<:or:><:eif:>
+              <input type="text" name="street2" value="<:old street2:>" size="60" /><:ifRequired street2:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser city:>  <:error_img city:></td>
+            <td class="help"><:help editsiteuser street2:>  <:error_img street2:></td>
+          </tr>
+          <tr> 
+            <th>Suburb: </th>
+            <td> 
+              <input type="text" name="suburb" value="<:old suburb :>" /><:ifRequired suburb:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser suburb:>  <:error_img suburb:></td>
           </tr>
           <tr> 
             <th>state: </th>
             </td>
             <td class="help"><:help editsiteuser postcode:>  <:error_img postcode:></td>
           </tr>
+          <tr> 
+            <th>country: </th>
+            <td> 
+              <input type="text" name="country" value="<:old country :>" size="60" /><:ifRequired country:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser country:>  <:error_img country:></td>
+          </tr>
           <tr> 
             <th>telephone: </th>
             <td> 
           <tr> 
             <th>mobile: </th>
             <td> 
-              <input type="text" name="delivMobile" value="<:old delivMobile:>" /><:ifRequired delivMobile:>*<:or:><:eif:>
+              <input type="text" name="mobile" value="<:old mobile:>" /><:ifRequired mobile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser delivMobile:>  <:error_img delivMobile:></td>
+            <td class="help"><:help editsiteuser mobile:>  <:error_img mobile:></td>
           </tr>
           <tr> 
             <th>facsimile: </th>
             </td>
             <td class="help"><:help editsiteuser facsimile:>  <:error_img facsimile:></td>
           </tr>
-          <tr> 
-            <th>country: </th>
-            <td> 
-              <input type="text" name="country" value="<:old country :>" size="60" /><:ifRequired country:>*<:or:><:eif:>
-            </td>
-            <td class="help"><:help editsiteuser country:>  <:error_img country:></td>
-          </tr>
           <tr> 
             <th>title: </th>
             <td> 
             </td>
             <td class="help"><:help editsiteuser organization:>  <:error_img organization:></td>
           </tr>
+         <tr>
+           <th colspan="2">Delivery</th>
+         </tr>
+          <tr> 
+            <th>First Name: </th>
+            <td> 
+              <input type="text" name="delivFirstName" value="<:old delivFirstName:>" size="60" /><:ifRequired delivFirstName:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser delivFirstName:>  <:error_img delivFirstName:></td>
+          </tr>
           <tr> 
-            <th>billFirstName: </th>
+            <th>Last Name: </th>
+            <td> 
+              <input type="text" name="delivLastName" value="<:old delivLastName :>" size="60" /><:ifRequired delivLastName:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser delivLastName:>  <:error_img delivLastName:></td>
+          </tr>
+          <tr> 
+            <th>Organization: </th>
             <td> 
-              <input type="text" name="billFirstName" value="<:old billFirstName:>" size="60" /><:ifRequired billFirstName:>*<:or:><:eif:>
+              <input type="text" name="delivOrganization" value="<:old delivOrganization:>" size="60" /><:ifRequired delivOrganization:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billFirstName:>  <:error_img billFirstName:></td>
+            <td class="help"><:help editsiteuser delivOrganization:>  <:error_img delivOrganization:></td>
           </tr>
           <tr> 
-            <th>billLastName: </th>
+            <th>Address: </th>
             <td> 
-              <input type="text" name="billLastName" value="<:old billLastName :>" size="60" /><:ifRequired billLastName:>*<:or:><:eif:>
+              <input type="text" name="delivStreet" value="<:old delivStreet :>" size="60" /><:ifRequired delivStreet:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billLastName:>  <:error_img billLastName:></td>
+            <td class="help"><:help editsiteuser delivStreet:>  <:error_img delivStreet:></td>
           </tr>
           <tr> 
-            <th>billStreet: </th>
+            <th></th>
             <td> 
-              <input type="text" name="billStreet" value="<:old billStreet :>" size="60" /><:ifRequired billStreet:>*<:or:><:eif:>
+              <input type="text" name="delivStreet2" value="<:old delivStreet2 :>" size="60" /><:ifRequired delivStreet2:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billStreet:>  <:error_img billStreet:></td>
+            <td class="help"><:help editsiteuser delivStreet2:>  <:error_img delivStreet2:></td>
           </tr>
           <tr> 
-            <th>billSuburb: </th>
+            <th>Suburb: </th>
             <td> 
-              <input type="text" name="billSuburb" value="<:old billSuburb :>" /><:ifRequired billSuburb:>*<:or:><:eif:>
+              <input type="text" name="delivSuburb" value="<:old delivSuburb :>" /><:ifRequired delivSuburb:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billSuburb:>  <:error_img billSuburb:></td>
+            <td class="help"><:help editsiteuser delivSuburb:>  <:error_img delivSuburb:></td>
           </tr>
           <tr> 
-            <th>billState: </th>
+            <th>State: </th>
             <td> 
-              <input type="text" name="billState" value="<:old billState :>" /><:ifRequired billState:>*<:or:><:eif:>
+              <input type="text" name="delivState" value="<:old delivState :>" /><:ifRequired delivState:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billState:>  <:error_img billState:></td>
+            <td class="help"><:help editsiteuser delivState:>  <:error_img delivState:></td>
           </tr>
           <tr> 
-            <th>billPostCode: </th>
+            <th>PostCode: </th>
             <td> 
-              <input type="text" name="billPostCode" value="<:old billPostCode:>" /><:ifRequired billPostCode:>*<:or:><:eif:>
+              <input type="text" name="delivPostCode" value="<:old delivPostCode:>" /><:ifRequired delivPostCode:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billPostCode:>  <:error_img billPostCode:></td>
+            <td class="help"><:help editsiteuser delivPostCode:>  <:error_img delivPostCode:></td>
           </tr>
           <tr> 
-            <th>billCountry: </th>
+            <th>Country: </th>
             <td> 
-              <input type="text" name="billCountry" value="<:old billCountry :>" /><:ifRequired billCountry:>*<:or:><:eif:>
+              <input type="text" name="delivCountry" value="<:old delivCountry :>" /><:ifRequired delivCountry:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billCountry:>  <:error_img billCountry:></td>
+            <td class="help"><:help editsiteuser delivCountry:>  <:error_img delivCountry:></td>
           </tr>
           <tr> 
             <th>instructions: </th>
             <td class="help"><:help editsiteuser instructions:>  <:error_img instructions:></td>
           </tr>
           <tr> 
-            <th>billTelephone: </th>
+            <th>Telephone: </th>
             <td> 
-              <input type="text" name="billTelephone" value="<:old billTelephone:>" /><:ifRequired billTelephone:>*<:or:><:eif:>
+              <input type="text" name="delivTelephone" value="<:old delivTelephone:>" /><:ifRequired delivTelephone:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billTelephone:>  <:error_img billTelephone:></td>
+            <td class="help"><:help editsiteuser delivTelephone:>  <:error_img delivTelephone:></td>
           </tr>
           <tr> 
-            <th>billMobile: </th>
+            <th>Mobile: </th>
             <td> 
-              <input type="text" name="billMobile" value="<:old billMobile:>" /><:ifRequired billMobile:>*<:or:><:eif:>
+              <input type="text" name="delivMobile" value="<:old delivMobile:>" /><:ifRequired delivMobile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billMobile:>  <:error_img billMobile:></td>
+            <td class="help"><:help editsiteuser delivMobile:>  <:error_img delivMobile:></td>
           </tr>
           <tr> 
-            <th>billFacsimile: </th>
+            <th>Facsimile: </th>
             <td> 
-              <input type="text" name="billFacsimile" value="<:old billFacsimile :>" /><:ifRequired billFacsimile:>*<:or:><:eif:>
+              <input type="text" name="delivFacsimile" value="<:old delivFacsimile :>" /><:ifRequired delivFacsimile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billFacsimile:>  <:error_img billFacsimile:></td>
+            <td class="help"><:help editsiteuser delivFacsimile:>  <:error_img delivFacsimile:></td>
           </tr>
           <tr> 
-            <th>billEmail: </th>
+            <th>Email: </th>
             <td> 
-              <input type="text" name="billEmail" value="<:old billEmail :>" /><:ifRequired billEmail:>*<:or:><:eif:>
+              <input type="text" name="delivEmail" value="<:old delivEmail :>" /><:ifRequired delivEmail:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billEmail:>  <:error_img billEmail:></td>
+            <td class="help"><:help editsiteuser delivEmail:>  <:error_img delivEmail:></td>
           </tr>
           <tr> 
             <th>Affiliate Name: </th>
index 70ecce7..a21f7b8 100644 (file)
             <td class="help"><:help editsiteuser name2:>  <:error_img name2:></td>
           </tr>
           <tr> 
-            <th>address: </th>
+            <th>Address: </th>
             <td> 
-              <input type="text" name="address" value="<:old address siteuser address:>" size="60" /><:ifRequired address:>*<:or:><:eif:>
+              <input type="text" name="street" value="<:old street siteuser street:>" size="60" /><:ifRequired street:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser address:>  <:error_img address:></td>
+            <td class="help"><:help editsiteuser street:>  <:error_img street:></td>
           </tr>
           <tr> 
-            <th>city: </th>
+            <th></th>
             <td> 
-              <input type="text" name="city" value="<:old city siteuser city:>" /><:ifRequired city:>*<:or:><:eif:>
+              <input type="text" name="street2" value="<:old street2 siteuser street2:>" size="60" /><:ifRequired street2:>*<:or:><:eif:>
             </td>
-            <td><:help editsiteuser city:>  <:error_img city:></td>
+            <td class="help"><:help editsiteuser street2:>  <:error_img street2:></td>
+          </tr>
+          <tr> 
+            <th>Suburb: </th>
+            <td> 
+              <input type="text" name="suburb" value="<:old suburb siteuser suburb:>" /><:ifRequired suburb:>*<:or:><:eif:>
+            </td>
+            <td><:help editsiteuser suburb:>  <:error_img suburb:></td>
           </tr>
           <tr> 
             <th>state: </th>
             </td>
             <td class="help"><:help editsiteuser postcode:>  <:error_img postcode:></td>
           </tr>
+          <tr> 
+            <th>country: </th>
+            <td> 
+              <input type="text" name="country" value="<:old country siteuser country:>" size="60" /><:ifRequired country:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser country:>  <:error_img country:></td>
+          </tr>
           <tr> 
             <th>telephone: </th>
             <td> 
           <tr> 
             <th>mobile: </th>
             <td> 
-              <input type="text" name="delivMobile" value="<:old delivMobile siteuser delivMobile:>" /><:ifRequired delivMobile:>*<:or:><:eif:>
+              <input type="text" name="mobile" value="<:old mobile siteuser mobile:>" /><:ifRequired mobile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser delivMobile:>  <:error_img delivMobile:></td>
+            <td class="help"><:help editsiteuser mobile:>  <:error_img mobile:></td>
           </tr>
           <tr> 
             <th>facsimile: </th>
             </td>
             <td class="help"><:help editsiteuser facsimile:>  <:error_img facsimile:></td>
           </tr>
-          <tr> 
-            <th>country: </th>
-            <td> 
-              <input type="text" name="country" value="<:old country siteuser country:>" size="60" /><:ifRequired country:>*<:or:><:eif:>
-            </td>
-            <td class="help"><:help editsiteuser country:>  <:error_img country:></td>
-          </tr>
           <tr> 
             <th>title: </th>
             <td> 
             </td>
             <td class="help"><:help editsiteuser organization:>  <:error_img organization:></td>
           </tr>
+         <tr>
+           <th colspan="2">Delivery</th>
+         </tr>
+          <tr> 
+            <th>First Name: </th>
+            <td> 
+              <input type="text" name="delivFirstName" value="<:old delivFirstName siteuser delivFirstName:>" size="60" /><:ifRequired delivFirstName:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser delivFirstName:>  <:error_img delivFirstName:></td>
+          </tr>
           <tr> 
-            <th>billFirstName: </th>
+            <th>Last Name: </th>
+            <td> 
+              <input type="text" name="delivLastName" value="<:old delivLastName siteuser delivLastName:>" size="60" /><:ifRequired delivLastName:>*<:or:><:eif:>
+            </td>
+            <td class="help"><:help editsiteuser delivLastName:>  <:error_img delivLastName:></td>
+          </tr>
+          <tr> 
+            <th>Organization: </th>
             <td> 
-              <input type="text" name="billFirstName" value="<:old billFirstName siteuser billFirstName:>" size="60" /><:ifRequired billFirstName:>*<:or:><:eif:>
+              <input type="text" name="delivOrganization" value="<:old delivOrganization siteuser delivOrganization:>" size="60" /><:ifRequired delivOrganization:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billFirstName:>  <:error_img billFirstName:></td>
+            <td class="help"><:help editsiteuser delivOrganization:>  <:error_img delivOrganization:></td>
           </tr>
           <tr> 
-            <th>billLastName: </th>
+            <th>Address: </th>
             <td> 
-              <input type="text" name="billLastName" value="<:old billLastName siteuser billLastName:>" size="60" /><:ifRequired billLastName:>*<:or:><:eif:>
+              <input type="text" name="delivStreet" value="<:old delivStreet siteuser delivStreet:>" size="60" /><:ifRequired delivStreet:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billLastName:>  <:error_img billLastName:></td>
+            <td class="help"><:help editsiteuser delivStreet:>  <:error_img delivStreet:></td>
           </tr>
           <tr> 
-            <th>billStreet: </th>
+            <th></th>
             <td> 
-              <input type="text" name="billStreet" value="<:old billStreet siteuser billStreet:>" size="60" /><:ifRequired billStreet:>*<:or:><:eif:>
+              <input type="text" name="delivStreet2" value="<:old delivStreet2 siteuser delivStreet2:>" size="60" /><:ifRequired delivStreet2:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billStreet:>  <:error_img billStreet:></td>
+            <td class="help"><:help editsiteuser delivStreet2:>  <:error_img delivStreet2:></td>
           </tr>
           <tr> 
-            <th>billSuburb: </th>
+            <th>Suburb: </th>
             <td> 
-              <input type="text" name="billSuburb" value="<:old billSuburb siteuser billSuburb:>" /><:ifRequired billSuburb:>*<:or:><:eif:>
+              <input type="text" name="delivSuburb" value="<:old delivSuburb siteuser delivSuburb:>" /><:ifRequired delivSuburb:>*<:or:><:eif:>
             </td>
-            <td><:help editsiteuser billSuburb:>  <:error_img billSuburb:></td>
+            <td><:help editsiteuser delivSuburb:>  <:error_img delivSuburb:></td>
           </tr>
           <tr> 
-            <th>billState: </th>
+            <th>State: </th>
             <td> 
-              <input type="text" name="billState" value="<:old billState siteuser billState:>" /><:ifRequired billState:>*<:or:><:eif:>
+              <input type="text" name="delivState" value="<:old delivState siteuser delivState:>" /><:ifRequired delivState:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billState:>  <:error_img billState:></td>
+            <td class="help"><:help editsiteuser delivState:>  <:error_img delivState:></td>
           </tr>
           <tr> 
-            <th>billPostCode: </th>
+            <th>PostCode: </th>
             <td> 
-              <input type="text" name="billPostCode" value="<:old billPostCode siteuser billPostCode:>" /><:ifRequired billPostCode:>*<:or:><:eif:>
+              <input type="text" name="delivPostCode" value="<:old delivPostCode siteuser delivPostCode:>" /><:ifRequired delivPostCode:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billPostCode:>  <:error_img billPostCode:></td>
+            <td class="help"><:help editsiteuser delivPostCode:>  <:error_img delivPostCode:></td>
           </tr>
           <tr> 
-            <th>billCountry: </th>
+            <th>Country: </th>
             <td> 
-              <input type="text" name="billCountry" value="<:old billCountry siteuser billCountry:>" /><:ifRequired billCountry:>*<:or:><:eif:>
+              <input type="text" name="delivCountry" value="<:old delivCountry siteuser delivCountry:>" /><:ifRequired delivCountry:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billCountry:>  <:error_img billCountry:></td>
+            <td class="help"><:help editsiteuser delivCountry:>  <:error_img delivCountry:></td>
           </tr>
           <tr> 
             <th>instructions: </th>
             <td class="help"><:help editsiteuser instructions:>  <:error_img instructions:></td>
           </tr>
           <tr> 
-            <th>billTelephone: </th>
+            <th>Telephone: </th>
             <td> 
-              <input type="text" name="billTelephone" value="<:old billTelephone siteuser billTelephone:>" /><:ifRequired billTelephone:>*<:or:><:eif:>
+              <input type="text" name="delivTelephone" value="<:old delivTelephone siteuser delivTelephone:>" /><:ifRequired delivTelephone:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billTelephone:>  <:error_img billTelephone:></td>
+            <td class="help"><:help editsiteuser delivTelephone:>  <:error_img delivTelephone:></td>
           </tr>
           <tr> 
-            <th>billMobile: </th>
+            <th>Mobile: </th>
             <td> 
-              <input type="text" name="billMobile" value="<:old billMobile siteuser billMobile:>" /><:ifRequired billMobile:>*<:or:><:eif:>
+              <input type="text" name="delivMobile" value="<:old delivMobile siteuser delivMobile:>" /><:ifRequired delivMobile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billMobile:>  <:error_img billMobile:></td>
+            <td class="help"><:help editsiteuser delivMobile:>  <:error_img delivMobile:></td>
           </tr>
           <tr> 
-            <th>billFacsimile: </th>
+            <th>Facsimile: </th>
             <td> 
-              <input type="text" name="billFacsimile" value="<:old billFacsimile siteuser billFacsimile:>" /><:ifRequired billFacsimile:>*<:or:><:eif:>
+              <input type="text" name="delivFacsimile" value="<:old delivFacsimile siteuser delivFacsimile:>" /><:ifRequired delivFacsimile:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billFacsimile:>  <:error_img billFacsimile:></td>
+            <td class="help"><:help editsiteuser delivFacsimile:>  <:error_img delivFacsimile:></td>
           </tr>
           <tr> 
-            <th>billEmail: </th>
+            <th>Email: </th>
             <td> 
-              <input type="text" name="billEmail" value="<:old billEmail siteuser billEmail:>" /><:ifRequired billEmail:>*<:or:><:eif:>
+              <input type="text" name="delivEmail" value="<:old delivEmail siteuser delivEmail:>" /><:ifRequired delivEmail:>*<:or:><:eif:>
             </td>
-            <td class="help"><:help editsiteuser billEmail:>  <:error_img billEmail:></td>
+            <td class="help"><:help editsiteuser delivEmail:>  <:error_img delivEmail:></td>
           </tr>
           <tr> 
             <th>Affiliate Name: </th>
index 3157c0a..4f9ac44 100644 (file)
             <td class="help"><:help editsiteuser name2:></td>
           </tr>
           <tr> 
-            <th>address: </th>
+            <th>Address: </th>
             <td> 
-              <:siteuser address:>
+              <:siteuser street:><br /><:siteuser street2:>
             </td>
             <td class="help"><:help editsiteuser address:></td>
           </tr>
           <tr> 
-            <th>city: </th>
+            <th>Suburb: </th>
             <td> 
-              <:siteuser city:>
+              <:siteuser suburb:>
             </td>
-            <td class="help"><:help editsiteuser city:></td>
+            <td class="help"><:help editsiteuser suburb:></td>
           </tr>
           <tr> 
             <th>state: </th>
             </td>
             <td class="help"><:help editsiteuser postcode:></td>
           </tr>
+          <tr> 
+            <th>country: </th>
+            <td> 
+              <:siteuser country:>
+            </td>
+            <td class="help"><:help editsiteuser country:></td>
+          </tr>
           <tr> 
             <th>telephone: </th>
             <td> 
             </td>
             <td class="help"><:help editsiteuser facsimile:></td>
           </tr>
-          <tr> 
-            <th>country: </th>
-            <td> 
-              <:siteuser country:>
-            </td>
-            <td class="help"><:help editsiteuser country:></td>
-          </tr>
           <tr> 
             <th>title: </th>
             <td> 
             </td>
             <td class="help"><:help editsiteuser organization:></td>
           </tr>
+         <tr>
+           <th colspan="2">Delivery</th>
+         </tr>
           <tr> 
-            <th>billFirstName: </th>
+            <th>First Name: </th>
             <td> 
-              <:siteuser billFirstName:>
+              <:siteuser delivFirstName:>
             </td>
-            <td class="help"><:help editsiteuser billFirstName:></td>
+            <td class="help"><:help editsiteuser delivFirstName:></td>
           </tr>
           <tr> 
-            <th>billLastName: </th>
+            <th>Last Name: </th>
             <td> 
-              <:siteuser billLastName:>
+              <:siteuser delivLastName:>
             </td>
-            <td class="help"><:help editsiteuser billLastName:></td>
+            <td class="help"><:help editsiteuser delivLastName:></td>
           </tr>
           <tr> 
-            <th>billStreet: </th>
+            <th>Street: </th>
             <td> 
-              <:siteuser billStreet:>
+              <:siteuser delivStreet:><br /><:siteuser delivStreet2:>
             </td>
-            <td class="help"><:help editsiteuser billStreet:></td>
+            <td class="help"><:help editsiteuser delivStreet:></td>
           </tr>
           <tr> 
-            <th>billSuburb: </th>
+            <th>Suburb: </th>
             <td> 
-              <:siteuser billSuburb:>
+              <:siteuser delivSuburb:>
             </td>
-            <td class="help"><:help editsiteuser billSuburb:></td>
+            <td class="help"><:help editsiteuser delivSuburb:></td>
           </tr>
           <tr> 
-            <th>billState: </th>
+            <th>State: </th>
             <td> 
-              <:siteuser billState:>
+              <:siteuser delivState:>
             </td>
-            <td class="help"><:help editsiteuser billState:></td>
+            <td class="help"><:help editsiteuser delivState:></td>
           </tr>
           <tr> 
-            <th>billPostCode: </th>
+            <th>PostCode: </th>
             <td> 
-              <:siteuser billPostCode:>
+              <:siteuser delivPostCode:>
             </td>
-            <td class="help"><:help editsiteuser billPostCode:></td>
+            <td class="help"><:help editsiteuser delivPostCode:></td>
           </tr>
           <tr> 
-            <th>billCountry: </th>
+            <th>Country: </th>
             <td> 
-              <:siteuser billCountry:>
+              <:siteuser delivCountry:>
             </td>
-            <td class="help"><:help editsiteuser billCountry:></td>
+            <td class="help"><:help editsiteuser delivCountry:></td>
           </tr>
           <tr> 
             <th>instructions: </th>
             <td class="help"><:help editsiteuser instructions:></td>
           </tr>
           <tr> 
-            <th>billTelephone: </th>
+            <th>Telephone: </th>
             <td> 
-              <:siteuser billTelephone:>
+              <:siteuser delivTelephone:>
             </td>
-            <td class="help"><:help editsiteuser billTelephone:></td>
+            <td class="help"><:help editsiteuser delivTelephone:></td>
           </tr>
           <tr> 
-            <th>billMobile: </th>
+            <th>Mobile: </th>
             <td> 
-              <:siteuser billMobile:>
+              <:siteuser delivMobile:>
             </td>
-            <td class="help"><:help editsiteuser billMobile:></td>
+            <td class="help"><:help editsiteuser delivMobile:></td>
           </tr>
           <tr> 
-            <th>billFacsimile: </th>
+            <th>Facsimile: </th>
             <td> 
-              <:siteuser billFacsimile:>
+              <:siteuser delivFacsimile:>
             </td>
-            <td class="help"><:help editsiteuser billFacsimile:></td>
+            <td class="help"><:help editsiteuser delivFacsimile:></td>
           </tr>
           <tr> 
-            <th>billEmail: </th>
+            <th>Email: </th>
             <td> 
-              <:siteuser billEmail:>
+              <:siteuser delivEmail:>
             </td>
-            <td class="help"><:help editsiteuser billEmail:></td>
+            <td class="help"><:help editsiteuser delivEmail:></td>
           </tr>
           <tr> 
             <th>Affiliate Name: </th>
index a4a1cf5..4dddcaa 100644 (file)
         </td>
       </tr>
 <:or Cfg:><:eif Cfg:>      
-      <!--//<tr> 
-        <th nowrap="nowrap" align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Keep 
-          Details:</font></b></th>
-        <td width="100%"><input type="hidden" name="saveKeepAddress" value="1" /><input type="checkbox" name="keepAddress" value="1"<:ifLast keepAddress:> checked<:or:><:eif:> /></td>
-      </tr> //-->
       <:if Subscriptions:> 
       <tr> 
         <td nowrap="nowrap" valign="top"> 
       <tr> 
         <th nowrap="nowrap" align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Street:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="address" value="<:last address:>" size="40" maxlength="127" /><:error_img address:>
+          <input type="text" name="street" value="<:last street:>" size="40" maxlength="127" /><:error_img street:>
         </td>
       </tr>
       <tr> 
         <th nowrap="nowrap" align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"></font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="delivStreet2" value="<:last delivStreet2:>" size="40" maxlength="127" /><:error_img delivStreet2:>
+          <input type="text" name="street2" value="<:last street2:>" size="40" maxlength="127" /><:error_img street2:>
         </td>
       </tr>
       <tr> 
         <th nowrap="nowrap" align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Suburb:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="city" value="<:last city:>" size="40" maxlength="127" /><:error_img city:>
+          <input type="text" name="suburb" value="<:last suburb:>" size="40" maxlength="127" /><:error_img suburb:>
         </td>
       </tr>
       <tr> 
       <tr> 
         <th nowrap="nowrap" align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Mobile:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="delivMobile" value="<:last delivMobile:>" size="32" maxlength="80" /><:error_img delivMobile:>
+          <input type="text" name="mobile" value="<:last mobile:>" size="32" maxlength="80" /><:error_img mobile:>
         </td>
       </tr>
       <tr> 
       <tr> 
         <td colspan="2" height="20"><br>
           <br>
-          Billing contact information:</td>
+          Delivery contact information:</td>
       </tr>
       <tr> 
         <th>First Name:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billFirstName" value="<:last billFirstName:>" size="40" maxlength="127" /><:error_img billFirstName:>
+          <input type="text" name="delivFirstName" value="<:last delivFirstName:>" size="40" maxlength="127" /><:error_img delivFirstName:>
         </td>
       </tr>
       <tr> 
         <th>Last Name:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billLastName" value="<:last billLastName:>" size="40" maxlength="127" /><:error_img billLastName:>
+          <input type="text" name="delivLastName" value="<:last delivLastName:>" size="40" maxlength="127" /><:error_img delivLastName:>
         </td>
       </tr>
       <tr> 
         <th>Street:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billStreet" value="<:last billStreet:>" size="40" maxlength="127" /><:error_img billStreet:>
+          <input type="text" name="delivStreet" value="<:last delivStreet:>" size="40" maxlength="127" /><:error_img delivStreet:>
+        </td>
+      <tr> 
+        <th></th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivStreet2" value="<:last delivStreet2:>" size="40" maxlength="127" /><:error_img delivStreet2:>
         </td>
       </tr>
       <tr> 
         <th>Suburb:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billSuburb" value="<:last billSuburb:>" size="40" maxlength="127" /><:error_img billSuburb:>
+          <input type="text" name="delivSuburb" value="<:last delivSuburb:>" size="40" maxlength="127" /><:error_img delivSuburb:>
         </td>
       </tr>
       <tr> 
         <th>State:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billState" value="<:last billState:>" size="40" maxlength="127" /><:error_img billState:>
+          <input type="text" name="delivState" value="<:last delivState:>" size="40" maxlength="127" /><:error_img delivState:>
         </td>
       </tr>
       <tr> 
         <th>Post Code:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billPostCode" value="<:last billPostCode:>" size="40" maxlength="127" /><:error_img billPostCode:>
+          <input type="text" name="delivPostCode" value="<:last delivPostCode:>" size="40" maxlength="127" /><:error_img delivPostCode:>
         </td>
       </tr>
       <tr> 
         <th>Country:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billCountry" value="<:last billCountry:>" size="40" maxlength="127" /><:error_img billCountry:>
+          <input type="text" name="delivCountry" value="<:last delivCountry:>" size="40" maxlength="127" /><:error_img delivCountry:>
         </td>
       </tr>
       <tr> 
         <th>Telephone:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billTelephone" value="<:last billTelephone:>" size="40" maxlength="127" /><:error_img billTelephone:>
+          <input type="text" name="delivTelephone" value="<:last delivTelephone:>" size="40" maxlength="127" /><:error_img delivTelephone:>
         </td>
       </tr>
       <tr> 
         <th>Mobile:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billMobile" value="<:last billMobile:>" size="40" maxlength="80" /><:error_img billMobile:>
+          <input type="text" name="delivMobile" value="<:last delivMobile:>" size="40" maxlength="80" /><:error_img delivMobile:>
         </td>
       </tr>
       <tr> 
         <th>Facsimile:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billFacsimile" value="<:last billFacsimile:>" size="40" maxlength="127" /><:error_img billFacsimile:>
+          <input type="text" name="delivFacsimile" value="<:last delivFacsimile:>" size="40" maxlength="127" /><:error_img delivFacsimile:>
         </td>
       </tr>
       <tr> 
         <th>Email:</th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billEmail" value="<:last billEmail:>" size="40" maxlength="127" /><:error_img billEmail:>
+          <input type="text" name="delivEmail" value="<:last delivEmail:>" size="40" maxlength="127" /><:error_img delivEmail:>
         </td>
       </tr>
 <:or Cfg:>
-      <!-- tr> 
+      <tr> 
         <td colspan="2" height="20" align="center"><br>
           <br>
-          <a href="<:script:>?show_opts=1&_t=billing">Manage Billing Contact Information</a></td>
-      </tr -->
+          <a href="<:script:>?show_opts=1&_t=delivery">Manage Delivery Contact Information</a></td>
+      </tr>
 <:eif Cfg:>
 <:if Cfg "site users" nopassword:><:or Cfg:>
       <tr> 
diff --git a/site/templates/user/options_billing_base.tmpl b/site/templates/user/options_billing_base.tmpl
deleted file mode 100644 (file)
index 5ed0101..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<:wrap base.tmpl:>
-<div align=center class="useroptions"> 
-<:if Cfg "site users" nopassword:><:or Cfg:>
-<:if Partial_logon:><:or Partial_logon:>
-  <table border="0" cellspacing="0" cellpadding="0">
-    <tr> 
-      <td> 
-        <form name="yourorders" method="post" action="<:script:>">
-          <input type="submit" name="Submit" value="View your account" class="user-buttons" />
-          <input type="hidden" name="userpage" value="1" />
-        </form>
-      </td>
-      <:ifCfg shop enabled:><td> 
-        <form name="ff" method="post" action="/cgi-bin/shop.pl">
-          <input type="submit" name="cart" value="View shopping cart" class="user-buttons" />
-        </form>
-      </td><:or:><:eif:>
-    </tr>
-  </table>
-  <br />
-<:eif Partial_logon:>
-<:eif Cfg:>
-  <table width="250">
-    <tr> 
-      <th colspan="2" height="20" class="thead"> 
-        <p>User Options - Billing</p>
-      </th>
-    </tr>
-<:if Partial_logon:><:or Partial_logon:>
-    <tr> 
-      <td colspan="2" align="center"> 
-        <p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hello <:ifUser name1:><:user name1:> <:user name2:><:or:><:user 
-          userId:><:eif:></font></b></p>
-        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#999999">Last logged in: <:date user previousLogon:><br>
-          Registered since: <:date user whenRegistered:></font><br>
-          <br>
-        </p>
-        </td>
-    </tr>
-<:eif Partial_logon:>
-    <:if Message:> 
-    <tr> 
-      <td colspan="2" align="center"> 
-        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Error: 
-          <:message:></b></font></p>
-      </td>
-    </tr>
-    <:or Message:><:eif Message:> 
-    </tr>
-      <tr> 
-        <td colspan="2" height="20" align="center"><br>
-          <br>
-          <a href="<:script:>?show_opts=1">Return to Main Options</a></td>
-      </tr>
-    <form action="/cgi-bin/user.pl" method="post">
-    <input type="hidden" name="_t" value="billing" />
-    <:if Cfg "site users" nopassword:>
-    <input type="hidden" name="u" value="<:user id:>" />
-    <input type="hidden" name="p" value="<:user password:>" />
-    <input type="hidden" name="r" value="<:script:>?show_opts=<:user password:>&amp;u=<:user id:>&_t=saved" />
-    <:or Cfg:><:eif Cfg:>
-<:if Cfg "site users" nopassword:><:or Cfg:>
-      <tr> 
-        <th>Logon Name:</th>
-        <td width="100%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><:user 
-          userId:></font></td>
-      </tr>
-<:eif Cfg:>
-      <tr> 
-        <th>First Name:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billFirstName" value="<:last billFirstName:>" size="40" maxlength="127" /><:error_img billFirstName:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Last Name:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billLastName" value="<:last billLastName:>" size="40" maxlength="127" /><:error_img billLastName:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Organization:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billOrganization" value="<:last billOrganization:>" size="40" maxlength="127" /><:error_img billOrganization:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Street:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billStreet" value="<:last billStreet:>" size="40" maxlength="127" /><:error_img billStreet:>
-        </td>
-      </tr>
-      <tr> 
-        <th></th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billStreet2" value="<:last billStreet2:>" size="40" maxlength="127" /><:error_img billStreet2:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Suburb:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billSuburb" value="<:last billSuburb:>" size="40" maxlength="127" /><:error_img billSuburb:>
-        </td>
-      </tr>
-      <tr> 
-        <th>State:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billState" value="<:last billState:>" size="40" maxlength="127" /><:error_img billState:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Post Code:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billPostCode" value="<:last billPostCode:>" size="40" maxlength="127" /><:error_img billPostCode:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Country:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billCountry" value="<:last billCountry:>" size="40" maxlength="127" /><:error_img billCountry:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Telephone:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billTelephone" value="<:last billTelephone:>" size="40" maxlength="127" /><:error_img billTelephone:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Mobile:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billMobile" value="<:last billMobile:>" size="40" maxlength="127" /><:error_img billMobile:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Facsimile:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billFacsimile" value="<:last billFacsimile:>" size="40" maxlength="127" /><:error_img billFacsimile:>
-        </td>
-      </tr>
-      <tr> 
-        <th>Email:</th>
-        <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="billEmail" value="<:last billEmail:>" size="40" maxlength="127" /><:error_img billEmail:>
-        </td>
-      </tr>
-      <tr> 
-        <td colspan="2" align="right"> 
-          <input type="submit" name="saveopts" value="Save Options" class="user-buttons" />
-        </td>
-      </tr>
-    </form>
-  </table>
-</div>
diff --git a/site/templates/user/options_delivery_base.tmpl b/site/templates/user/options_delivery_base.tmpl
new file mode 100644 (file)
index 0000000..51fedd8
--- /dev/null
@@ -0,0 +1,154 @@
+<:wrap base.tmpl:>
+<div align=center class="useroptions"> 
+<:if Cfg "site users" nopassword:><:or Cfg:>
+<:if Partial_logon:><:or Partial_logon:>
+  <table border="0" cellspacing="0" cellpadding="0">
+    <tr> 
+      <td> 
+        <form name="yourorders" method="post" action="<:script:>">
+          <input type="submit" name="Submit" value="View your account" class="user-buttons" />
+          <input type="hidden" name="userpage" value="1" />
+        </form>
+      </td>
+      <:ifCfg shop enabled:><td> 
+        <form name="ff" method="post" action="/cgi-bin/shop.pl">
+          <input type="submit" name="cart" value="View shopping cart" class="user-buttons" />
+        </form>
+      </td><:or:><:eif:>
+    </tr>
+  </table>
+  <br />
+<:eif Partial_logon:>
+<:eif Cfg:>
+  <table width="250">
+    <tr> 
+      <th colspan="2" height="20" class="thead"> 
+        <p>User Options - Delivery</p>
+      </th>
+    </tr>
+<:if Partial_logon:><:or Partial_logon:>
+    <tr> 
+      <td colspan="2" align="center"> 
+        <p><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Hello <:ifUser name1:><:user name1:> <:user name2:><:or:><:user 
+          userId:><:eif:></font></b></p>
+        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#999999">Last logged in: <:date user previousLogon:><br>
+          Registered since: <:date user whenRegistered:></font><br>
+          <br>
+        </p>
+        </td>
+    </tr>
+<:eif Partial_logon:>
+    <:if Message:> 
+    <tr> 
+      <td colspan="2" align="center"> 
+        <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Error: 
+          <:message:></b></font></p>
+      </td>
+    </tr>
+    <:or Message:><:eif Message:> 
+    </tr>
+      <tr> 
+        <td colspan="2" height="20" align="center"><br>
+          <br>
+          <a href="<:script:>?show_opts=1">Return to Main Options</a></td>
+      </tr>
+    <form action="/cgi-bin/user.pl" method="post">
+    <input type="hidden" name="_t" value="delivery" />
+    <:if Cfg "site users" nopassword:>
+    <input type="hidden" name="u" value="<:user id:>" />
+    <input type="hidden" name="p" value="<:user password:>" />
+    <input type="hidden" name="r" value="<:script:>?show_opts=<:user password:>&amp;u=<:user id:>&_t=saved" />
+    <:or Cfg:><:eif Cfg:>
+<:if Cfg "site users" nopassword:><:or Cfg:>
+      <tr> 
+        <th>Logon Name:</th>
+        <td width="100%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><:user 
+          userId:></font></td>
+      </tr>
+<:eif Cfg:>
+      <tr> 
+        <th>First Name:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivFirstName" value="<:last delivFirstName:>" size="40" maxlength="127" /><:error_img delivFirstName:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Last Name:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivLastName" value="<:last delivLastName:>" size="40" maxlength="127" /><:error_img delivLastName:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Organization:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivOrganization" value="<:last delivOrganization:>" size="40" maxlength="127" /><:error_img delivOrganization:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Street:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivStreet" value="<:last delivStreet:>" size="40" maxlength="127" /><:error_img delivStreet:>
+        </td>
+      </tr>
+      <tr> 
+        <th></th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivStreet2" value="<:last delivStreet2:>" size="40" maxlength="127" /><:error_img delivStreet2:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Suburb:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivSuburb" value="<:last delivSuburb:>" size="40" maxlength="127" /><:error_img delivSuburb:>
+        </td>
+      </tr>
+      <tr> 
+        <th>State:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivState" value="<:last delivState:>" size="40" maxlength="127" /><:error_img delivState:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Post Code:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivPostCode" value="<:last delivPostCode:>" size="40" maxlength="127" /><:error_img delivPostCode:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Country:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivCountry" value="<:last delivCountry:>" size="40" maxlength="127" /><:error_img delivCountry:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Telephone:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivTelephone" value="<:last delivTelephone:>" size="40" maxlength="127" /><:error_img delivTelephone:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Mobile:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivMobile" value="<:last delivMobile:>" size="40" maxlength="127" /><:error_img delivMobile:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Facsimile:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivFacsimile" value="<:last delivFacsimile:>" size="40" maxlength="127" /><:error_img delivFacsimile:>
+        </td>
+      </tr>
+      <tr> 
+        <th>Email:</th>
+        <td width="100%" nowrap="nowrap"> 
+          <input type="text" name="delivEmail" value="<:last delivEmail:>" size="40" maxlength="127" /><:error_img delivEmail:>
+        </td>
+      </tr>
+      <tr> 
+        <td colspan="2" align="right"> 
+          <input type="submit" name="saveopts" value="Save Options" class="user-buttons" />
+        </td>
+      </tr>
+    </form>
+  </table>
+</div>
index dcb21ff..2d551c3 100644 (file)
       <tr> 
         <th nowrap align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Street:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="address" value="<:old address:>" size="40" maxlength="127" /> <:error_img address:><:ifRequired address:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
+          <input type="text" name="street" value="<:old street:>" size="40" maxlength="127" /> <:error_img street:><:ifRequired street:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
         </td>
       </tr>
       <tr> 
         <th nowrap align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"></font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="delivStreet2" value="<:old delivStreet2:>" size="40" maxlength="127" /> <:error_img delivStreet2:><:ifRequired delivStreet2:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
+          <input type="text" name="street2" value="<:old street2:>" size="40" maxlength="127" /> <:error_img street2:><:ifRequired street2:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
         </td>
       </tr>
       <tr> 
         <th nowrap align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Suburb:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="city" value="<:old city:>" size="40" maxlength="127" /> <:error_img city:><:ifRequired city:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
+          <input type="text" name="suburb" value="<:old suburb:>" size="40" maxlength="127" /> <:error_img suburb:><:ifRequired suburb:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
         </td>
       </tr>
       <tr> 
       <tr> 
         <th nowrap align="left"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Mobile:</font></b></th>
         <td width="100%" nowrap="nowrap"> 
-          <input type="text" name="delivMobile" value="<:old delivMobile:>" size="32" maxlength="80" /> <:error_img delivMobile:><:ifRequired delivMobile:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
+          <input type="text" name="mobile" value="<:old mobile:>" size="32" maxlength="80" /> <:error_img mobile:><:ifRequired mobile:><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">*</font><:or:><:eif:>
         </td>
       </tr>
       <tr> 
index 6217a74..be0e7d6 100644 (file)
@@ -393,6 +393,69 @@ Column group_id;int(11);NO;NULL;
 Column siteuser_id;int(11);NO;NULL;
 Index PRIMARY;1;[group_id;siteuser_id]
 Index siteuser_id;0;[siteuser_id]
+Table bse_siteusers
+Engine MyISAM
+Column id;int(11);NO;NULL;auto_increment
+Column idUUID;varchar(40);NO;NULL;
+Column userId;varchar(40);NO;NULL;
+Column password;varchar(255);NO;NULL;
+Column password_type;varchar(20);NO;plain;
+Column email;varchar(255);NO;NULL;
+Column whenRegistered;datetime;NO;NULL;
+Column lastLogon;datetime;NO;NULL;
+Column title;varchar(127);YES;NULL;
+Column name1;varchar(127);YES;NULL;
+Column name2;varchar(127);YES;NULL;
+Column street;varchar(127);YES;NULL;
+Column street2;varchar(127);YES;NULL;
+Column suburb;varchar(127);YES;NULL;
+Column state;varchar(40);YES;NULL;
+Column postcode;varchar(40);YES;NULL;
+Column country;varchar(127);YES;NULL;
+Column telephone;varchar(80);YES;NULL;
+Column facsimile;varchar(80);YES;NULL;
+Column mobile;varchar(80);NO;;
+Column organization;varchar(127);YES;NULL;
+Column confirmed;int(11);NO;0;
+Column confirmSecret;varchar(40);NO;;
+Column waitingForConfirmation;int(11);NO;0;
+Column textOnlyMail;int(11);NO;NULL;
+Column previousLogon;datetime;NO;NULL;
+Column delivTitle;varchar(127);YES;NULL;
+Column delivEmail;varchar(255);NO;;
+Column delivFirstName;varchar(127);NO;;
+Column delivLastName;varchar(127);NO;;
+Column delivStreet;varchar(127);NO;;
+Column delivStreet2;varchar(127);NO;;
+Column delivSuburb;varchar(127);NO;;
+Column delivState;varchar(40);NO;;
+Column delivPostCode;varchar(40);NO;;
+Column delivCountry;varchar(127);NO;;
+Column delivTelephone;varchar(80);NO;;
+Column delivFacsimile;varchar(80);NO;;
+Column delivMobile;varchar(80);NO;;
+Column delivOrganization;varchar(127);YES;NULL;
+Column instructions;text;NO;NULL;
+Column adminNotes;text;NO;NULL;
+Column disabled;int(11);NO;0;
+Column flags;varchar(80);NO;;
+Column affiliate_name;varchar(40);NO;;
+Column lost_today;int(11);NO;0;
+Column lost_date;date;YES;NULL;
+Column lost_id;varchar(32);YES;NULL;
+Column customText1;text;YES;NULL;
+Column customText2;text;YES;NULL;
+Column customText3;text;YES;NULL;
+Column customStr1;varchar(255);YES;NULL;
+Column customStr2;varchar(255);YES;NULL;
+Column customStr3;varchar(255);YES;NULL;
+Column customInt1;int(11);YES;NULL;
+Column customInt2;int(11);YES;NULL;
+Column customWhen1;datetime;YES;NULL;
+Index PRIMARY;1;[id]
+Index affiliate_name;0;[affiliate_name]
+Index idUUID;1;[idUUID]
+Index userId;1;[userId]
 Table bse_subscriptions
 Engine MyISAM
 Column subscription_id;int(11);NO;NULL;auto_increment
@@ -614,73 +677,6 @@ Column id;char(32);NO;NULL;
 Column a_session;blob;YES;NULL;
 Column whenChanged;timestamp;NO;CURRENT_TIMESTAMP;on update CURRENT_TIMESTAMP
 Index PRIMARY;1;[id]
-Table site_users
-Engine MyISAM
-Column id;int(11);NO;NULL;auto_increment
-Column userId;varchar(40);NO;NULL;
-Column password;varchar(255);NO;NULL;
-Column email;varchar(255);NO;NULL;
-Column keepAddress;int(11);NO;1;
-Column whenRegistered;datetime;NO;NULL;
-Column lastLogon;datetime;NO;NULL;
-Column name1;varchar(127);YES;NULL;
-Column name2;varchar(127);YES;NULL;
-Column address;varchar(127);YES;NULL;
-Column city;varchar(127);YES;NULL;
-Column state;varchar(40);YES;NULL;
-Column postcode;varchar(40);YES;NULL;
-Column telephone;varchar(80);YES;NULL;
-Column facsimile;varchar(80);YES;NULL;
-Column country;varchar(127);YES;NULL;
-Column wantLetter;int(11);NO;0;
-Column confirmed;int(11);NO;0;
-Column confirmSecret;varchar(40);NO;;
-Column waitingForConfirmation;int(11);NO;0;
-Column textOnlyMail;int(11);NO;NULL;
-Column title;varchar(127);YES;NULL;
-Column organization;varchar(127);YES;NULL;
-Column referral;int(11);YES;NULL;
-Column otherReferral;varchar(127);NO;NULL;
-Column prompt;int(11);YES;NULL;
-Column otherPrompt;varchar(127);NO;NULL;
-Column profession;int(11);NO;NULL;
-Column otherProfession;varchar(127);NO;NULL;
-Column previousLogon;datetime;NO;NULL;
-Column billFirstName;varchar(127);NO;;
-Column billLastName;varchar(127);NO;;
-Column billStreet;varchar(127);NO;;
-Column billSuburb;varchar(127);NO;;
-Column billState;varchar(40);NO;;
-Column billPostCode;varchar(40);NO;;
-Column billCountry;varchar(127);NO;;
-Column instructions;text;NO;NULL;
-Column billTelephone;varchar(80);NO;;
-Column billFacsimile;varchar(80);NO;;
-Column billEmail;varchar(255);NO;;
-Column adminNotes;text;NO;NULL;
-Column disabled;int(11);NO;0;
-Column flags;varchar(80);NO;;
-Column customText1;text;YES;NULL;
-Column customText2;text;YES;NULL;
-Column customText3;text;YES;NULL;
-Column customStr1;varchar(255);YES;NULL;
-Column customStr2;varchar(255);YES;NULL;
-Column customStr3;varchar(255);YES;NULL;
-Column affiliate_name;varchar(40);NO;;
-Column delivMobile;varchar(80);NO;;
-Column billMobile;varchar(80);NO;;
-Column delivStreet2;varchar(127);NO;;
-Column billStreet2;varchar(127);NO;;
-Column billOrganization;varchar(127);NO;;
-Column customInt1;int(11);YES;NULL;
-Column customInt2;int(11);YES;NULL;
-Column password_type;varchar(20);NO;plain;
-Column lost_today;int(11);NO;0;
-Column lost_date;date;YES;NULL;
-Column lost_id;varchar(32);YES;NULL;
-Index PRIMARY;1;[id]
-Index affiliate_name;0;[affiliate_name]
-Index userId;1;[userId]
 Table sql_statements
 Engine MyISAM
 Column name;varchar(80);NO;NULL;
index 2e30624..866a4f6 100644 (file)
@@ -218,7 +218,7 @@ seminar.locations=1
 #report total_sales.bse_rights=blah|edit_foo,blah
 
 query groups.1=name starts with t
-query group name starts with t.sql=select id from site_users where id = ? and name1 like "t%"
+query group name starts with t.sql=select id from bse_siteusers where id = ? and name1 like "t%"
 
 shop.free_products=1