Changeset 5670 for extensions/Mail_supervisor/admin/mail_superv_admin.php
- Timestamp:
- Apr 5, 2010, 3:49:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/admin/mail_superv_admin.php
r4938 r5670 60 60 $page['tab'] = $_GET['tab']; 61 61 62 $icon_path = 'template/yoga/icon/help.png'; 63 64 $tabhelp= ' <img src="'.PHPWG_ROOT_PATH. $icon_path .'" class="button" alt="(?)"> '; 62 if (file_exists ( 'admin/themes/clear/icon/help.png')) 63 { 64 //version 2.1 65 66 $icon_path = 'themes/default/icon/help.png'; 67 $path_js= 'themes/default/js/' ; 68 69 } 70 else 71 { 72 // version 1.9 73 $path_js= "template-common/lib/"; 74 $icon_path = "admin/template/goto/theme/clear/icon/help.png"; 75 } 76 77 78 $tabhelp= ' <img src="'.PHPWG_ROOT_PATH. $icon_path .'" width=10px alt="(?)"> '; 65 79 66 80 … … 80 94 81 95 82 $tabsheet->add('mail_superv_help', $tabhelp83 ,96 $tabsheet->add('mail_superv_help', 97 $tabhelp, 84 98 $my_base_url.'&tab=mail_superv_help'); 85 99 … … 272 286 'PHPWG_VERSION' => PHPWG_VERSION , 273 287 'version' => $version , 274 288 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 289 'path_js' => $path_js 275 290 ) 276 291 ); … … 289 304 290 305 $mails_données = Get_Datas() ; 291 292 306 $group_id = isset($_POST['group']) ? $_POST['group'] : '-1' ; 293 307 if ($group_id >= 0) { … … 303 317 } 304 318 //================================================ 305 306 307 319 // info by email to an access granted group of category informations 320 if (isset($_POST['submitEmail']) and !empty($_POST['group'])) 321 { 322 set_make_full_url(); 323 /* TODO: if $category['representative_picture_id'] 324 is empty find child representative_picture_id */ 325 /* 326 * send en email to user's group 327 * 328 * @param: 329 * - group_id: mail are sent to group with this Id 330 * - email_format: mail format 331 * - keyargs_subject: mail subject on l10n_args format 332 * - dirname: short name of directory including template 333 * - tpl_shortname: short template name without extension 334 * - assign_vars: array used to assign_vars to mail template 335 * - language_selected: send mail only to user with this selected language 336 * 337 * @return boolean (Ok or not) 338 */ 339 340 if (function_exists('get_user_language_desc') ) $titre = get_user_language_desc($conf['gallery_title']); 341 else 342 $titre=$conf['gallery_title']; 343 344 $message = empty($_POST['MAIL_CONTENT']) ? $mails_données['message_test'] : stripslashes($_POST['MAIL_CONTENT']); 345 346 if (function_exists('get_user_language_desc') ) $message = get_user_language_desc($message); 347 // TODO Mettre un array pour traduction subjet 348 349 350 pwg_mail_group( 351 $_POST['group'], 352 get_str_email_format(true), 353 get_l10n_args('[%s] ---> %s', array($titre,'Information') ), //sujet 354 'cat_group_info', // template 355 array 356 ( 357 'CPL_CONTENT' => $message."\n\n".$user['username'] 358 ), 359 '' ); 360 361 362 $mails_données['message_test']= str_replace('"',"'",$message) ; 363 unset_make_full_url(); 364 sauve_données(); 365 $mails_données = Get_Datas() ; 366 367 $query = ' 368 SELECT 369 name 370 FROM '.GROUPS_TABLE.' 371 WHERE id = '.$_POST['group'].' 372 ;'; 373 list($group_name) = mysql_fetch_row(pwg_query($query)); 374 375 array_push( 376 $page['infos'], 377 sprintf( 378 l10n('An information email was sent to group "%s"'), 379 $group_name 380 ) 381 ); 382 } 383 load_language('plugin.lang', MAIL_SUPERV_PATH); 384 //===================================================================================== 308 385 if ( isset($_POST['test_envoie']) ) { 309 310 $mails_données['message_test'] = isset($_POST['content']) ? $_POST['content'] : $mails_données['message_test'] ; 386 $mails_données['message_test'] = empty($_POST['MAIL_CONTENT']) ? '' : stripslashes($_POST['MAIL_CONTENT']); 311 387 $message=$mails_données['message_test']; 388 //test_envoie($message,$group_name,$group_id); 312 389 sauve_données(); 313 test_envoie($message,$group_name,$group_id);390 314 391 $mails_données = Get_Datas() ; 315 392 … … 347 424 'liste' => $destinataires , 348 425 'version' => $version , 426 'MAIL_CONTENT' => $mails_données['message_test'], 427 'path_js' => $path_js 349 428 ) 350 429 ); … … 352 431 $template->set_filenames(array('plugin_admin_content' => realpath(MAIL_SUPERV_PATH . 'admin/mail_superv_test.tpl'))); 353 432 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 433 434 $toolbar = 'Basic'; 435 $width = '750px'; 436 $height = '200px'; 437 $areas = array(); 438 $areas[]='MAIL_CONTENT'; 439 // $areas[]= 'MAIL_CONTENT'; 440 if (!empty($areas)) 441 { 442 if (function_exists('set_fckeditor_instance')) 443 set_fckeditor_instance($areas, $toolbar, $width, $height); 444 } 445 354 446 break; 355 447 // ************************************************************************* … … 435 527 'champs_bl' => $champs_bl , 436 528 'liste_bl' => $liste_bl , 437 'conf_admin_layout' => $conf['admin_layout'] ,529 //'conf_admin_layout' => $conf['admin_layout'] , 438 530 'istype' => $istype , 439 531 'ip_black' => $ip_black , … … 441 533 'ip_black_len' => strlen($ip_black) , 442 534 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 443 535 'path_js' => $path_js , 444 536 'F_ACTION' => $f_action , 445 537 … … 474 566 'smile_bonjour' => $smile_bonjour , 475 567 'version' => $version , 568 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 569 'path_js' => $path_js 476 570 ) 477 571 ); … … 486 580 //================================================================================ 487 581 582 488 583 489 584 if ( $mails_données['reste'] < 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.