Nathali Posted November 15, 2007 Share Posted November 15, 2007 please post here for Activation code support Thanks to the Authors that did this contrib. hooher tod 1 Quote Best Regards, Nathali Link to comment Share on other sites More sharing options...
ident Posted November 19, 2007 Share Posted November 19, 2007 (edited) please post here for Activation code support Thanks to the Authors that did this contrib. Just installed this contribution but I'm getting the following message when i created a new account: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/###shopname###/public_html/includes/header.php:211) in /home/###shopname###/public_html/includes/boxes/categories.php on line 59 Edited November 19, 2007 by ident Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2007 Share Posted November 19, 2007 Just installed this contribution but I'm getting the following message when i created a new account: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/###shopname###/public_html/includes/header.php:211) in /home/###shopname###/public_html/includes/boxes/categories.php on line 59 I have not installed this contrib. Your error indicates that the tep_show_category() is declared in the two files. I assume the contrib aid to add it to one of the files. You could try deleting from one of the files or comment it out with a // at the start of the line. If that fails, post the two lines here. Quote Link to comment Share on other sites More sharing options...
ident Posted November 19, 2007 Share Posted November 19, 2007 I have not installed this contrib. Your error indicates that the tep_show_category() is declared in the two files. I assume the contrib aid to add it to one of the files. You could try deleting from one of the files or comment it out with a // at the start of the line. If that fails, post the two lines here. No, i didn't need to edit the two files for this contribution. Had to change some other files and upload some new files. But it must be a problem with the contribution 'cause when i remove this contrib everything works fine again :angry: Quote Link to comment Share on other sites More sharing options...
ident Posted November 19, 2007 Share Posted November 19, 2007 No, i didn't need to edit the two files for this contribution. Had to change some other files and upload some new files. But it must be a problem with the contribution 'cause when i remove this contrib everything works fine again :angry: UPDATE: replaced the original categories.php and header.php from oscommerce version MS2.2 060817 and still this error I'll guess i will have to drop this contribution :( Quote Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2007 Share Posted November 19, 2007 No, i didn't need to edit the two files for this contribution. Had to change some other files and upload some new files. But it must be a problem with the contribution 'cause when i remove this contrib everything works fine again :angry: Hmm. The header.php does not have that many lines, I see what you mean about the edits. In the file account_activate.php what happen if you delete <?php require(DIR_WS_INCLUDES . 'header.php'); ?> Quote Link to comment Share on other sites More sharing options...
ident Posted November 19, 2007 Share Posted November 19, 2007 Great, then it works but it messes up my complete layout. Everything is stretched and so on... but hey, it works ;-) After the confirmation code was entered and checked the layout is fine again. That can be fixed. Anyway... many thanks for your help and quick replies! Quote Link to comment Share on other sites More sharing options...
tangwaichee Posted December 12, 2007 Share Posted December 12, 2007 (edited) Hi... im having some problems with this contribution, hope you can help me to slove it... I'm install this contribution of Actviation codes, now the problem is 1. Run this query in Database: ALTER TABLE customers ADD customers_activation_code VARCHAR(32); ALTER TABLE customers ADD customers_active_status CHAR(1); INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Activation Code for Registration', 'ACTIVATION_CODE', 'on', 'Do you want to activate Activation Code for Registration?', 5, 0, now (), now(), '', 'tep_cfg_select_option(array(\'on\',\'off\'),'); what do you mean by that...for the configuration Please reply asap...urgent Edited December 12, 2007 by tangwaichee Quote Link to comment Share on other sites More sharing options...
tangwaichee Posted December 12, 2007 Share Posted December 12, 2007 This is the error that i'm getting on when im sign up 1054 - Unknown column 'customers_activation_code' in 'field list' insert into customers (customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax, customers_newsletter, customers_password, customers_activation_code, customers_active_status) values ('Alson', 'Tang', 'tangwaichee@yahoo.com.sg', '67669573', '', '', '7991cf18908797ec87608e4bc208c109:91', 'fqsmjgh3wr45', '0') [TEP STOP] Quote Link to comment Share on other sites More sharing options...
erbanfootwearInc Posted December 20, 2007 Share Posted December 20, 2007 Just installed this contribution but I'm getting the following message when i created a new account: Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/###shopname###/public_html/includes/header.php:211) in /home/###shopname###/public_html/includes/boxes/categories.php on line 59 Hello, I have a similar problem. Mine told me this: Fatal error: Cannot redeclare tep_show_category() (previously declared in C:\Inetpub\wwwroot\erbanfootwear.com\includes\header.php:173) in C:\Inetpub\wwwroot\erbanfootwear.com\includes\boxes\categories.php on line 13 when I went to comment line 13 out in the includes/boxes/categories.php it then produced this very out of line page: But thanks alot Coopo this has gotten me a little further than I was. Now I really need some more help please. Furthermore, I have went to includes/header.php and commented and then deleted <?php require(DIR_WS_INCLUDES . 'header.php'); ?> as instructed. Thanks alot Coopo! This is what the page produced after I took it out.......very different: My question is simply how can I make this contribution make more like the first snapshot without the layout messing up and no errors? Thanks to coopo's and ident recent discussion for keeping up to date. Cheers, Tim Quote Link to comment Share on other sites More sharing options...
erbanfootwearInc Posted December 20, 2007 Share Posted December 20, 2007 Oh and of course knowing how my website looked would definitely help Im sure. Here it is: Erbanfootwear Quote Link to comment Share on other sites More sharing options...
erbanfootwearInc Posted December 21, 2007 Share Posted December 21, 2007 Hello Hello? Any help would be great. Thanks, Tim Quote Link to comment Share on other sites More sharing options...
erbanfootwearInc Posted December 21, 2007 Share Posted December 21, 2007 Hello Hello? Any help would be great. Thanks, Tim Help help please :) I need to have a merry Christmas here...someone could be a santa clause an actual real santa clause :) Oh and dont forget to leave the joy :D Thanks, Tim Quote Link to comment Share on other sites More sharing options...
Zahoor Posted September 20, 2008 Share Posted September 20, 2008 I have installed this contribution and it works fine. But there is one thing which needs to be looked into. When a customer recieves the e-mail, he/she can click the link and come to activation page. So far so good. But it is possible to click the same link many timea and every time you can "activate" your account as if it was first time. What we need is a kind of setup which checks for if the account has been activated allready, and if so then turn customer to login page, instead of activation page. As I am a newbee to php, hope someone can look into it. You can see this code in action at my website. Note: Website is in norwegian only. Quote Link to comment Share on other sites More sharing options...
littlecasper Posted December 5, 2008 Share Posted December 5, 2008 yeah, i agree with zahoor anyone should look into it.... and also is it possible the activation code also can send to the owner email? Quote Link to comment Share on other sites More sharing options...
bito Posted May 14, 2009 Share Posted May 14, 2009 Hi. I installed this contribution and (almost) everything works fine except the link of the page where customer has to introduce activation code isn't in the email. In the email customer only receives de Activation Code. Quote Link to comment Share on other sites More sharing options...
bito Posted May 14, 2009 Share Posted May 14, 2009 Hi.I installed this contribution and (almost) everything works fine except the link of the page where customer has to introduce activation code isn't in the email. In the email customer only receives de Activation Code. Sorry guys my mistake everything works fine thenks Quote Link to comment Share on other sites More sharing options...
piltri Posted December 6, 2009 Share Posted December 6, 2009 Hello. I have a problema with this contribution. When a new costumer with shopping cart tries to register, the process is correct but account_activate_success.php reloadd the shopping cart reload wihtout tax. What can i do. --------------------------------------------------------------------------------------------- Pido disculpas por mi pesimo ingles, pero si alguien de habla español me lee ... MI problema es que al finalizar la validacion de un nuevo cliente que ya tiene articulos en su cesta de la compra, esta se recarga sin impuestos (iva). La tienda muestra todos los articulos con Iva y el calculo final lo hace correcto, pero al finalizar la validación account_activate_success.php recarga la cesta sin Iva. Un saludo. Quote Link to comment Share on other sites More sharing options...
sublok Posted December 24, 2009 Share Posted December 24, 2009 I love this - however one issue. Some of my customers are saying that they dont get the email. Is there a way to automaticly resend the email to another address or can it be approved via admin? Thanks Quote Link to comment Share on other sites More sharing options...
Tini Posted May 14, 2010 Share Posted May 14, 2010 Hi....(and sorry for my English). I installed the Activation Code v1.0 contribution. Works fine except the email link to activation. The link brings me back to the page for the introduction of the code but does not activate the account, must be the user who enter the code manually. I followed the instructions literally, even I have repeated, but the problem persists. Does anyone know what might be the error or bug? Note: the Ultimate SEO Urls v2.0 contribution is installed, if itself can affect. Quote Killo tu ere de Dos Hermanas... ;-)) Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2010 Share Posted May 20, 2010 (edited) Hello. I have a problema with this contribution. When a new costumer with shopping cart tries to register, the process is correct but account_activate_success.php reloadd the shopping cart reload wihtout tax. What can i do. --------------------------------------------------------------------------------------------- Pido disculpas por mi pesimo ingles, pero si alguien de habla español me lee ... MI problema es que al finalizar la validacion de un nuevo cliente que ya tiene articulos en su cesta de la compra, esta se recarga sin impuestos (iva). La tienda muestra todos los articulos con Iva y el calculo final lo hace correcto, pero al finalizar la validación account_activate_success.php recarga la cesta sin Iva. Un saludo. Hey, I have the same problem. It only occures after registration and only in shopping-cart. The checkout-page shows the correct prices again, but the shopping_cart_box on the left does not! After the first re-login, everything works perfect again. Quite fancy!? Would be nice, if somebody has an idea!? Thanks in advance! Michael Edited May 20, 2010 by e-peoples pharrypag 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2010 Share Posted October 11, 2010 Help Please I added Sam's (AKA spook) Anti-hacker Account Mods yesterday and everything worked fine but Activation Code Mod is not sending Activation Code out within the first welcome email. Activation Code v1.6 Before Adding sam's mod, my welcome email looks like this: Dear Mr. xxx, We welcome you to mydomain.com. You can now take part in the various services we have to offer you. Some of these services include: # Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out. # Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves. # Order History - View your history of purchases that you have made with us. # Products Reviews - Share your opinions on products with our other customers. Your activation code is: 9g4z82scvkw5 Please click the following link to activate your account http://www.mydomain....de=9g4z82scvkw5 For help with any of our online services, please email the store-owner: webmaster@mydomain.com. Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to webmaster@mydomain.com. Email reverted back to original format after adding your mod: Dear Ms. YYY, We welcome you to www.mydomain.com. You can now take part in the various services we have to offer you. Some of these services include: # Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out. # Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves. # Order History - View your history of purchases that you have made with us. # Products Reviews - Share your opinions on products with our other customers. For help with any of our online services, please email the store-owner: webmaster@mydomain.com. Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to webmaster@mydomain.com. I checked Activation Code install, used file compare tool to compare everything file that Activation Code modified but no difference at all. I checked my database, the activation code has been created, customer status as inactivated. The problem as you see above emails, the activation link and the code is not included in the email anymore :( Could anyone please let me know whats wrong??? Im still new, please help. Thanks Quote Link to comment Share on other sites More sharing options...
Tom172 Posted May 18, 2011 Share Posted May 18, 2011 Hi. I installed contribution Account Activation Code today and almost everything looks and works quite good. There´s just one problem: In customers it shows "unactivated" next to each customer -no matter- if the customer has used the activation code or not. It shows "unactivated" also where it should say "activated". And Admin does not have the option to activate accounts. This does not have any influence on the accounts themselves. Activatet accounts can be used. Inactivated accounts can not be accessed. The only thing is: The Admin does not see which account is activated and which is not. And admin can not activate accounts. I´d appreciate any idea. the following is my catalog/admin/customers.php <?php /* $Id: customers.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); $error = false; $processed = false; if (tep_not_null($action)) { switch ($action) { case 'update': $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); $customers_firstname = tep_db_prepare_input($HTTP_POST_VARS['customers_firstname']); $customers_lastname = tep_db_prepare_input($HTTP_POST_VARS['customers_lastname']); $customers_email_address = tep_db_prepare_input($HTTP_POST_VARS['customers_email_address']); $customers_telephone = tep_db_prepare_input($HTTP_POST_VARS['customers_telephone']); $customers_fax = tep_db_prepare_input($HTTP_POST_VARS['customers_fax']); $customers_newsletter = tep_db_prepare_input($HTTP_POST_VARS['customers_newsletter']); $customers_gender = tep_db_prepare_input($HTTP_POST_VARS['customers_gender']); $customers_dob = tep_db_prepare_input($HTTP_POST_VARS['customers_dob']); $default_address_id = tep_db_prepare_input($HTTP_POST_VARS['default_address_id']); $entry_street_address = tep_db_prepare_input($HTTP_POST_VARS['entry_street_address']); $entry_suburb = tep_db_prepare_input($HTTP_POST_VARS['entry_suburb']); $entry_postcode = tep_db_prepare_input($HTTP_POST_VARS['entry_postcode']); $entry_city = tep_db_prepare_input($HTTP_POST_VARS['entry_city']); $entry_country_id = tep_db_prepare_input($HTTP_POST_VARS['entry_country_id']); $entry_company = tep_db_prepare_input($HTTP_POST_VARS['entry_company']); $entry_state = tep_db_prepare_input($HTTP_POST_VARS['entry_state']); // BOF Account Activation Code $customers_active_status= tep_db_prepare_input($HTTP_POST_VARS['customers_active_status']); // EOF Account Activation Code if (isset($HTTP_POST_VARS['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($HTTP_POST_VARS['entry_zone_id']); if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) { $error = true; $entry_firstname_error = true; } else { $entry_firstname_error = false; } if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) { $error = true; $entry_lastname_error = true; } else { $entry_lastname_error = false; } if (ACCOUNT_DOB == 'true') { if (checkdate(substr(tep_date_raw($customers_dob), 4, 2), substr(tep_date_raw($customers_dob), 6, 2), substr(tep_date_raw($customers_dob), 0, 4))) { $entry_date_of_birth_error = false; } else { $error = true; $entry_date_of_birth_error = true; } } if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) { $error = true; $entry_email_address_error = true; } else { $entry_email_address_error = false; } if (!tep_validate_email($customers_email_address)) { $error = true; $entry_email_address_check_error = true; } else { $entry_email_address_check_error = false; } // BOF custom account fields by BogartComputing if (ACCOUNT_STREET_ADDRESS == 'true') { // EOF custom account fields by BogartComputing if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) { $error = true; $entry_street_address_error = true; } else { $entry_street_address_error = false; } // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing // BOF custom account fields by BogartComputing if (ACCOUNT_POSTCODE == 'true') { // EOF custom account fields by BogartComputing if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) { $error = true; $entry_post_code_error = true; } else { $entry_post_code_error = false; } // BOF custom account fields by BogartComputing } if (ACCOUNT_CITY == 'true') { // EOF custom account fields by BogartComputing if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) { $error = true; $entry_city_error = true; } else { $entry_city_error = false; } // BOF custom account fields by BogartComputing } if (ACCOUNT_COUNTRY == 'true') { // EOF custom account fields by BogartComputing if ($entry_country_id == false) { $error = true; $entry_country_error = true; } else { $entry_country_error = false; } // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing if (ACCOUNT_STATE == 'true') { if ($entry_country_error == true) { $entry_state_error = true; } else { $zone_id = 0; $entry_state_error = false; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'"); $check_value = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check_value['total'] > 0); if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'"); if (tep_db_num_rows($zone_query) == 1) { $zone_values = tep_db_fetch_array($zone_query); $entry_zone_id = $zone_values['zone_id']; } else { $error = true; $entry_state_error = true; } } else { if (strlen($entry_state) < ENTRY_STATE_MIN_LENGTH) { $error = true; $entry_state_error = true; } } } } // BOF custom account fields by BogartComputing if (ACCOUNT_TELE == 'true') { // EOF custom account fields by BogartComputing if (strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $entry_telephone_error = true; } else { $entry_telephone_error = false; } // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing $check_email = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "' and customers_id != '" . (int)$customers_id . "'"); if (tep_db_num_rows($check_email)) { $error = true; $entry_email_address_exists = true; } else { $entry_email_address_exists = false; } // BOF Customers extra fields $customer_extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_CUSTOMER_EXTRA_FIELDS . " ce, " . TABLE_CUSTOMER_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($customer_extra_fields = tep_db_fetch_array($customer_extra_fields_query)){ if(strlen($HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id']])<$customer_extra_fields['fields_size']){ $error = true; $string_error=sprintf(ENTRY_CUSTOMER_EXTRA_FIELDS_ERROR,$customer_extra_fields['fields_name'],$customer_extra_fields['fields_size']); $messageStack->add($string_error); } } // EOF Customers extra fields if ($error == false) { $sql_data_array = array('customers_firstname' => $customers_firstname, 'customers_lastname' => $customers_lastname, 'customers_email_address' => $customers_email_address, 'customers_telephone' => $customers_telephone, 'customers_fax' => $customers_fax, 'customers_newsletter' => $customers_newsletter, // BOF Account Activation Code 'customers_active_status' => $customers_active_status); // EOF Account Activation Code if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $customers_gender; if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($customers_dob); tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "'"); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int)$customers_id . "'"); if ($entry_zone_id > 0) $entry_state = ''; $sql_data_array = array('entry_firstname' => $customers_firstname, 'entry_lastname' => $customers_lastname, 'entry_street_address' => $entry_street_address, 'entry_postcode' => $entry_postcode, 'entry_city' => $entry_city, 'entry_country_id' => $entry_country_id); if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $entry_company; if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $entry_suburb; if (ACCOUNT_STATE == 'true') { if ($entry_zone_id > 0) { $sql_data_array['entry_zone_id'] = $entry_zone_id; $sql_data_array['entry_state'] = ''; } else { $sql_data_array['entry_zone_id'] = '0'; $sql_data_array['entry_state'] = $entry_state; } } tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$default_address_id . "'"); // BOF Customers extra fields tep_db_query("delete from " . TABLE_CUSTOMERS_TO_CUSTOMER_EXTRA_FIELDS . " where customers_id=" . (int)$customers_id); $customer_extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_CUSTOMER_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($customer_extra_fields = tep_db_fetch_array($customer_extra_fields_query)) { if(isset($HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id']])){ $sql_data_array = array('customers_id' => (int)$customers_id, 'fields_id' => $customer_extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id']]); } else { $sql_data_array = array('customers_id' => (int)$customers_id, 'fields_id' => $customer_extra_fields['fields_id'], 'value' => ''); $is_add = false; for($i = 1; $i <= $HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id'] . '_total']; $i++) { if(isset($HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id'] . '_' . $i])) { if($is_add) { $sql_data_array['value'] .= "\n"; } else { $is_add = true; } $sql_data_array['value'] .= $HTTP_POST_VARS['fields_' . $customer_extra_fields['fields_id'] . '_' . $i]; } } } tep_db_perform(TABLE_CUSTOMERS_TO_CUSTOMER_EXTRA_FIELDS, $sql_data_array); } // EOF Customers extra fields tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $customers_id)); } else if ($error == true) { $cInfo = new objectInfo($HTTP_POST_VARS); $processed = true; } break; case 'deleteconfirm': $customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']); if (isset($HTTP_POST_VARS['delete_reviews']) && ($HTTP_POST_VARS['delete_reviews'] == 'on')) { $reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'"); while ($reviews = tep_db_fetch_array($reviews_query)) { tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'"); } tep_db_query("delete from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'"); } else { tep_db_query("update " . TABLE_REVIEWS . " set customers_id = null where customers_id = '" . (int)$customers_id . "'"); } tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customers_id . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$customers_id . "'"); tep_redirect(tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')))); break; default: $customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_active_status, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <?php if ($action == 'edit' || $action == 'update') { ?> <script language="javascript"><!-- function check_form() { var error = 0; var error_message = "<?php echo JS_ERROR; ?>"; var customers_firstname = document.customers.customers_firstname.value; var customers_lastname = document.customers.customers_lastname.value; <?php if (ACCOUNT_COMPANY == 'true') echo 'var entry_company = document.customers.entry_company.value;' . "\n"; ?> <?php if (ACCOUNT_DOB == 'true') echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?> var customers_email_address = document.customers.customers_email_address.value; <?php // BOF custom account fields by BogartComputing if (ACCOUNT_STREET_ADDRESS == 'true') { echo 'var entry_street_address = document.customers.entry_street_address.value;' . "\n"; } ?> <?php if (ACCOUNT_POSTCODE == 'true') { echo 'var entry_postcode = document.customers.entry_postcode.value;' . "\n"; } ?> <?php if (ACCOUNT_CITY == 'true') { echo 'var entry_city = document.customers.entry_city.value;' . "\n"; } ?> <?php if (ACCOUNT_TELE == 'true') { echo 'var customers_telephone = document.customers.customers_telephone.value;' . "\n"; } // EOF custom account fields by BogartComputing ?> <?php if (ACCOUNT_GENDER == 'true') { ?> if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) { } else { error_message = error_message + "<?php echo JS_GENDER; ?>"; error = 1; } <?php } ?> if (customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_FIRST_NAME; ?>"; error = 1; } if (customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_LAST_NAME; ?>"; error = 1; } <?php if (ACCOUNT_DOB == 'true') { ?> if (customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_DOB; ?>"; error = 1; } <?php } ?> if (customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_EMAIL_ADDRESS; ?>"; error = 1; } <?php // BOF custom account fields by BogartComputing if (ACCOUNT_STREET_ADDRESS == 'true') { ?> // EOF custom account fields by BogartComputing if (entry_street_address.length < <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_ADDRESS; ?>"; error = 1; } <?php // BOF custom account fields by BogartComputing } if (ACCOUNT_POSTCODE == 'true') { ?> // EOF custom account fields by BogartComputing if (entry_postcode.length < <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_POST_CODE; ?>"; error = 1; } <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing // BOF custom account fields by BogartComputing if (ACCOUNT_CITY == 'true') { // EOF custom account fields by BogartComputing ?> if (entry_city.length < <?php echo ENTRY_CITY_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_CITY; ?>"; error = 1; } <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing if (ACCOUNT_STATE == 'true') { ?> if (document.customers.elements['entry_state'].type != "hidden") { if (document.customers.entry_state.value.length < <?php echo ENTRY_STATE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_STATE; ?>"; error = 1; } } <?php } // BOF custom account fields by BogartComputing if (ACCOUNT_COUNTRY == 'true') { // EOF custom account fields by BogartComputing ?> if (document.customers.elements['entry_country_id'].type != "hidden") { if (document.customers.entry_country_id.value == 0) { error_message = error_message + "<?php echo JS_COUNTRY; ?>"; error = 1; } } <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing // BOF custom account fields by BogartComputing if (ACCOUNT_TELE == 'true') { // EOF custom account fields by BogartComputing ?> if (customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) { error_message = error_message + "<?php echo JS_TELEPHONE; ?>"; error = 1; } <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing ?> if (error == 1) { alert(error_message); return false; } else { return true; } } //--></script> <?php } ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($action == 'edit' || $action == 'update') { $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr><?php echo tep_draw_form('customers', FILENAME_CUSTOMERS, tep_get_all_get_params(array('action')) . 'action=update', 'post', 'onSubmit="return check_form();"') . tep_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id); ?> <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php if (ACCOUNT_GENDER == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_GENDER; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_gender_error == true) { echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . ' ' . MALE . ' ' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . ' ' . FEMALE . ' ' . ENTRY_GENDER_ERROR; } else { echo ($cInfo->customers_gender == 'm') ? MALE : FEMALE; echo tep_draw_hidden_field('customers_gender'); } } else { echo tep_draw_radio_field('customers_gender', 'm', false, $cInfo->customers_gender) . ' ' . MALE . ' ' . tep_draw_radio_field('customers_gender', 'f', false, $cInfo->customers_gender) . ' ' . FEMALE; } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_firstname_error == true) { echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"') . ' ' . ENTRY_FIRST_NAME_ERROR; } else { echo $cInfo->customers_firstname . tep_draw_hidden_field('customers_firstname'); } } else { echo tep_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true); } ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_LAST_NAME; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_lastname_error == true) { echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"') . ' ' . ENTRY_LAST_NAME_ERROR; } else { echo $cInfo->customers_lastname . tep_draw_hidden_field('customers_lastname'); } } else { echo tep_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true); } ?></td> </tr> <?php if (ACCOUNT_DOB == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_date_of_birth_error == true) { echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR; } else { echo $cInfo->customers_dob . tep_draw_hidden_field('customers_dob'); } } else { echo tep_draw_input_field('customers_dob', tep_date_short($cInfo->customers_dob), 'maxlength="10"', true); } ?></td> </tr> <?php } ?> <tr> <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_email_address_error == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR; } elseif ($entry_email_address_check_error == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR; } elseif ($entry_email_address_exists == true) { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS; } else { echo $customers_email_address . tep_draw_hidden_field('customers_email_address'); } } else { echo tep_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'maxlength="96"', true); } ?></td> </tr> </table></td> </tr> <?php if (ACCOUNT_COMPANY == 'true') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_COMPANY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_company_error == true) { echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"') . ' ' . ENTRY_COMPANY_ERROR; } else { echo $cInfo->entry_company . tep_draw_hidden_field('entry_company'); } } else { echo tep_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="32"'); } ?></td> </tr> </table></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php // BOF custom account fields by BogartComputing if (ACCOUNT_STREET_ADDRESS == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_street_address_error == true) { echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"') . ' ' . ENTRY_STREET_ADDRESS_ERROR; } else { echo $cInfo->entry_street_address . tep_draw_hidden_field('entry_street_address'); } } else { echo tep_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true); } ?></td> </tr> <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing if (ACCOUNT_SUBURB == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_SUBURB; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_suburb_error == true) { echo tep_draw_input_field('suburb', $cInfo->entry_suburb, 'maxlength="32"') . ' ' . ENTRY_SUBURB_ERROR; } else { echo $cInfo->entry_suburb . tep_draw_hidden_field('entry_suburb'); } } else { echo tep_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"'); } ?></td> </tr> <?php } // BOF custom account fields by BogartComputing if (ACCOUNT_POSTCODE == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="main"><?php echo ENTRY_POST_CODE; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_post_code_error == true) { echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . ' ' . ENTRY_POST_CODE_ERROR; } else { echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode'); } } else { echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true); } ?></td> </tr> <?php // BOF custom account fields by BogartComputing } if (ACCOUNT_CITY == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="main"><?php echo ENTRY_CITY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_city_error == true) { echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"') . ' ' . ENTRY_CITY_ERROR; } else { echo $cInfo->entry_city . tep_draw_hidden_field('entry_city'); } } else { echo tep_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true); } ?></td> </tr> <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing if (ACCOUNT_STATE == 'true') { ?> <tr> <td class="main"><?php echo ENTRY_STATE; ?></td> <td class="main"> <?php $entry_state = tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state); if ($error == true) { if ($entry_state_error == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($cInfo->entry_country_id) . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('entry_state', $zones_array) . ' ' . ENTRY_STATE_ERROR; } else { echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)) . ' ' . ENTRY_STATE_ERROR; } } else { echo $entry_state . tep_draw_hidden_field('entry_zone_id') . tep_draw_hidden_field('entry_state'); } } else { echo tep_draw_input_field('entry_state', tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)); } ?></td> </tr> <?php } // BOF custom account fields by BogartComputing if (ACCOUNT_COUNTRY == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="main"><?php echo ENTRY_COUNTRY; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_country_error == true) { echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . ' ' . ENTRY_COUNTRY_ERROR; } else { echo tep_get_country_name($cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id'); } } else { echo tep_draw_pull_down_menu('entry_country_id', tep_get_countries(), $cInfo->entry_country_id); } ?></td> </tr> <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing ?> </table></td> </tr> <?php // BOF custom account fields by BogartComputing if (ACCOUNT_TELE) { // EOF custom account fields by BogartComputing ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo CATEGORY_CONTACT; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> <td class="main"> <?php if ($error == true) { if ($entry_telephone_error == true) { echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR; } else { echo $cInfo->customers_telephone . tep_draw_hidden_field('customers_telephone'); } } else { echo tep_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', true); } ?></td> </tr> <?php // BOF custom account fields by BogartComputing } if (ACCOUNT_FAX == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td> <td class="main"> <?php if ($processed == true) { echo $cInfo->customers_fax . tep_draw_hidden_field('customers_fax'); } else { echo tep_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"'); } ?></td> <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing ?> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <!-- // BOF Customers extra fields --> <?php echo tep_get_customer_extra_fields($cInfo->customers_id,$languages_id)?> <!-- // EOF Customers extra fields --> <tr> <td class="formAreaTitle"><?php echo CATEGORY_OPTIONS; ?></td> </tr> <?php // BOF custom account fields by BogartComputing if (ACCOUNT_NEWS == 'true') { // EOF custom account fields by BogartComputing ?> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"> <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('customers_newsletter'); } else { echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0')); } ?></td> </tr> <?php if ($action == 'edit' || $action == 'update') { $active_status_array = array(array('id' => '1', 'text' => ENTRY_EMAILVALIDATE_YES), array('id' => '0', 'text' => ENTRY_EMAILVALIDATE_NO)); } ?> <tr> <td class="main"><?php echo ENTRY_CUSTOMERS_EMAIL_VALIDATED;?> </td> <td class="main"> <? if(ACTIVATION_CODE=='on'){ echo tep_draw_pull_down_menu('customers_active_status',$active_status_array, (($cInfo->customers_active_status == '1') ? '1' : '0')); }else{ echo TEXT_EMAIL_VALIDATE_FEATURE. tep_draw_hidden_field('customers_active_status',$cInfo->customers_active_status); } ?> </td> </tr> <?php // BOF custom account fields by BogartComputing } // EOF custom account fields by BogartComputing ?> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr></form> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('search', FILENAME_CUSTOMERS, '', 'get'); ?> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td> <?php echo tep_hide_session_id(); ?></form></tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_LASTNAME; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIRSTNAME; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACCOUNT_CREATED; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $search = ''; if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) { $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search'])); $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'"; } $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_active_status, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname"; $customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows); $customers_query = tep_db_query($customers_query_raw); while ($customers = tep_db_fetch_array($customers_query)) { $info_query = tep_db_query("select customers_info_date_account_created as date_account_created, customers_info_date_account_last_modified as date_account_last_modified, customers_info_date_of_last_logon as date_last_logon, customers_info_number_of_logons as number_of_logons from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customers['customers_id'] . "'"); $info = tep_db_fetch_array($info_query); if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $customers['customers_id']))) && !isset($cInfo)) { $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$customers['entry_country_id'] . "'"); $country = tep_db_fetch_array($country_query); $reviews_query = tep_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers['customers_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); // BOF custom account fields by BogartComputing $customer_info = array_merge(array($country), array($info), array($reviews)); // EOF custom account fields by BogartComputing // auskommentiert für obiges $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); $cInfo = new objectInfo($cInfo_array); } if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $customers['customers_lastname']; ?></td> <td class="dataTableContent"><?php echo $customers['customers_firstname']; // display activation state if ( $customers['customers_active_status'] != '1' { echo ' (' . ENTRY_EMAILVALIDATE_NO . ')'; } ?> </td> <td class="dataTableContent" align="right"><?php echo tep_date_short($info['date_account_created']); ?></td> <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($customers['customers_id'] == $cInfo->customers_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td> <td class="smallText" align="right"><?php echo $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td> </tr> <?php if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) { ?> <tr> <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS) . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'confirm': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>'); $contents = array('form' => tep_draw_form('customers', FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); if (isset($cInfo->number_of_reviews) && ($cInfo->number_of_reviews) > 0) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . tep_image_button('button_orders.gif', IMAGE_ORDERS) . '</a> <a href="' . tep_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . tep_image_button('button_email.gif', IMAGE_EMAIL) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . tep_date_short($cInfo->date_account_created)); $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->date_account_last_modified)); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_LAST_LOGON . ' ' . tep_date_short($cInfo->date_last_logon)); $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons); $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name); $contents[] = array('text' => '<br>' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> <?php } ?> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
apolyshow Posted May 25, 2011 Share Posted May 25, 2011 Hello everybody Is this for 2.3.1 ? And if no is there something equal for 2.3.1 ? Quote One amateur made the Arc, 5.000 pro made the Titanic... Link to comment Share on other sites More sharing options...
blakey989 Posted June 2, 2011 Share Posted June 2, 2011 hi all, it seems i have the same problem as someone mentioned earlier in this thread. i can create an account and recieve the email with link inside to activate account, my problem is that i can only activate the account by A. manually cutting the activation code from the link and inputting. B. admin has to manually activate account. This for me is a big no no.... mainly because most users will not know where in the link the code is located! and that i do not have the time to constantly watch the site to see if someone registers to activate it for them, i was made aware of this by a potential customer. my site is now live and has been for a short time, i have of course done exstensive testing before hand and found no problems in this process, i have now confirmed that this is indeed the case ^^. the only conflict between testing and now is that i have activated our SSL. The Link: https://plrpeople.c6.ixwebhosting.com/account_activate.php?activation_id=f5f0e92e8740a158296e5476d1dcba23&submit=true&activation_code=3gfwn9qs64c5&osCsid=nnhalsph5l1804o8vu23bdvjc7 as you can see it directs to https:// which is correct, but should it be going to account_activate and then to success??? any help would be greatly appriciated you can view site and test if you wish www.plrpeople.com - i will delete your account afterwards if you include the info in your reply! Thanks in advance Dan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.