コード例 #1
0
    $from_email_address = smn_db_prepare_input($_POST['from_email_address']);
    $from_name = smn_db_prepare_input($_POST['from_name']);
    $message = smn_db_prepare_input($_POST['message']);
    if (empty($from_name)) {
        $error = true;
        $messageStack->add('friend', ERROR_FROM_NAME);
    }
    if (!smn_validate_email($from_email_address)) {
        $error = true;
        $messageStack->add('friend', ERROR_FROM_ADDRESS);
    }
    if (empty($to_name)) {
        $error = true;
        $messageStack->add('friend', ERROR_TO_NAME);
    }
    if (!smn_validate_email($to_email_address)) {
        $error = true;
        $messageStack->add('friend', ERROR_TO_ADDRESS);
    }
    if ($error == false) {
        $email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, $store->get_store_name());
        $email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], $store->get_store_name()) . "\n\n";
        if (smn_not_null($message)) {
            $email_body .= $message . "\n\n";
        }
        $email_body .= sprintf(TEXT_EMAIL_LINK, smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $product_info['store_id'] . '&products_id=' . $_GET['products_id'])) . "\n\n" . sprintf(TEXT_EMAIL_SIGNATURE, $store->get_store_name() . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
        smn_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);
        $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], smn_output_string_protected($to_name)), 'success');
        smn_redirect(smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $product_info['store_id'] . '&products_id=' . $_GET['products_id']));
    }
} elseif (smn_session_is_registered('customer_id')) {
コード例 #2
0
 } else {
     $customer_zone_id = 0;
 }
 $customer_country_id = $_POST['country'];
 if (strlen($customer_first_name) < ENTRY_FIRST_NAME_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_FIRST_NAME_ERROR, '');
 }
 if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_LAST_NAME_ERROR, '');
 }
 if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_ERROR, '');
 } elseif (smn_validate_email($email_address) == false) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_CHECK_ERROR, '');
 } else {
     $check_email_query = smn_db_query("select count(*) as total from " . TABLE_ADMIN . " where admin_email_address = '" . smn_db_input($email_address) . "' and customer_id != '" . $customer_id . "'");
     $check_email = smn_db_fetch_array($check_email_query);
     if ($check_email['total'] > 0) {
         $error = true;
         $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS, '');
     }
 }
 if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_STREET_ADDRESS_ERROR, '');
 }
 if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
コード例 #3
0
  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (!smn_session_is_registered('affiliate_id')) {
    $navigation->set_snapshot();
    smn_redirect(smn_href_link(FILENAME_AFFILIATE, '', 'NONSSL'));
}
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'send') {
    if (smn_validate_email(trim($_POST['email']))) {
        smn_mail($store->get_store_owner(), AFFILIATE_EMAIL_ADDRESS, EMAIL_SUBJECT, $_POST['enquiry'], $_POST['name'], $_POST['email']);
        smn_redirect(smn_href_link(FILENAME_AFFILIATE_CONTACT, 'action=success'));
    } else {
        $error = true;
    }
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_AFFILIATE_CONTACT));
$affiliate_values = smn_db_query("select * from " . TABLE_AFFILIATE . " where affiliate_id = '" . $affiliate_id . "'");
$affiliate = smn_db_fetch_array($affiliate_values);
?>
 
コード例 #4
0
     $error = true;
     $messageStack->add('account_edit', ENTRY_FIRST_NAME_ERROR);
 }
 if (strlen($_POST['lastname']) < ENTRY_LAST_NAME_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_LAST_NAME_ERROR);
 }
 if (strlen($_POST['email_address']) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_ERROR);
 }
 if (strlen($_POST['city']) < ENTRY_CITY_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_CITY_ERROR);
 }
 if (!smn_validate_email($_POST['email_address'])) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
 }
 $check_email_query = smn_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . smn_db_input($_POST['email_address']) . "' and customers_id != '" . (int) $customer_id . "'");
 $check_email = smn_db_fetch_array($check_email_query);
 if ($check_email['total'] > 0) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
 }
 if (strlen($_POST['telephone']) < ENTRY_TELEPHONE_MIN_LENGTH) {
     $error = true;
     $messageStack->add('account_edit', ENTRY_TELEPHONE_NUMBER_ERROR);
 }
 if ($error == false) {
     $profile_edit->set_firstname($_POST['firstname']);
コード例 #5
0
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
// include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
$error = false;
if (isset($_GET['action']) && $_GET['action'] == 'send') {
    $name = smn_db_prepare_input($_POST['name']);
    $email_address = smn_db_prepare_input($_POST['email']);
    $enquiry = smn_db_prepare_input($_POST['enquiry']);
    $subject = smn_db_prepare_input($_POST['subject']);
    if (smn_validate_email($email_address)) {
        smn_mail($store->get_store_owner(), $store->get_store_owner_email_address(), $subject, $enquiry, $name, $email_address);
        smn_redirect(smn_href_link(FILENAME_CONTACT_US, 'action=success'));
    } else {
        $error = true;
        $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    }
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_CONTACT_US));
コード例 #6
0
 }
 if (ACCOUNT_DOB == 'true') {
     if (checkdate(substr(smn_date_raw($customers_dob), 4, 2), substr(smn_date_raw($customers_dob), 6, 2), substr(smn_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 (!smn_validate_email($customers_email_address)) {
     $error = true;
     $entry_email_address_check_error = true;
 } else {
     $entry_email_address_check_error = false;
 }
 if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
     $error = true;
     $entry_street_address_error = true;
 } else {
     $entry_street_address_error = false;
 }
 if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
     $error = true;
     $entry_post_code_error = true;
 } else {
コード例 #7
0
ファイル: cc.php プロジェクト: stanislauslive/StanMarket
 function after_process()
 {
     global $insert_id;
     global $store;
     if (defined('MODULE_PAYMENT_CC_EMAIL') && smn_validate_email(MODULE_PAYMENT_CC_EMAIL)) {
         $message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n";
         smn_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, $store->get_store_owner(), $store->get_store_owner_email_address());
     }
 }