Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Spammed via contact form


nathancastle

Recommended Posts

Hi there,

 

One of the clients we deal with at work is having problems with spam via the contact from of his oscommerce site. It's an early version of oscommerce, 4 or 5 I think although I'm not certain.

 

Is there any way I can stop the spam? I've included the contact form code (contact_us.tpl.php) below.

 

	<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>">

<?php

// BOF: Lango Added for template MOD

if (SHOW_HEADING_TITLE_ORIGINAL == 'yes') {

$header_text = ' '

//EOF: Lango Added for template MOD

?>

  <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

// BOF: Lango Added for template MOD

}else{

$header_text = HEADING_TITLE;

}

// EOF: Lango Added for template MOD

?>



<?php

// BOF: Lango Added for template MOD

if (MAIN_TABLE_BORDER == 'yes'){

table_image_border_top(false, false, $header_text);

}

// EOF: Lango Added for template MOD

?>

<?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>

<?php

// BOF: Lango Added for template MOD

if (MAIN_TABLE_BORDER == 'yes'){

table_image_border_bottom();

}

// EOF: Lango Added for template MOD

?>

  <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_template_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 {

?>

  <!-- tr>

	<td class="main"><?php echo TEXT_CONTACT_INFO; ?></td>

  </tr>

  <tr>

	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

  </tr -->



  <tr>

	<td class="main"><?php echo TEXT_BODY; ?></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">



<!-- VJ enhancement begin -->

		  <tr>

			<td class="main" width="20%"><?php echo ENTRY_COMPANY; ?></td>

			<td class="main" width="80%"><?php echo tep_draw_input_field('company'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_NAME; ?></td>

			<td class="main"><?php echo tep_draw_input_field('name'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_EMAIL; ?></td>

			<td class="main"><?php echo tep_draw_input_field('email'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>

			<td class="main"><?php echo tep_draw_input_field('telephone'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>

			<td class="main"><?php echo tep_draw_input_field('street'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_CITY; ?></td>

			<td class="main"><?php echo tep_draw_input_field('city'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_STATE; ?></td>

			<td class="main"><?php echo tep_draw_input_field('state'); ?></td>

		  </tr>

		  <tr>

			<td class="main"><?php echo ENTRY_POST_CODE; ?></td>

			<td class="main"><?php echo tep_draw_input_field('postcode'); ?></td>

		  </tr>

		  <tr>

			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

		  </tr>



<?php

$topic_array = array();

$topic_array = array(array('id' => ENTRY_TOPIC_1, 'text' => ENTRY_TOPIC_1), 

		 array('id' => ENTRY_TOPIC_2, 'text' => ENTRY_TOPIC_2), 

		 array('id' => ENTRY_TOPIC_3, 'text' => ENTRY_TOPIC_3),

		 array('id' => ENTRY_TOPIC_4, 'text' => ENTRY_TOPIC_4)

		 );

?>

		  <tr>

			<td class="main"><?php echo ENTRY_SUBJECT; ?></td>

			  <td class="main"><?php echo tep_draw_pull_down_menu('email_subject',  tep_get_email_subjects_list(array(array('name' => '', 'text' => TEXT_EMAIL_SUBJECTS)))); ?></td>

		  </tr>

		  <tr>

			<td class="main" valign="top"><?php echo ENTRY_ENQUIRY; ?></td>

			<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>

		  </tr>



		  <tr>

			<td class="main"><?php echo ENTRY_SELF; ?></td>

			<td class="main"><?php echo tep_draw_checkbox_field('self'); ?></td>

		  </tr>

<!-- VJ enhancement end -->



		</table></td>

	  </tr>

	</table></td>

  </tr>



<?php

// BOF: Lango Added for template MOD

if (MAIN_TABLE_BORDER == 'yes'){

table_image_border_bottom();

}

// EOF: Lango Added for template MOD

?>

  <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_template_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>

 

If anyone could help I would be very grateful.

 

Thanks in advance,

 

Nathan.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...