Changeset 4132 for extensions/Mail_supervisor/admin/mail_superv_admin.php
- Timestamp:
- Oct 28, 2009, 10:49:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/admin/mail_superv_admin.php
r4065 r4132 1 1 2 <?php 2 3 // +-----------------------------------------------------------------------+ … … 26 27 die('Hacking attempt!'); 27 28 } 28 if (!defined('MAIL_SUPERV_DIR')) define('MAIL_SUPERV_DIR' , basename(dirname(__FILE__))); 29 29 30 if (!defined('MAIL_SUPERV_PATH')) define('MAIL_SUPERV_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 30 31 31 32 32 33 34 35 33 // +-----------------------------------------------------------------------+ 36 34 // | Check Access and exit when user status is not ok | 37 35 // +-----------------------------------------------------------------------+ 38 check_status(ACCESS_ADMINISTRATOR);36 //check_status(ACCESS_ADMINISTRATOR); 39 37 40 38 global $user, $lang, $conf, $errors,$mails_données; 41 39 global $args, $conf_mail,$infos_message,$erreur_message ; 42 40 43 include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 41 44 42 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 45 43 … … 47 45 include_once (MAIL_SUPERV_PATH.'include/constants.php'); 48 46 include_once (MAIL_SUPERV_PATH.'include/fonctions.php'); 49 47 include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 50 48 $my_base_url = get_admin_plugin_menu_link(__FILE__); 51 49 … … 54 52 load_language('plugin.lang', MAIL_SUPERV_PATH); 55 53 56 54 57 55 $mails_options = explode("," , $conf['mail_superv']); 58 56 $mails_données=Get_Datas(); … … 73 71 l10n('Tab_set'), 74 72 $my_base_url.'&tab=mail_superv_admin'); 73 75 74 $tabsheet->add('mail_superv_test', 76 75 l10n('Tab_test'), 77 76 $my_base_url.'&tab=mail_superv_test'); 77 78 $tabsheet->add( 'mail_black_liste', 79 l10n('blackliste'), 80 $my_base_url.'&tab=mail_black_liste'); 81 82 78 83 $tabsheet->add('mail_superv_help',$tabhelp 79 84 , 80 85 $my_base_url.'&tab=mail_superv_help'); 86 87 81 88 $tabsheet->select($page['tab']); 82 89 $tabsheet->assign(); … … 95 102 96 103 $modif=false ; 104 105 97 106 //================================================================================ 98 107 switch ($page['tab']) 99 108 { 100 109 101 110 // ************************************************************************* 102 111 // initialisation | … … 133 142 134 143 $mails_données['reste'] = 0; 135 $mails_données['quarantaine']= false;144 $mails_données['quarantaine']='false'; 136 145 137 146 sauve_données(); … … 175 184 $reste= $mails_données['reste']; 176 185 177 $quarantaine= $mails_données['quarantaine']; 186 $quarantaine = ($mails_données['quarantaine'] == 'true') ? true : false ;; 187 188 189 178 190 $PHPWG_VERSION=PHPWG_VERSION; 179 191 … … 198 210 'time_spams_reste' => "'".int_to_heure($rest_spam)."'" , 199 211 200 'quarantaine' => $ mails_données['quarantaine'],212 'quarantaine' => $quarantaine , 201 213 'date_quarantaine' => "'".date(l10n('formatdate'),time()+$reste)."'" , 202 214 'quarantaine_periode' => "'".$mails_données['quarantaine_periode']."'" , … … 262 274 $result = pwg_query($query); 263 275 //---------------------------------------------------------------- 264 while ($row = mysql_fetch_array($result ))276 while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) 265 277 { 266 278 $groups[$row['id']] = $row['name']; … … 290 302 break; 291 303 // ************************************************************************* 304 // BLACK LISTE | 305 // ************************************************************************* 306 case 'mail_black_liste': 307 308 load_language('help/plugin.lang', MAIL_SUPERV_PATH); 309 310 $aff_nb=false; 311 $smile_bonjour=MAIL_SUPERV_PATH."smilies/bonjour.gif" ; 312 $template->assign( 313 array( 314 'smile_bonjour' => $smile_bonjour , 315 ) 316 ); 317 $aff_nb = false; 318 ; 319 $liste_bl=array(); 320 $liste_ip=array(); 321 322 $ip_black=""; 323 $info_ip =""; 324 325 include (MAIL_SUPERV_PATH.'include/save_info.php'); 326 327 $fonction_raz = $my_base_url.'&tab=mail_black_liste&info=raz:'; 328 $fonction_set = $my_base_url.'&tab=mail_black_liste&info=ajout:'; 329 $f_action = $my_base_url.'&tab=mail_black_liste' ; 330 // array_keys($liste_bl[0]);array_keys($liste_ip[0]) 331 $champs_ip=array(); 332 $champs_bl=array(); 333 334 if (!empty($liste_ip)) 335 $champs_ip=array_keys($liste_ip[0]); 336 337 if (!empty($liste_bl)) 338 $champs_bl=array_keys($liste_bl[0]); 339 340 341 $smile_bonjour=MAIL_SUPERV_PATH."smilies/mouche.gif" ; 342 $template->assign( 343 array( 344 'smile_bonjour' => $smile_bonjour , 345 346 'champs_ip' => $champs_ip , 347 'liste_ip' => $liste_ip, 348 'champs_bl' => $champs_bl , 349 'liste_bl' => $liste_bl , 350 'conf_admin_layout' => $conf['admin_layout'] , 351 'ip_black' => $ip_black , 352 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 353 'fonction_raz' => $fonction_raz , 354 'fonction_set' => $fonction_set , 355 'F_ACTION' => $f_action , 356 'IP' => $_SERVER['REMOTE_ADDR'], 357 ) 358 ); 359 //=============================================================== 360 $template->set_filenames(array('plugin_admin_content' => realpath(MAIL_SUPERV_PATH . 'admin/mail_black_liste.tpl'))); 361 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 362 break; 363 364 // ************************************************************************* 292 365 // AIDE | 293 366 // ************************************************************************* … … 310 383 break; 311 384 //==================================================================== 312 313 314 } 385 } 315 386 //================================================================================ 316 387 … … 350 421 } 351 422 423 352 424 353 425 if ($infos_message != "")
Note: See TracChangeset
for help on using the changeset viewer.