1 2 3 4 5 6 7 8 9 10 11 12 13
|
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWSLETTERS);
$subscribers_info = tep_db_query("select subscribers_id from " . TABLE_SUBSCRIBERS . " where subscribers_email_address = '" . $HTTP_POST_VARS['Email'] . "' ");
$date_now = date('Ymd');
if (!tep_db_num_rows($subscribers_info)) {
$gender = '' ;
tep_db_query("insert into " . TABLE_SUBSCRIBERS . " (subscribers_email_address, subscribers_lastname, subscribers_gender,subscribers_firstname,language, subscribers_email_type, date_account_created, customers_newsletter, subscribers_blacklist, hardiness_zone, status_sent1, source_import) values ('" . strtolower($HTTP_POST_VARS['Email']) . "', '" . ucwords(strtolower($HTTP_POST_VARS['lastname'])) . "', '" . ucwords(strtolower($HTTP_POST_VARS['gender'])) . "','" . ucwords(strtolower($HTTP_POST_VARS['firstname'])) . "', '" . $HTTP_POST_VARS['language'] . "', '" . $HTTP_POST_VARS['email_type'] . "', now() , '1', '0', '" . $domain4 . "', '1', 'subscribe_newsletter')");
} else {
tep_db_query("update " . TABLE_SUBSCRIBERS . " set customers_newsletter = '" . '1' . "', subscribers_email_type = '" . $HTTP_POST_VARS['email_type'] . "' where subscribers_email_address = '" . $HTTP_POST_VARS['Email'] . "' ");
} |
Partager