♥Gyakutsuki Posted October 7, 2005 Posted October 7, 2005 Hello, I tried to add a news fields in contact us.php. My problem is when i send a message I haven't in my mail, the information of the new fields. Coul help me ? The the files contact_us.php. I think it must modify the function tep_mail in general.php or the class/mail.php. Thanks <?php /* $Id: contact_us.php,v 1.3 2005/10/07 18:55:35 loic Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // ############# Added Security Fix ################# $enquiry = $HTTP_POST_VARS['enquiry']; $name = $HTTP_POST_VARS['name']; $email = $HTTP_POST_VARS['email']; $address = $HTTP_POST_VARS['address']; $zip = $HTTP_POST_VARS['zip']; $city = $HTTP_POST_VARS['city']; $telephone = $HTTP_POST_VARS['telephone']; $fax = $HTTP_POST_VARS['fax']; $enquiry = ''; $name = ''; $email = ''; $address = ''; /* $zip = ''; $city = ''; $telephone = ''; $fax = ''; */ // ############# End Added Security Fix ################# require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); // ########## Added Extra Pages Infobox Version 4.0 ########## $page_query = tep_db_query("select p.pages_id, p.sort_order, p.status, s.pages_title, s.pages_html_text from " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id where p.status = 1 and s.language_id = '" . (int)$languages_id . "'and p.page_type = 2"); $page_check = tep_db_fetch_array($page_query); // ########## END - Added Extra Pages Infobox Version 4.0 ########## $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $address = tep_db_prepare_input($HTTP_POST_VARS['address']); $zip = tep_db_prepare_input($HTTP_POST_VARS['zip']); $city = tep_db_prepare_input($HTTP_POST_VARS['city']); $telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']); $fax = tep_db_prepare_input($HTTP_POST_VARS['fax']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address, $address, $zip, $city, $telephone, $fax); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // ########## Added Header Tag Controler V2 ######## ?> <?php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } ?> <?php // ########## End added ######## ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { // ########## Added Extra Pages Infobox Version 4.0 ########## ?> <!-- Remplacement de ce qui ce trouve ci dessous ? l'installation ne pas ajouter les commentaires du code qui ne serve ? rien <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php // echo ENTRY_NAME; ?></td> //--> <tr> <td class="main"><?php echo $page_check[pages_html_text]; ?><br><br></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="22%" class="main" ><?php echo ENTRY_NAME; ?></td> <td width="78%" with="70%"><span class="main"><?php echo tep_draw_input_field('name'); ?></span></td> <?php // ########## END - Added Extra Pages Infobox Version 4.0 ########## ?> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> <td><span class="main"><?php echo tep_draw_input_field('email'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_ADDRESS; ?></td> <td><span class="main"><?php echo tep_draw_input_field('address'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_ZIP; ?></td> <td><span class="main"><?php echo tep_draw_input_field('zip'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_CITY; ?></td> <td><span class="main"><?php echo tep_draw_input_field('city'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_TELEPHONE; ?></td> <td><span class="main"><?php echo tep_draw_input_field('telephone'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_FAX; ?></td> <td><span class="main"><?php echo tep_draw_input_field('fax'); ?></span></td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_ENQUIRY; ?></td> <td></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Hello, I tried to add a news fields in contact us.php. My problem is when i send a message I haven't in my mail, the information of the new fields. Coul help me ? The the files contact_us.php. I think it must modify the function tep_mail in general.php or the class/mail.php. Thanks <?php /* $Id: contact_us.php,v 1.3 2005/10/07 18:55:35 loic Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // ############# Added Security Fix ################# $enquiry = $HTTP_POST_VARS['enquiry']; $name = $HTTP_POST_VARS['name']; $email = $HTTP_POST_VARS['email']; $address = $HTTP_POST_VARS['address']; $zip = $HTTP_POST_VARS['zip']; $city = $HTTP_POST_VARS['city']; $telephone = $HTTP_POST_VARS['telephone']; $fax = $HTTP_POST_VARS['fax']; $enquiry = ''; $name = ''; $email = ''; $address = ''; /* $zip = ''; $city = ''; $telephone = ''; $fax = ''; */ // ############# End Added Security Fix ################# require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); // ########## Added Extra Pages Infobox Version 4.0 ########## $page_query = tep_db_query("select p.pages_id, p.sort_order, p.status, s.pages_title, s.pages_html_text from " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id where p.status = 1 and s.language_id = '" . (int)$languages_id . "'and p.page_type = 2"); $page_check = tep_db_fetch_array($page_query); // ########## END - Added Extra Pages Infobox Version 4.0 ########## $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $address = tep_db_prepare_input($HTTP_POST_VARS['address']); $zip = tep_db_prepare_input($HTTP_POST_VARS['zip']); $city = tep_db_prepare_input($HTTP_POST_VARS['city']); $telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']); $fax = tep_db_prepare_input($HTTP_POST_VARS['fax']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address, $address, $zip, $city, $telephone, $fax); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // ########## Added Header Tag Controler V2 ######## ?> <?php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } ?> <?php // ########## End added ######## ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { // ########## Added Extra Pages Infobox Version 4.0 ########## ?> <!-- Remplacement de ce qui ce trouve ci dessous ? l'installation ne pas ajouter les commentaires du code qui ne serve ? rien <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php // echo ENTRY_NAME; ?></td> //--> <tr> <td class="main"><?php echo $page_check[pages_html_text]; ?><br><br></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="22%" class="main" ><?php echo ENTRY_NAME; ?></td> <td width="78%" with="70%"><span class="main"><?php echo tep_draw_input_field('name'); ?></span></td> <?php // ########## END - Added Extra Pages Infobox Version 4.0 ########## ?> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> <td><span class="main"><?php echo tep_draw_input_field('email'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_ADDRESS; ?></td> <td><span class="main"><?php echo tep_draw_input_field('address'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_ZIP; ?></td> <td><span class="main"><?php echo tep_draw_input_field('zip'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_CITY; ?></td> <td><span class="main"><?php echo tep_draw_input_field('city'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_TELEPHONE; ?></td> <td><span class="main"><?php echo tep_draw_input_field('telephone'); ?></span></td> </tr> <tr> <td class="main"><?php echo ENTRY_FAX; ?></td> <td><span class="main"><?php echo tep_draw_input_field('fax'); ?></span></td> </tr> <tr> <td class="main" colspan="2"><?php echo ENTRY_ENQUIRY; ?></td> <td></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Regards ----------------------------------------- Loïc Contact me by skype for business Contact me @gyakutsuki for an answer on the forum
Recommended Posts
Archived
This topic is now archived and is closed to further replies.