osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2003 osCommerce
   ----------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
require 'includes/languages/' . $sLanguage . '/main_contact_us.php';
$error = '0';
if (isset($_POST['action']) && $_POST['action'] == 'send' && (isset($_SESSION['formid']) && $_SESSION['formid'] == $_POST['formid'])) {
    $name = oos_prepare_input($_POST['name']);
    $email = oos_prepare_input($_POST['email']);
    $enquiry = oos_prepare_input($_POST['enquiry']);
    if (oos_validate_is_email(trim($email))) {
        oos_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $aLang['email_subject'], $enquiry, $name, $email);
        MyOOS_CoreApi::redirect(oos_href_link($aModules['main'], $aFilename['contact_us'], 'action=success'));
    } else {
        $error = '1';
    }
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['main'], $aFilename['contact_us']));
$aOption['template_main'] = $sTheme . '/system/old_contact_us.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_MAINPAGE;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
if (ACCOUNT_DOB == '1') {
    if (checkdate(substr(oos_date_raw($dob), 4, 2), substr(oos_date_raw($dob), 6, 2), substr(oos_date_raw($dob), 0, 4))) {
        $date_of_birth_error = false;
    } else {
        $bError = true;
        $date_of_birth_error = '1';
    }
}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
    $bError = true;
    $email_address_error = '1';
}

if (!oos_validate_is_email($email_address)) {
    $bError = true;
    $email_address_check_error = '1';
}

if ((ACCOUNT_VAT_ID == '1') && (ACCOUNT_COMPANY_VAT_ID_CHECK == '1') && !empty($vat_id)) {
    if (!oos_validate_is_vatid($vat_id)) {
        $bError = true;
        $vatid_check_error = '1';
    }
}


if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
    $bError = true;
    $street_address_error = '1';
Esempio n. 3
0
            $your_name_prompt = $account_values['customers_firstname'] . ' ' . $account_values['customers_lastname'];
            $your_email_address_prompt = $account_values['customers_email_address'];
        } else {
            $your_name_prompt = oos_draw_input_field('yourname', $fromname_error == '1' ? $yourname : $_GET['yourname']);
            if ($fromname_error == '1') {
                $your_name_prompt .= '&nbsp;<span class="errorText">' . $aLang['text_required'] . '</span>';
            }
            $your_email_address_prompt = oos_draw_input_field('from', $fromemail_error == '1' ? $from : $_GET['from']);
            if ($fromemail_error == '1') {
                $your_email_address_prompt .= $aLang['entry_email_address_check_error'];
            }
        }
    }
}
if (isset($_GET['send_to'])) {
    if (oos_validate_is_email(trim($_GET['send_to']))) {
        $friendemail = oos_var_prep_for_os($_GET['send_to']);
    }
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['tell_a_friend'], $aFilename['tell_a_friend'], 'send_to=' . $friendemail . '&amp;products_id=' . $_GET['products_id']));
$aOption['template_main'] = $sTheme . '/modules/tell_a_friend.html';
$aOption['page_heading'] = $sTheme . '/heading/page_heading.html';
$nPageType = OOS_PAGE_TYPE_PRODUCTS;
require 'includes/oos_system.php';
if (!isset($option)) {
    require 'includes/info_message.php';
    require 'includes/oos_blocks.php';
}
// assign Smarty variables;
$oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => sprintf($aLang['heading_title'], $product_info['products_name']), 'oos_heading_image' => 'specials.gif', 'valid_product' => $valid_product, 'product_info' => $product_info, 'action' => $action, 'your_name_prompt' => $your_name_prompt, 'your_email_address_prompt' => $your_email_address_prompt, 'friendname' => $friendname, 'friendemail' => $friendemail, 'yourmessage' => $yourmessage, 'oos_friendemail' => sprintf($aLang['text_email_successful_sent'], stripslashes($products_name), $friendemail), 'error' => $error, 'friendemail_error' => $friendemail_error, 'friendname_error' => $friendname_error, 'fromemail_error' => $fromemail_error, 'fromname_error' => $fromname_error));
Esempio n. 4
0
    function after_process() {
      global $insert_id;

      if ( (defined('MODULE_PAYMENT_CC_EMAIL')) && (oos_validate_is_email(MODULE_PAYMENT_CC_EMAIL)) ) {
        $message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n" .
                   'CVV:' . $this->cc_cvv . "\n\n" . 'Start:' . $this->cc_start . "\n\n" .
                   'ISSUE:' . $this->cc_issue . "\n\n";


        oos_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
      }
    }
Esempio n. 5
0
 if (!isset($_SESSION['customer_id']) && isset($name) && strlen($name) < TICKET_ENTRIES_MIN_LENGTH) {
     $bError = true;
     $error_name = true;
 }
 // Check Subject length
 if (isset($subject) && strlen($subject) < TICKET_ENTRIES_MIN_LENGTH) {
     $bError = true;
     $error_subject = true;
 }
 // Check Message length
 if (isset($enquiry) && strlen($enquiry) < TICKET_ENTRIES_MIN_LENGTH) {
     $bError = true;
     $error_enquiry = true;
 }
 // Check Email for non logged in Customers
 if (!isset($_SESSION['customer_id']) && !oos_validate_is_email($email)) {
     $bError = true;
     $error_email = true;
 }
 if ($bError === false) {
     $ticket_customers_id = '';
     // Get the customers_id
     if (isset($_SESSION['customer_id'])) {
         $ticket_customers_id = $_SESSION['customer_id'];
     } else {
         $customerstable = $oostable['customers'];
         $sql = "SELECT customers_id\n                    FROM {$customerstable}\n                    WHERE customers_email_address='" . oos_db_input($email) . "'";
         $customerid_result = $dbconn->Execute($sql);
         if ($customerid == $customerid_result->fields) {
             $ticket_customers_id = $customerid['customers_id'];
         }