Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem, human confirmation v.1 , tep_session_is_.


phiberz

Recommended Posts

Hi!

Can anyone help me to fix this?

Im trying to get the:

Human confirmation V 1.0

http://www.oscommerce.com/community/contributions,1476

 

to work with latest CVS (031208) but i only get:

 

Fatal error: Call to undefined function: _session_is_registered() in /home/n/nysite/www/shop/create_account.php on line 508

 

 

line 508 is:

   if (!tep_session_is_registered('noautamationcode')) tep_session_register('noautamationcode');
  include('includes/human_confirmation.php');
  tep_session_close('noautamationcode');

 

i know that tep_session are going to be removed but how do i fix this?

 

Please post the fixez in the code that i have to do.

 

BIG THANKS IF SOMEONE CAN HELP ME!

 

================================================================================
==================
1. -> find: ( ~ line 18-20 )
================================================================================
==================

 $process = false;
 if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
   $process = true;

================================================================================
==================
change to ->
================================================================================
==================

 $process = false;

// BOF // Contrib: Human confirmation v1

 $thecode_okay = false;
 $process_okay = false;
 $noautomationcode = $HTTP_SESSION_VARS["noautamationcode"];

 // -> v1.1 // Changed to work w/ random image names
 $img_dir  = $HTTP_SESSION_VARS["noautamationdir"];
 $img_name = $HTTP_SESSION_VARS["noautamationname"];
 // Find and delete old images
 if (strlen($img_name) >= 6) {
   $dirHandle = dir($img_dir);
   while($fileHandle = $dirHandle->read()) {
     if (substr($fileHandle,0,strlen($img_name)) == $img_name)
       @unlink($img_dir.$fileHandle);
   }
   $dirHandle->close();
 }
 // <- v1.1 // Changed to work w/ random image names

 $thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));
 $process_okay = (isset($HTTP_POST_VARS['action'])  && ($HTTP_POST_VARS['action'] == 'process'));
 if ( ($process_okay == true) && ($thecode_okay == true) ) {

// EOF // Contrib: Human confirmation v1

   $process = true;

================================================================================
==================
2. -> find: ( ~ line 476-490 )
================================================================================
==================

     <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>
               <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
               <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>

================================================================================
==================
change to ->
================================================================================
==================

     <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>
               <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
               <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>

<?PHP
// BOF // Contrib: Human confirmation v1

  if (!tep_session_is_registered('noautamationcode')) tep_session_register('noautamationcode');
  include('includes/human_confirmation.php');
  tep_session_close('noautamationcode');

// EOF // Contrib: Human confirmation v1
?>

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

================================================================================
==================

 

RGDS Phiberz

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...