AlexStudio Posted November 5, 2006 Share Posted November 5, 2006 It seems to me that you didn't install this contrib properly, since you didn't see the image while testing with the the png file generator. Please check your installation procedure especially the SQL part. The post installation test would fail only if: the file validation_png.php is corrupt or missing the session ID is not recorded You must first open your catalog/index.php in your browser to generate your session ID and copy that ID for test, you can't test it with one which does not exist. Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
hobbieone59 Posted November 5, 2006 Share Posted November 5, 2006 It seems to me that you didn't install this contrib properly, since you didn't see the image while testing with the the png file generator. Please check your installation procedure especially the SQL part. The post installation test would fail only if: the file validation_png.php is corrupt or missing the session ID is not recorded You must first open your catalog/index.php in your browser to generate your session ID and copy that ID for test, you can't test it with one which does not exist. Well, I choosed to go back to your modifications with image files :/ it worked like this and it's ok for me :/ Quote Link to comment Share on other sites More sharing options...
HelleM Posted November 25, 2006 Share Posted November 25, 2006 Works great - had a little problem with showing the png - but found the answer in here. Now I'm wondering if the contrib also could, or perhaps better, is made to work with contact_us.php etc. ?? Would be really nice Helle :-) Quote Link to comment Share on other sites More sharing options...
driftwood Posted December 3, 2006 Share Posted December 3, 2006 Has anyone managed to insert this into the links contribution ? I don't know if it's possible and I've inlcude the link_submit.php if anyone is will try, much apriciated if anyone can offer any advice <?php echo tep_draw_form('submit_link', tep_href_link(FILENAME_LINKS_SUBMIT, '', 'SSL'), 'post', 'onSubmit="return check_form(submit_link);"') . tep_draw_hidden_field('action', 'process'); ?><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_account.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 ?> <tr> <td class="smallText"><br><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('submit_link') > 0) { ?> <tr> <td><?php echo $messageStack->output('submit_link'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo CATEGORY_WEBSITE; ?></b></td> <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="60%" cellspacing="2" cellpadding="2"> <tr> <td class="main" width="25%"><?php echo ENTRY_LINKS_TITLE; ?></td> <td class="main"><?php echo tep_draw_input_field('links_title') . ' ' . (tep_not_null(ENTRY_LINKS_TITLE_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_TITLE_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_LINKS_URL; ?></td> <td class="main"><?php echo tep_draw_input_field('links_url', 'http://') . ' ' . (tep_not_null(ENTRY_LINKS_URL_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_URL_TEXT . '</span>': ''); ?></td> </tr> <?php //link category drop-down list $categories_array = array(); $categories_query = tep_db_query("select lcd.link_categories_id, lcd.link_categories_name from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " lcd where lcd.language_id = '" . (int)$languages_id . "'order by lcd.link_categories_name"); while ($categories_values = tep_db_fetch_array($categories_query)) { $categories_array[] = array('id' => $categories_values['link_categories_name'], 'text' => $categories_values['link_categories_name']); } if (isset($HTTP_GET_VARS['lPath'])) { $current_categories_id = $HTTP_GET_VARS['lPath']; $current_categories_query = tep_db_query("select link_categories_name from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_id ='" . (int)$current_categories_id . "' and language_id ='" . (int)$languages_id . "'"); if ($categories = tep_db_fetch_array($current_categories_query)) { $default_category = $categories['link_categories_name']; } else { $default_category = ''; } } ?> <tr> <td class="main"><?php echo ENTRY_LINKS_CATEGORY; ?></td> <td class="main"> <?php echo tep_draw_pull_down_menu('links_category', $categories_array, $default_category); if (tep_not_null(ENTRY_LINKS_CATEGORY_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_LINKS_CATEGORY_TEXT; ?> </td> </tr> <tr> <td class="main" valign="top"><?php echo ENTRY_LINKS_DESCRIPTION; ?></td> <td class="main"><?php echo tep_draw_textarea_field('links_description', 'hard', 20, 5) . ' ' . (tep_not_null(ENTRY_LINKS_DESCRIPTION_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_DESCRIPTION_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_LINKS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_input_field('links_image', 'http://') . ' ' . (tep_not_null(ENTRY_LINKS_IMAGE_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_IMAGE_TEXT . '</span>': ''); ?><?php echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_LINKS_HELP) . '\')">' . TEXT_LINKS_HELP_LINK . '</a>'; ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table width="60%" border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main" width="25%"><?php echo ENTRY_LINKS_CONTACT_NAME; ?></td> <td class="main"><?php echo tep_draw_input_field('links_contact_name') . ' ' . (tep_not_null(ENTRY_LINKS_CONTACT_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_CONTACT_NAME_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td class="main"><?php echo tep_draw_input_field('links_contact_email') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo CATEGORY_RECIPROCAL; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table width="60%" border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main" width="25%"><?php echo ENTRY_LINKS_RECIPROCAL_URL; ?></td> <td class="main"><?php echo tep_draw_input_field('links_reciprocal_url', 'http://') . ' ' . (tep_not_null(ENTRY_LINKS_RECIPROCAL_URL_TEXT) ? '<span class="inputRequirement">' . ENTRY_LINKS_RECIPROCAL_URL_TEXT . '</span>': ''); ?><?php echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_LINKS_HELP) . '\')">' . TEXT_LINKS_HELP_LINK . '</a>'; ?></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> </table></form> Quote ----------------------------------------------------------------------------- OSC user for years and no coder, so I've earned my stripes. Feel free to private message me. Link to comment Share on other sites More sharing options...
dksi Posted December 5, 2006 Share Posted December 5, 2006 Dear boys and girls, I can't see the picture respectively not the letters. Here's a screenshot (Opera 9.02): and with Internet Explorer 6 If I click the properties of the pic, I see the following window (Internet Explorer): Has anyone a workable solution for me? Thanks for your help Dirk from germany Quote Link to comment Share on other sites More sharing options...
AlexStudio Posted December 5, 2006 Share Posted December 5, 2006 (edited) Dirk, your Opera 9.02 recognized the png file and showed it up, however there is something wrong with the session ID, so there was no letter at all. You need to check your databse in anti_robotreg table to see if there is any record. It seems to me that you didn't install the sql script correctly. Your rsid read 6n9dq4ujvhgj4okuakcku2lhe0 which is really weird. Edited December 5, 2006 by AlexStudio Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
dksi Posted December 5, 2006 Share Posted December 5, 2006 Yes, it's very weird. If I open the site, I see a session Id in the address line. But if I logged in as user the Id is disappeared. The record reads: https://www.proframe.eu/account_password.php Where is the session Id? It is to exasperating. B.reg Dirk Dirk, your Opera 9.02 recognized the png file and showed it up, however there is something wrong with the session ID, so there was no letter at all. You need to check your databse in anti_robotreg table to see if there is any record. It seems to me that you didn't install the sql script correctly. Your rsid read 6n9dq4ujvhgj4okuakcku2lhe0 which is really weird. Quote Link to comment Share on other sites More sharing options...
dksi Posted December 5, 2006 Share Posted December 5, 2006 In the anti_robotreg table I have the following entries: :( Yes, it's very weird.If I open the site, I see a session Id in the address line. But if I logged in as user the Id is disappeared. The record reads: https://www.proframe.eu/account_password.php Where is the session Id? It is to exasperating. B.reg Dirk Quote Link to comment Share on other sites More sharing options...
AlexStudio Posted December 5, 2006 Share Posted December 5, 2006 Dirk, I don't know what you have done to your store, there is no osCsid in all pages I viewed. You probably added something like SID Killer or so. In this case, I can only assume that what you have done to the session ID is working correctly. Then there should be records in your database table anti_robotreg. If you don't have any record in there, then this Anti Robot Registration Validation contrib will not work with your store. I don't know what you did to the session functions, so I don't have any idea how to fix your problem. Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
AlexStudio Posted December 5, 2006 Share Posted December 5, 2006 Oops! I got this 1146 - Table 'db14178.anti_robotreg' doesn't exist select reg_key from anti_robotreg where session_id = '90ddaa8c3ca0895c13fcfc784222e420' [TEP STOP] when trying to test your validation_png.php Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
AlexStudio Posted December 5, 2006 Share Posted December 5, 2006 (edited) NEW UPDATE released!! Anti Robot Registration Validation 2.5 Full Package - contact_us included!! v2.5 Update Detail -Added to include contact_us.php -Bug fixed - a typo in v2.4x update, which caused admin settings not functioning properly when switching on/off account_password validation. -Added SQL script for updating from v2.3/v2.4x -removed install.txt --------------------------------------------- sorry I didn't include other languages packages, please make translations if needed. --------------------------------------------- http://www.oscommerce.com/community/contributions,1237 Edited December 5, 2006 by AlexStudio Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
HelleM Posted December 6, 2006 Share Posted December 6, 2006 (edited) GREEEEAAT - I really hoped you would For some reason I get this on account_edit.php when I submit the form 'form.elements[...].value is null or not an object Has that got anything to do with you?? *lol* Helle :-) *otherwise VERY happy* *can it run under Wishlist 2.0??" Edited December 6, 2006 by HelleM Quote Link to comment Share on other sites More sharing options...
AlexStudio Posted December 6, 2006 Share Posted December 6, 2006 Helle, I really don't know, but I don't have that error. Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
HelleM Posted December 6, 2006 Share Posted December 6, 2006 Okay - I must figure that one out *annoying* Great Contrib - Love it Helle :-) Quote Link to comment Share on other sites More sharing options...
kbking Posted December 6, 2006 Share Posted December 6, 2006 Hi! I have version 2.4 working just fine. Now I wanted to have it on contact_us.php also. I run the update_from_2_4x_to_2_5.sql and merged the code on contact_us.php page. But the validation input field and images doesn´t show up. Then I tried the contact_us.php from the v. 2.5 package, but no, it won´t show up. It should show up with the contact_us.php from the v.2.5 package, right? Or have I missed something obvious here? Quote Link to comment Share on other sites More sharing options...
AlexStudio Posted December 6, 2006 Share Posted December 6, 2006 Chris, do you have the new option in admin>configuration>anti robot reg> to activate contact us form? Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
HelleM Posted December 6, 2006 Share Posted December 6, 2006 Alex You didn't by any chance make a combination of your contrib together with "Super Contact us enhancement" ?? That would be awsome if you did? Helle :-) Quote Link to comment Share on other sites More sharing options...
kbking Posted December 6, 2006 Share Posted December 6, 2006 Chris, do you have the new option in admin>configuration>anti robot reg> to activate contact us form? Yes all are set to True. I have moved around tables a bit and also merged it with Super Contact Enhancement contribution in order to have it the way I like and because the Super Contact Enhancement Validation Code didn't work I thought I go for Yours instead. I guess the fault lays there somewhere. I have to go through the Instructions again. Quote Link to comment Share on other sites More sharing options...
kbking Posted December 6, 2006 Share Posted December 6, 2006 Yes all are set to True. I have to go through the Instructions again. No, I was not able to figure it out. The code works on the other files without problems. I guess it should work with the contact_us.php from the v. 2.5 package, which I haven't altered, but no, it doesn't. Any ideas? Quote Link to comment Share on other sites More sharing options...
AlexStudio Posted December 6, 2006 Share Posted December 6, 2006 Chris, I really don't know. The contact_us.php in the 2.5 package has been tested in fresh installed osC 060817 release and is working fine. Is there anybody else having this issue? The validation block does not show up in contact_us.php only? Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
kbking Posted December 6, 2006 Share Posted December 6, 2006 The validation block does not show up in contact_us.php only? Yes it is only in contact_us.php it does not show up. Since it works in account_edit.php, account_password.php and create_account.php, I take it, it can't be anything from the database that interfears? Quote Link to comment Share on other sites More sharing options...
driftwood Posted December 6, 2006 Share Posted December 6, 2006 Can anyone tell me if it's possible to use this with the Links submit form I posted earlier ? If not I'll move on, thanks. Quote ----------------------------------------------------------------------------- OSC user for years and no coder, so I've earned my stripes. Feel free to private message me. Link to comment Share on other sites More sharing options...
AlexStudio Posted December 6, 2006 Share Posted December 6, 2006 Yes it is only in contact_us.php it does not show up. Since it works in account_edit.php, account_password.php and create_account.php, I take it, it can't be anything from the database that interfears? You need to check your database table 'configuration', search for where configuration_key = "CONTACT_US_VALIDATION" It seems to me that CONTACT_US_VALIDATION is not there, so the first "if statement" failed and skipped the validation code. Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
AlexStudio Posted December 6, 2006 Share Posted December 6, 2006 Alex You didn't by any chance make a combination of your contrib together with "Super Contact us enhancement" ?? That would be awsome if you did? Helle :-) Helle, I don't have that contrib installed, and have no idea what that is. I will check that out, and if I am interested, I might give it a try. Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
AlexStudio Posted December 7, 2006 Share Posted December 7, 2006 To apply v2.5 update to "Super Contact us enhancement" v1.2 Warning! This has not been tested yet, just some suggestions, and might not be supported in this thread. 1. "Super Contact us enhancement" v1.2 must be installed first. 2. Apply "update from v2.4.x to v2.5" catalog/contact_us.php STEP 1.1 to STEP 2.1 if not done so yet. 3. Apply "update from v2.4.x to v2.5" catalog/contact_us.php STEP 2.2 first 2 sections as followed: Find (at the top of the file) require('includes/application_top.php'); Add after // BOF Anti Robot Validation v2.5 if (ACCOUNT_VALIDATION == 'true' && CONTACT_US_VALIDATION == 'true') { require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_VALIDATION); include_once('includes/functions/' . FILENAME_ACCOUNT_VALIDATION); } // EOF Anti Robot Registration v2.5 Find require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { Add after // BOF Anti Robotic Registration v2.5 if (ACCOUNT_VALIDATION == 'true' && CONTACT_US_VALIDATION == 'true') { $sql = "SELECT * FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "' LIMIT 1"; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_1; } else { $entry_antirobotreg_error = false; $anti_robot_row = tep_db_fetch_array($result); if (( strtoupper($HTTP_POST_VARS['antirobotreg']) != $anti_robot_row['reg_key'] ) || ($anti_robot_row['reg_key'] == '') || (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH)) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_2; } else { $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "'"; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_3; } else { $sql = "OPTIMIZE TABLE " . TABLE_ANTI_ROBOT_REGISTRATION . ""; if( !$result = tep_db_query($sql) ) { $error = true; $entry_antirobotreg_error = true; $text_antirobotreg_error = ERROR_VALIDATION_4; } else { $entry_antirobotreg_error = false; } } } } if ($entry_antirobotreg_error == true) $messageStack->add('contact', $text_antirobotreg_error); } // EOF Anti Robotic Registration v2.5 4. Modify the "Super Contact us enhancement" v1.2 code: Find: // BOF Super Contact us enhancement 1.0 $order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']); if ($order_id <> NULL){ $enquiry = 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); }else{ $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); } $emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT; if (tep_validate_email($email_address)) { if (CONTACT_US_LIST !=''){ $send_to_array=explode("," ,CONTACT_US_LIST); preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array); $send_to_email= eregi_replace (">", "", $send_email_array[0]); $send_to_email= eregi_replace ("<", "", $send_to_email); tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address); }else{ tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address); } // EOF Super Contact us enhancement 1.0 tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } Replace with: // BOF Super Contact us enhancement 1.0 $order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']); if ($order_id <> NULL){ $enquiry = 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); }else{ $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); } $emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT; // BOF Anti Robot Registration v2.5 if (!tep_validate_email($email_address)) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } elseif (!$entry_antirobotreg_error == true) { // EOF Anti Robotic Registration v2.5 if (CONTACT_US_LIST !=''){ $send_to_array=explode("," ,CONTACT_US_LIST); preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array); $send_to_email= eregi_replace (">", "", $send_email_array[0]); $send_to_email= eregi_replace ("<", "", $send_to_email); tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address); }else{ tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address); } // EOF Super Contact us enhancement 1.0 // BOF Anti Robot Registration v2.5 tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } // EOF Anti Robotic Registration v2.5 Find: </tr> <tr> <td height="4"></td> </tr> <tr> <td height="66" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="547" height="62" valign="top" align="middle"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> Replace with: </tr> <tr> <td height="4"></td> </tr> <?php // BOF Anti Robot Registration v2.5 if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'contact_us') && CONTACT_US_VALIDATION == 'true') { ?> <tr> <td class="main"><b><?php echo CATEGORY_ANTIROBOTREG; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'contact_us') && CONTACT_US_VALIDATION == 'true') { if ($is_read_only == false || (strstr($PHP_SELF,'contact_us')) ) { $sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . tep_session_id() . "'"; if( !$result = tep_db_query($sql) ) { die('Could not delete validation key'); } $reg_key = gen_reg_key(); $sql = "INSERT INTO ". TABLE_ANTI_ROBOT_REGISTRATION . " VALUES ('" . tep_session_id() . "', '" . $reg_key . "', '" . time() . "')"; if( !$result = tep_db_query($sql) ) { die('Could not check registration information'); } ?> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span></td> </tr> <tr> <td class="main" width="100%"> <?php $check_anti_robotreg_query = tep_db_query("select session_id, reg_key, timestamp from anti_robotreg where session_id = '" . tep_session_id() . "'"); $new_guery_anti_robotreg = tep_db_fetch_array($check_anti_robotreg_query); $validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']); if ($entry_antirobotreg_error == true) { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg') . ' <br><b><font color="red">' . ERROR_VALIDATION . '<br>' . $text_antirobotreg_error . '</b></font>'; } else { ?> <span> <?php echo $validation_images . ' <br> '; echo tep_draw_input_field('antirobotreg', $account['entry_antirobotreg']) . ' ' . ENTRY_ANTIROBOTREG_TEXT; } } } ?> </span> </td> </tr> </table></td> </tr> </table></td> </tr> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } // EOF Anti Robot Registration v2.5 ?> <tr> <td height="66" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="547" height="62" valign="top" align="middle"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> That's it. Try it at your own risk! Quote Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.