Changeset 1313 in ExiteCMS for trunk/includes/comments_include.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/includes/comments_include.php

    r1184 r1313  
    2828    if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { 
    2929 
    30         $result = dbquery("DELETE FROM ".$db_prefix."captcha WHERE captcha_datestamp<'".(time()-900)."'"); 
    31  
    3230        $flood = false; 
    3331        if (dbrows(dbquery("SELECT $ccol FROM ".$db_prefix."$cdb WHERE $ccol='$comment_id'"))==0) { 
     
    4341         
    4442        // captcha check for guest posts 
    45         $cic = (iGUEST && !check_captcha($_POST['captcha_encode'], $_POST['captcha_code'])) ? "&cic=1" : ""; 
     43        $cic = ""; 
     44        if (iGUEST) { 
     45            // load the secureimage include 
     46            require_once PATH_INCLUDES."secureimage-1.0.3/secureimage.php"; 
     47            $securimage = new Securimage(); 
     48            if ($securimage->check($_POST['captcha_code']) == false) { 
     49                $cic = "&cic=1"; 
     50            } 
     51        } 
    4652 
    4753        $comment_message = trim(stripinput(censorwords($_POST['comment_message']))); 
Note: See TracChangeset for help on using the changeset viewer.