Changeset 4206


Ignore:
Timestamp:
Nov 5, 2009, 5:15:31 PM (14 years ago)
Author:
cljosse
Message:

[mail_supervisor] update file help 2

Location:
extensions/Mail_supervisor
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/admin/mail_black_liste.tpl

    r4200 r4206  
    1111    <legend >{'options'|translate}</legend>
    1212 <table>
    13  
    14 <td><input type="checkbox" name="NO_MAIL_LIST" value="on" {$no_mail_list}  />&nbsp;&nbsp;{'no_mail_list'|translate}     </td>
    15 <td><input type="checkbox" name="NO_CONNECT" value="on" {$no_connect} />&nbsp;&nbsp;{'no_connect'|translate}</td>
    16 <td><input type="checkbox" name="SET_AUTO" value="on" {$set_auto} />&nbsp;&nbsp;{'set_auto'|translate}</td>
    1713
     14<td><input type="checkbox" name="NO_MAIL_LIST" value="on" {$NO_MAIL_LIST}  />&nbsp;&nbsp;{'no_mail_list'|translate}     </td>
     15<td><input type="checkbox" name="NO_CONNECT" value="on" {$NO_CONNECT} />&nbsp;&nbsp;{'no_connect'|translate}</td>
     16<td><input type="checkbox" name="SET_AUTO" value="on" {$SET_AUTO} />&nbsp;&nbsp;{'set_auto'|translate}</td>
    1817
    1918<tr><td>
  • extensions/Mail_supervisor/admin/mail_superv_admin.php

    r4190 r4206  
    5151 load_language('plugin.lang', MAIL_SUPERV_PATH);
    5252
    53  
    54 
    55 $mails_options = explode("," , $conf['mail_superv']);
    56 
    57 
    58 if (count($mails_options) < 6 )
    59 {
    60 $mails_options[]='off';
    61 
    62 }
    63 if (count($mails_options) < 7 )
    64 {
    65 $mails_options[]='';
    66 
    67 }
    68 
    69 $mails_données=Get_Datas();
    7053
    7154        if (!isset($_GET['tab']))
     
    10588$error = array();
    10689
     90
     91$mails_options = explode("," , $conf['mail_superv']);
     92 
     93$mails_données=Get_Datas();
    10794vérif_base();
    10895
     
    159146         $infos_message .=  l10n('save_config') ;
    160147        }
    161        
     148
    162149if ( isset($_POST['submit']) )
    163150{
    164151//Options
    165   $mails_options[0] = isset($_POST['check_mailto']) ? $_POST['check_mailto'] : '' ;
    166   $mails_options[1] = isset($_POST['check_header_carbon']) ? $_POST['check_header_carbon'] : '' ;
    167   $mails_options[2] = isset($_POST['check_header_text']) ? $_POST['check_header_text'] : '' ;
    168 
     152
     153
     154  $mails_options[0] = isset($_POST['check_mailto']) ? $_POST['check_mailto'] : 'off' ;
     155  $mails_options[1] = isset($_POST['check_header_carbon']) ? $_POST['check_header_carbon'] : 'off' ;
     156  $mails_options[2] = isset($_POST['check_header_text']) ? $_POST['check_header_text'] : 'off' ;
    169157 
    170158//données 
     
    181169         sauve_données();
    182170//=======================================================================================================
    183                 $infos_message .=  l10n('save_config') ;
     171                $infos_message .=  l10n('save_config')  ;
    184172}
    185173
    186         $mails_options = explode("," , $conf['mail_superv']);
     174       
    187175        $mails_données = Get_Datas();
    188176
     
    199187$template->assign(
    200188                                        array(
    201    'check_mailto' => $mails_options[0] == 'on' ? 'checked="checked"' : '' ,
    202    'check_header_carbons' => $mails_options[1] == 'on' ? 'checked="checked"' : '' ,
    203    'check_header_text' => $mails_options[2] == 'on' ? 'checked="checked"' : '' ,
     189   'check_mailto' => ($mails_options[0] == 'on') ? 'checked="checked"' : '' ,
     190   'check_header_carbons' => ($mails_options[1] == 'on') ? 'checked="checked"' : '' ,
     191   'check_header_text' => ($mails_options[2] == 'on') ? 'checked="checked"' : '' ,
    204192
    205193   
     
    329317                $ip_black="";
    330318                $info_ip ="";
     319                 
    331320
    332321                include  (MAIL_SUPERV_PATH.'include/save_info.php');
  • extensions/Mail_supervisor/admin/mail_superv_help.tpl

    r4200 r4206  
    209209</div> <!-- Fonctions -->
    210210
    211 
    212211 </fieldset></div>
  • extensions/Mail_supervisor/include/fonctions.php

    r4190 r4206  
    116116{
    117117global $mails_options ;
    118         $query = '
    119     UPDATE '.CONFIG_TABLE.'
    120     SET value="'.$mails_options[0]. ',' .$mails_options[1]. ',' .$mails_options[2].',' .$mails_options[3]. ',' .$mails_options[4].  ',' .$mails_options[5]. ',' .$mails_options[6]. '"
    121     WHERE param="mail_superv"
    122     LIMIT 1';
    123  pwg_query($query);
    124 
     118 if ( isset($mails_options) )
     119        {
     120          if ( count($mails_options) > 6 )
     121           {
     122                $valeurs = implode( ',',$mails_options);
     123                $query = '
     124                UPDATE '.CONFIG_TABLE.'
     125                SET value="'. $valeurs . '"
     126                WHERE param = "mail_superv"
     127                LIMIT 1';
     128                        pwg_query($query);
     129          }
     130        }
    125131}
    126132//=================================================================================
     
    653659  global $mails_options ;
    654660   global $superv_bl_champs,$superv_bl_type ;
    655        
    656 $mails_options = explode("," , $conf['mail_superv']);
    657        
    658 
    659 if (count($mails_options) < 6 )
    660 {
    661 $mails_options[]='off';
    662 
    663 }
    664 if (count($mails_options) < 7 )
    665 {
    666 $mails_options[]='';
    667 
    668 }
     661
     662 
     663if (count($mails_options) < 6 ) return false ;
     664 
    669665$ip = $_SERVER['REMOTE_ADDR'] ;
    670666 
  • extensions/Mail_supervisor/language/fr_FR/help/plugin.lang.php

    r4200 r4206  
    4646
    4747$lang['hlp_5_1']='Dernier message renvoyé par la fonction mail().';
    48 //=====================================================================
    4948
    5049
  • extensions/Mail_supervisor/main.inc.php

    r4199 r4206  
    2323        // lecture config table -------------
    2424 load_language('plugin.lang', MAIL_SUPERV_PATH);
    25    
    26    
     25 
    2726        $mails_options = explode("," , $conf['mail_superv']);
    2827       
  • extensions/Mail_supervisor/maintain.inc.php

    r4190 r4206  
    7676  $q = '
    7777    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
    78     VALUES ("mail_superv","off,off,off ,off,off,127.0.0.1","Parametres du plugin Mail superviseur")
     78    VALUES ("mail_superv","off,off,off,off,off,off,127.0.0.1","Parametres du plugin Mail superviseur")
    7979  ;';
    8080  pwg_query($q);
     
    102102
    103103    pwg_query($q);
    104   }
     104 
    105105   $q = 'DROP TABLE IF EXISTS  '.MAIL_BLACK_LISTE_TABLE.';';
    106106   pwg_query( $q ); 
     
    108108   pwg_query( $q );
    109109   
    110  
     110 }
    111111 
    112112}
Note: See TracChangeset for help on using the changeset viewer.