Ignore:
Timestamp:
10/16/08 11:56:20 (4 years ago)
Author:
hverton
Message:

added the user country code to the post record when inserting a message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/mail2forum/php-files/modules/mail2forum/m2f_pop3.php

    r1838 r1854  
    4242// include for image manipulation functions 
    4343require_once PATH_INCLUDES."photo_functions_include.php"; 
     44 
     45// need the GeoIP functions to determine the mailers country of origin 
     46require_once PATH_INCLUDES."geoip_include.php"; 
    4447 
    4548// include the PEAR POP3 and MIME decode class 
     
    260263    } 
    261264 
     265    // determine the country code for the senders mail server 
     266    $sender_cc = GeoIP_IP2Code($post['received']['ip']); 
     267    if (!$sender_cc) $sender_cc = ""; 
     268 
    262269    // insert the new message into the posts table 
    263     $sql = "INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime)  
    264         VALUES ('$forum_id', '$thread_id', '".mysql_escape_string($subject)."', '".mysql_escape_string($post['body'])."', '1', '1', '".$sender['user_id']."', '$posttime', '".$post['received']['ip']."', '0', '0')"; 
     270    $sql = "INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_user_cc, post_edituser, post_edittime)  
     271        VALUES ('$forum_id', '$thread_id', '".mysql_escape_string($subject)."', '".mysql_escape_string($post['body'])."', '1', '1', '".$sender['user_id']."', '$posttime', '".$post['received']['ip']."', '$sender_cc', '0', '0')"; 
    265272    $result = dbquery($sql); 
    266273    if (!$result) { 
Note: See TracChangeset for help on using the changeset viewer.