

3bsstudio
Members-
Content count
23 -
Joined
-
Last visited
Profile Information
-
Real Name
Stuart Howard
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
How weird is that? Any ideas on that?
-
I've just tried it and it doesn't work for me?
-
I certainly do...
-
Recreate session is set to false in admin. Can't find any sessions stored in the database so don't think it's storing them anyway.
-
Yes, see green line below: <?php /* $Id: password_forgotten.php,v 1.50 2003/06/05 23:28:24 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PASSWORD_FORGOTTEN); if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']); $check_customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_password, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); if (tep_db_num_rows($check_customer_query)) { $check_customer = tep_db_fetch_array($check_customer_query); $new_password = tep_create_random_value(ENTRY_PASSWORD_MIN_LENGTH); $crypted_password = tep_encrypt_password($new_password); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . tep_db_input($crypted_password) . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'"); tep_mail($check_customer['customers_firstname'] . ' ' . $check_customer['customers_lastname'], $email_address, EMAIL_PASSWORD_REMINDER_SUBJECT, sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $messageStack->add_session('login', SUCCESS_PASSWORD_SENT, 'success'); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } else { $messageStack->add('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND); } } $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_LOGIN, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')); ?> <!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> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('password_forgotten', tep_href_link(FILENAME_PASSWORD_FORGOTTEN, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_password_forgotten.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('password_forgotten') > 0) { ?> <tr> <td><?php echo $messageStack->output('password_forgotten'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo '<b>' . ENTRY_EMAIL_ADDRESS . '</b> ' . tep_draw_input_field('email_address'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><?php echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html>
-
Here's the code if it helps: <?php /* $Id: password_forgotten.php,v 1.8 2003/06/09 22:46:46 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE_1', 'Login'); define('NAVBAR_TITLE_2', 'Password Forgotten'); define('HEADING_TITLE', 'Forgotten your Password? <br><br> We\'ll email you a new one...'); define('TEXT_MAIN', 'If you\'ve forgotten your password, enter your e-mail below and we\'ll <strong>send you a new password to your email address</strong>. <br><br>Please check your <strong>inbox</strong> or <strong>junk mail folder</strong> for your new password.'); define('TEXT_NO_EMAIL_ADDRESS_FOUND', 'Error: The E-Mail Address was not found in our records, please try again.'); define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password'); // start mod anagram systems //define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested from ' . $REMOTE_ADDR . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); // >>> BEGIN REGISTER_GLOBALS define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested from ' . $_SERVER['REMOTE_ADDR'] . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); // <<< END REGISTER_GLOBALS // end mod anagram systems define('SUCCESS_PASSWORD_SENT', 'Success: A new password has been sent to your e-mail address.'); ?>
-
You are redirected to the login page but no message is seen.
-
3bsstudio started following Adding a telephone field to the contact form and No password rest success message showing
-
HI Hopefully you guys can help like you have in the past. The issue we have is when someone resets their password they don't see the 'Success message' to say it's been done. They do receive the password reset email OK but we need them to see the Success message to remind them to look in their inbox. Website: https://www.gasbottlesdirect.co.uk/password_forgotten.php TIA.
-
Adding a telephone field to the contact form
3bsstudio replied to 3bsstudio's topic in General Support
I was right where it goes. Correct version is this under email verification: if (!tep_validate_email($email_address)) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } if($telephone==''){ $error = true; $messageStack->add('contact', ENTRY_TELEPHONE_CHECK_ERROR); } -
Adding a telephone field to the contact form
3bsstudio replied to 3bsstudio's topic in General Support
Thanks YePix but that is already there. I'm thinking the verify telephone has to go in here (see below) from contact_us.php as the email verification is here. I tried adding: if (tep_validate_telephone($telephone)) { after the email line but it blew the page. Any ideas? $text = ENTRY_NAME . ' ' . $name . "\n" . ENTRY_TELEPHONE_NUMBER . ' ' . $telephone . "\n" . ENTRY_EMAIL . ' ' . $email_address . "\n" . ENTRY_ENQUIRY . "\n" . $enquiry; if (tep_validate_email($email_address)) { if (strpos($enquiry, "href") > 1) { }else { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $text, $name, $email_address, $telephone); } tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } }else{ $error = true; $messageStack->add('contact', 'Robot verification failed, please try again.'); } } -
Adding a telephone field to the contact form
3bsstudio replied to 3bsstudio's topic in General Support
As I said it works great now. The only issue - the telephone number is not currently a required field. How do I change it to a required field? TIA. -
Adding a telephone field to the contact form
3bsstudio replied to 3bsstudio's topic in General Support
Thank you bonbec - who'd have thought a wrong style quotes would make such a difference. Amended those and the telephone comes through fine. Thanks YePix but that would still have been wrong... I just needed to change: $text, $name, STORE_OWNER_EMAIL_ADDRESS, $phone); to $text, $name, $email_address, $phone); so now the form comes through with the correct reply email. Thanks for all your help it is now all sorted. -
Adding a telephone field to the contact form
3bsstudio replied to 3bsstudio's topic in General Support
Hi Thanks for the reply. Working my way through seems OK until this bit: <tr> <td class="fieldKey"><?php echo ENTRY_NAME; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_EMAIL; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('email'); ?></td> </tr> My code is different and looks like this: <tr> <td class="main"><?php echo ENTRY_NAME; ?></td></tr> <tr> <td class="main"><?php echo tep_draw_input_field('name'); ?></td></tr> <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('telephone'); ?></td></tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td></tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td></tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td></tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> Website URL: https://gasbottlesdirect.co.uk/contact_us.php -
Hi First off, I know I'm running osCommerce 2.2-MS2 - please don't mock me for it - we have no choice but will be changing it in the future! In the meantime I'm having trouble adding a telephone field to the main contact form. Got it to show OK on the page by adding: <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('telephone'); ?></td> </tr> to the contact_us.php Also added: define('ENTRY_TELEPHONE_NUMBER', 'Telephone Number:'); to includes/languages/english/contact_us.php but when the form is sent the telephone number doesn't appear in the email message. Any ideas why - can't seem to find what I'm missing? Thanks in advance