Changeset 4054 for extensions/Mail_supervisor
- Timestamp:
- Oct 17, 2009, 4:47:20 PM (15 years ago)
- Location:
- extensions/Mail_supervisor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/admin/mail_superv_admin.php
r4053 r4054 30 30 31 31 32 global $user, $lang, $conf, $errors; 32 33 34 35 // +-----------------------------------------------------------------------+ 36 // | Check Access and exit when user status is not ok | 37 // +-----------------------------------------------------------------------+ 38 check_status(ACCESS_ADMINISTRATOR); 39 40 global $user, $lang, $conf, $errors,$mails_données; 33 41 global $args, $conf_mail,$infos_message,$erreur_message ; 34 35 load_language('plugin.lang', MAIL_SUPERV_PATH);36 // +-----------------------------------------------------------------------+37 // | Check Access and exit when user status is not ok |38 // +-----------------------------------------------------------------------+39 check_status(ACCESS_ADMINISTRATOR);40 42 41 43 include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); … … 50 52 51 53 52 54 load_language('plugin.lang', MAIL_SUPERV_PATH); 55 53 56 $mails_options = explode("," , $conf['mail_superv']); 54 57 $mails_données=Get_Datas(); … … 211 214 ;'; 212 215 list($group_name) = mysql_fetch_row(pwg_query($query)); 213 214 216 } else { 217 $group_name=""; 215 218 } 216 219 //================================================ … … 219 222 220 223 if ( isset($_POST['test_envoie']) ) { 221 if ($group_id >= 0) {224 222 225 $mails_données['message_test'] = isset($_POST['content']) ? $_POST['content'] : $mails_données['message_test'] ; 223 226 $message=$mails_données['message_test']; … … 225 228 test_envoie($message,$group_name,$group_id); 226 229 $mails_données = Get_Datas() ; 227 }230 228 231 } 229 232 -
extensions/Mail_supervisor/include/fonctions.php
r4053 r4054 186 186 //=============================================== 187 187 188 function corrige_header($Carbonne,$headers )188 function corrige_header($Carbonne,$headers,$args) 189 189 { 190 global $mails_options,$conf_mail,$mailto,$ args,$infos_message;191 192 190 global $mails_options,$conf_mail,$mailto,$infos_message; 191 192 if (!empty($args[$Carbonne])) 193 193 { 194 194 195 195 if ( count($args[$Carbonne]) > 0 ) 196 196 { 197 if ($mails_options[1] == 'on') { 198 // Correction "< >" 199 $list_mail = get_strict_email_list(implode(',', $args[$Carbonne])) ; 200 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.$list_mail."\n", $headers); 201 } 197 if ($mails_options[1] == 'on') { 198 $list_mail = str_replace(","," ,",get_strict_email_list(implode(',', $args[$Carbonne])))." \n" ; 199 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.': '.$list_mail, $headers); 200 } 202 201 } 203 202 } else { … … 207 206 208 207 209 210 208 return $headers; 211 209 … … 259 257 function vérif_base() 260 258 { 259 260 global $lang; 261 load_language('plugin.lang', MAIL_SUPERV_PATH); 261 262 262 263 $q = " … … 393 394 } 394 395 } 396 397 395 398 function Get_colonnes_de($table) 396 399 { -
extensions/Mail_supervisor/include/function_test_send.php
r4051 r4054 31 31 function test_envoie($message,$group_name,$group_id) 32 32 { 33 global $infos_message,$erreur_message ,$conf,$user,$conf_mail,$mail_données,$args ;33 global $infos_message,$erreur_message ,$conf,$user,$conf_mail,$mail_données,$args,$lang ; 34 34 $mailto=""; 35 35 36 36 load_language('plugin.lang', MAIL_SUPERV_PATH); 37 37 38 //================================================================================== 38 39 if (!isset($infos_message)) … … 69 70 if (count($groups) > 0) 70 71 { 71 //=========================================================== 72 $args['Bcc']=$groups; 72 $args['Bcc']=$groups; 73 } else { 74 $mailto = $conf_mail['formated_email_webmaster']; 75 } 76 73 77 $args['from'] = $conf_mail['formated_email_webmaster']; 74 78 //================================================================== … … 88 92 $args['subject']="Plugin Piwigo TEST"; 89 93 $args['content']=$message_html; 94 $infos_message .="To :" . $mailto; 95 90 96 $ret= pwg_mail($mailto , $args); 91 92 $infos_message .= sprintf( l10n('An information email was sent to group "%s"'), $group_name ).'<br />'; 93 97 if ( $group_name <> '' or $mailto <> '' ) 98 { 99 if ($group_name<>'') { 100 $infos_message .= '<br />'. sprintf( l10n('An information email was sent to group "%s"'), $group_name ).'<br />'; 101 } 102 if ($mailto <> '') { 103 $infos_message .= '<br />'. sprintf( l10n('mail_sent_to'), $mailto ).'<br />'; 104 } 94 105 95 106 }else{ 96 $infos_message .= l10n('no_receiver_available') ;107 $infos_message .='<br />'.l10n('no_receiver_available') ; 97 108 } 98 109 … … 101 112 function mail_attachement($args) 102 113 { 103 global $infos_message,$erreur_message ,$conf,$user,$conf_mail,$mail_données ;114 global $infos_message,$erreur_message ,$conf,$user,$conf_mail,$mail_données,$lang ; 104 115 105 116 $mails_données = Get_Datas(); … … 109 120 } 110 121 111 122 load_language('plugin.lang', MAIL_SUPERV_PATH); 112 123 113 124 $nom ='piwigo_logo_sombre_214x100.png'; -
extensions/Mail_supervisor/main.inc.php
r4053 r4054 24 24 /* 25 25 Plugin Name: Mail supervisor 26 Version: 1.1. 526 Version: 1.1.6 27 27 Description: Mail supervisor surveille l'envoie des mails. 28 28 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315 … … 117 117 }else{ 118 118 119 if (!empty($args['Cc'])) 119 120 } 121 122 //============================================================================= 123 if (!empty($args['Cc'])) 120 124 { 121 $headers= corrige_header('Cc',$headers); 122 125 $headers= corrige_header('Cc',$headers,$args); 123 126 } 124 127 if (!empty($args['Bcc'])) 125 128 { 126 $headers = corrige_header('Bcc',$headers); 127 } 128 129 130 } 131 129 $headers = corrige_header('Bcc',$headers,$args); 130 } 131 //============================================================================= 132 132 if ($mails_options[2]=='on') { 133 133 … … 152 152 if ($nb_destinataires > 0) { 153 153 $ret = mail($mailto, $subject, $content, $headers); 154 /* <br /> 155 <b>Warning</b>: mail() [<a href='function.mail'>function.mail</a>]: Trop de spam. Fonction mail() bloque. 156 in <b>/mnt/102/sdb/9/5/cl.josse/Galerie/plugins/mail_supervisor/main.inc.php</b> on line <b>132</b><br /> 157 */ 154 158 155 }else{ 159 156 $message .='Nombre de destinataires = 0'; -
extensions/Mail_supervisor/maintain.inc.php
r4053 r4054 31 31 32 32 include_once (MAIL_SUPERV_PATH.'include/constants.php'); 33 global $lang; 33 34 34 include_once (MAIL_SUPERV_PATH.'include/fonctions.php'); 35 35 … … 41 41 SELECT count(`id`) as total FROM `'.PLUGINS_TABLE.'` WHERE `id` LIKE "free_mail" ;'; 42 42 $plugs = mysql_fetch_array(pwg_query($q)); 43 $nb= $plugs['total'];43 $nb= $plugs['total']; 44 44 45 45 if (count($nb)>=1) {
Note: See TracChangeset
for help on using the changeset viewer.