Changeset 1313 in ExiteCMS for trunk/contact.php


Ignore:
Timestamp:
02/27/08 12:37:15 (4 years ago)
Author:
root
Message:

replaced the internal captcha routine by SecureImaga

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contact.php

    r1185 r1313  
    1515require_once dirname(__FILE__)."/includes/core_functions.php"; 
    1616require_once PATH_ROOT."/includes/theme_functions.php"; 
     17 
     18// include the secureimage class 
     19require_once PATH_INCLUDES."secureimage-1.0.3/secureimage.php"; 
    1720 
    1821// temp storage for template variables 
     
    3437 
    3538// captcha check 
    36 $cic = (isset($_POST['captcha_encode']) && !check_captcha($_POST['captcha_encode'], $_POST['captcha_code'])) ? "&cic=1" : ""; 
     39$cic = ""; 
     40$securimage = new Securimage(); 
     41if ($securimage->check($_POST['captcha_code']) == false) { 
     42    $cic = "&cic=1"; 
     43} 
    3744$variables['cic'] = $cic; 
    3845 
     
    5259// captcha check ok and message posted? 
    5360if ($cic == "" && isset($_POST['sendmessage'])) { 
    54     $result = dbquery("DELETE FROM ".$db_prefix."captcha WHERE captcha_datestamp<'".(time()-900)."'"); 
    5561    $errors = array(); 
    5662    if ($mailname == "") { 
Note: See TracChangeset for help on using the changeset viewer.