| [ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: affiliate_password_forgotten.php 3 2006-05-27 04:59:07Z user $ 4 5 OSC-Affiliate 6 7 Contribution based on: 8 osCMax Power E-Commerce 9 10 http://oscdox.com 11 12 Copyright 2006 osCMax2002 -2003 osCommerce 13 Released under the GNU General Public License 14 */ 15 16 // Most of this file is changed or moved to BTS - Basic Template System - format. 17 // For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change). 18 // catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change). 19 // (Sub 'fallback' with your current template to see if there is a template specific file.) 20 21 require ('includes/application_top.php'); 22 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE_PASSWORD_FORGOTTEN); 23 24 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { 25 $check_affiliate_query = tep_db_query("select affiliate_firstname, affiliate_lastname, affiliate_password, affiliate_id from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . $HTTP_POST_VARS['email_address'] . "'"); 26 if (tep_db_num_rows($check_affiliate_query)) { 27 $check_affiliate = tep_db_fetch_array($check_affiliate_query); 28 // Crypted password mods - create a new password, update the database and mail it to them 29 $newpass = tep_create_random_value(ENTRY_PASSWORD_MIN_LENGTH); 30 $crypted_password = tep_encrypt_password($newpass); 31 tep_db_query("update " . TABLE_AFFILIATE . " set affiliate_password = '" . $crypted_password . "' where affiliate_id = '" . $check_affiliate['affiliate_id'] . "'"); 32 tep_mail($check_affiliate['affiliate_firstname'] . " " . $check_affiliate['affiliate_lastname'], $HTTP_POST_VARS['email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), STORE_OWNER, AFFILIATE_EMAIL_ADDRESS); 33 tep_redirect(tep_href_link(FILENAME_AFFILIATE, 'info_message=' . urlencode(TEXT_PASSWORD_SENT), 'SSL', true, false)); 34 } else { 35 tep_redirect(tep_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'email=nonexistent', 'SSL')); 36 } 37 } else { 38 39 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_AFFILIATE, '', 'SSL')); 40 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL')); 41 42 $content = affiliate_password_forgotten; 43 44 include (bts_select('main', $content_template)); // BTSv1.5 45 46 require (DIR_WS_INCLUDES . 'application_bottom.php'); 47 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |