Changeset 8917 for extensions/Mail_supervisor/include
- Timestamp:
- Jan 26, 2011, 3:59:23 PM (13 years ago)
- Location:
- extensions/Mail_supervisor/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/include/Scripts.js
r5671 r8917 1 function blockToggleDisplay(headerId, contentId) 2 { 1 function blockToggleDisplay(headerId, contentId){ 3 2 var revHeader = document.getElementById(headerId); 4 3 var revContent = document.getElementById(contentId); -
extensions/Mail_supervisor/include/fonctions.php
r7050 r8917 29 29 if (!defined('MAIL_SUPERV_PATH')) define('MAIL_SUPERV_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 30 30 31 define ("check_mailto", 0); define ("check_header_carbon",1); define ("check_header_text",2); 32 define ("no_mail_list", 3); define ("no_connect",4); define ("set_auto",5); 33 define ("ip",6); define ("set_id",7); 31 define ("check_mailto", 0); 32 define ("check_header_carbon",1); 33 define ("check_header_text",2); 34 define ("no_mail_list", 3); 35 define ("no_connect",4); // empeche l'ip de se connecter au site. 36 define ("set_auto",5); // Test a l'ouverture et enregistrement 37 define ("ip",6); // dernirre adresse IP 38 define ("set_id",7); // enregistrment nouvel 34 39 35 40 … … 288 293 //=============================================== 289 294 290 function corrige_header($Carbonne,$headers,$args )295 function corrige_header($Carbonne,$headers,$args,$cl_list_mail) 291 296 { 292 297 global $mails_options,$conf_mail,$mailto,$infos_message; … … 294 299 if (!empty($args[$Carbonne])) 295 300 { 296 297 if ( count($args[$Carbonne]) > 0 ) 301 if ( count($args[$Carbonne]) > 0 ) 298 302 { 299 if ($mails_options[check_header_carbon] == 'on') {300 $list_mail = str_replace(","," ,",get_strict_email_list(implode(',', $args[$Carbonne])))." \n";301 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.': '.$list_mail, $headers);302 }303 if ($mails_options[check_header_carbon] == 'on') { 304 $cl_list_mail = str_replace(","," , ",get_strict_email_list(implode(',', $args[$Carbonne])))." \n" ; 305 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.': '.$cl_list_mail, $headers); 306 } 303 307 } 308 304 309 } else { 305 // Raz Bcc, Cc dans headers310 // Raz Bcc, Cc dans headers 306 311 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', "" , $headers); 307 312 } 308 313 309 310 return $headers; 314 $headers = str_replace("\n.", "\n..",$headers ); 315 $ret->headers = $headers ; 316 $ret->list_mail = $cl_list_mail ; 317 return $ret; 311 318 312 319 … … 433 440 u.'.$conf['user_fields']['email'].' AS email, 434 441 ui.status, 435 ui.adviser,436 442 ui.enabled_high, 437 443 ui.level … … 765 771 //======================================================================= 766 772 767 if ($mails_options[set_auto] == ' on')773 if ($mails_options[set_auto] == 'nonoui') // ne plus tester automatiquement . 768 774 { 769 775 // $ip="94.102.63.13"; ' Spammeurs … … 887 893 function test_spam($ip =0,$user_name ='', $mail_adresse = "") 888 894 { 889 $buffer=""; 895 $buffer=""; 896 global $page,$infos_message; 890 897 891 898 // fretgpsolodens 892 $src = "" ;//"http://www.stopforumspam.com/api?";893 $type=array();894 $result="";899 $src = "http://www.stopforumspam.com/api?"; 900 $type=array(); 901 $result=""; 895 902 if (strlen($ip)>3) { 896 903 //================== Verifie si l'IP est correct ================================ 897 904 if (clj_is_ip($ip)){ 898 905 899 906 } else { 900 907 //================== Verifie si l'adresse mail est correcte ================================ 901 908 if( clj_is_mail($ip) ){ 902 909 $mail_adresse=$ip ; 903 910 $ip=""; 904 911 } … … 921 928 if ( strlen($mail_adresse) > 3) $type[]="email=".$mail_adresse ; 922 929 if ( strlen($ip) > 3) $type[]="ip=".$ip ; 923 930 924 931 foreach ( $type as $fil ) 925 932 { 926 933 $resultat=""; 927 934 if ( clj_fetchRemote($src.$fil , $resultat,1)) 928 935 { 929 $result .= $resultat.'<br />' ;936 $result .= $resultat.'<br />' ; 930 937 } else { 931 938 932 939 } 940 933 941 } 934 942 … … 960 968 function clj_is_mail($mail) 961 969 { 970 971 if(preg_match('/^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$/' ,$mail)) return true ; 962 972 if(preg_match('/#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#/' ,$mail)) return true ; 963 973 } … … 967 977 { 968 978 // Try to retrieve data from local file? 979 // http://www.stopforumspam.com/api?ip=95.211.1.39 980 981 if ($src=="") return ; 982 969 983 if (!url_is_remote($src)) 970 984 { 985 971 986 $content = @file_get_contents($src); 972 987 if ($content !== false) … … 980 995 } 981 996 } 982 997 983 998 // After 3 redirections, return false 984 999 if ($step > 3) return false; … … 1072 1087 1073 1088 } 1089 1090 1091 1074 1092 ?> -
extensions/Mail_supervisor/include/function_test_send.php
r7050 r8917 226 226 } 227 227 228 228 229 ?>
Note: See TracChangeset
for help on using the changeset viewer.