[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: contact_us.php 8 2006-06-22 02:48:59Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Released under the GNU General Public License 11 */ 12 13 // Most of this file is changed or moved to BTS - Basic Template System - format. 14 // 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). 15 // 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). 16 // (Sub 'fallback' with your current template to see if there is a template specific file.) 17 18 require ('includes/application_top.php'); 19 20 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); 21 22 // BOF: Added 23 $_POST['email'] = preg_replace( "/\n/", " ", $_POST['email'] ); 24 $_POST['name'] = preg_replace( "/\n/", " ", $_POST['name'] ); 25 $_POST['email'] = preg_replace( "/\r/", " ", $_POST['email'] ); 26 $_POST['name'] = preg_replace( "/\r/", " ", $_POST['name'] ); 27 $_POST['email'] = str_replace("Content-Type:","",$_POST['email']); 28 $_POST['name'] = str_replace("Content-Type:","",$_POST['name']); 29 // EOF: Added 30 31 $error = false; 32 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { 33 $name = tep_db_prepare_input($HTTP_POST_VARS['name']); 34 $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); 35 $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); 36 37 38 // BOF: Remove blank emails 39 // if (tep_validate_email($email_address)) { 40 // tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); 41 // tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); 42 // } else { 43 // $error = true; 44 // $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); 45 if (! tep_validate_email($email_address)) { 46 $error = true; 47 $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); 48 } 49 if ($enquiry == '') { 50 $error = true; 51 $messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR); 52 } 53 54 if ($error == false) { 55 tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); 56 tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); 57 // EOF: Remove blank emails 58 } 59 } 60 61 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); 62 63 $content = CONTENT_CONTACT_US; 64 65 include (bts_select('main', $content_template)); // BTSv1.5 66 67 require (DIR_WS_INCLUDES . 'application_bottom.php'); 68 ?>
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 |