Ignore:
Timestamp:
Apr 15, 2011, 4:09:41 PM (14 years ago)
Author:
cljosse
Message:

[extensions] mail_supervisor fix bug format_email

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/mail_super.inc.php

    r10179 r10385  
    2020// | USA.                                                                  |
    2121// +-----------------------------------------------------------------------+
    22 if (!defined('MAIL_SUPERV_PATH'))
    23 define('MAIL_SUPERV_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
    24 if (!defined('ROOT_URL'))
    25 define(  'ROOT_URL',  get_root_url().'/' );
    26 $MAIL_SUPERV_PATH_ABS=str_replace('\\','/',dirname(__FILE__) );
    27 if (!defined('MAIL_SUPERV_PATH_ABS'))
    28 define('MAIL_SUPERV_PATH_ABS',   $MAIL_SUPERV_PATH_ABS."/");
    2922
    3023class mail_supervisor {
     
    4639 */
    4740 static public function init() {
    48   global  $template,$version,$path_js,$icon_path;
    49 
    50  $theme="default";
    51 
     41  global  $template,$version,$icon_path;   
     42  $action_spam = pwg_get_session_var('action_spam') ;
     43  $theme="default";
     44  $themeconf=$template->get_template_vars('themeconf');
     45  $theme=$themeconf['id'];
     46  if (file_exists ( 'admin/themes/clear/icon/help.png')) $icon_path = 'themes/default/icon/help.png';
     47  else  $icon_path =  "admin/template/goto/theme/clear/icon/help.png";
    5248  if (PHPWG_VERSION < 2.2 ) {
    5349    $file =MAIL_SUPERV_PATH_ABS.'admin/header_2_1.tpl' ;
    54     if (PHPWG_VERSION < 2.0 ) $path_js =  "template-common/lib/";
    55     else $path_js=  'themes/default/js/' ;
    56     $themeconf=$template->get_template_vars('themeconf');
    57     $theme=$themeconf['id'];
    58    
     50 
    5951  } else {
    60      $themeconf=$template->get_template_vars('themeconf');
    61     $theme=$themeconf['id'];
    62     $file =MAIL_SUPERV_PATH_ABS.'admin/header_2_2.tpl' ;
    63     $path_js=  'themes/default/js/' ;
     52    $file = MAIL_SUPERV_PATH_ABS.'admin/header_2_2.tpl' ;
     53   
    6454  }
    6555  if(isset($_GET['action_spam']) and $_GET['action_spam']=="no"){
    66     $action_spam = pwg_get_session_var('action_spam') ;
    6756    pwg_set_session_var('action_spam', "false");
    6857    unset ($_SESSION['pwg_'.'action_spam']);
    6958  }
    70  
    71 
     59  $action_spam=pwg_get_session_var('action_spam');
    7260  $template->set_filenames(array('mail_superv_init'=> $file ));
    73   if (file_exists ( 'admin/themes/clear/icon/help.png')) $icon_path = 'themes/default/icon/help.png';
    74   else  $icon_path =  "admin/template/goto/theme/clear/icon/help.png";
    75   $template->assign(
    76       array('theme' => $theme,'version' => $version,
    77       'PHPWG_VERSION' =>     PHPWG_VERSION ,
    78       'MAIL_SUPERV_PATH' =>  MAIL_SUPERV_PATH ,
    79       'path_js' => $path_js,
    80       'MAIL_SUPERV_PATH_ABS' => MAIL_SUPERV_PATH_ABS,
    81       'action_spam' => pwg_get_session_var('action_spam')
    82       )
    83   );
     61  $MAIL_SUPERV_PATH=str_replace(PHPWG_ROOT_PATH,"",MAIL_SUPERV_PATH) ;
     62  $profile=array('theme' => $theme,
     63            'PHPWG_VERSION' => PHPWG_VERSION ,
     64            'MAIL_SUPERV_PATH' => $MAIL_SUPERV_PATH  ,             
     65            'MAIL_SUPERV_PATH_ABS' => MAIL_SUPERV_PATH_ABS           
     66          );
     67
     68  $template->assign( $profile );
     69  $template->append('footer_elements', '<input id="action_spam" name="action_spam" type="hidden" value="'.$action_spam.'" />');
    8470  $template->parse( 'mail_superv_init', false);
    85 
    8671  return ;//
    8772}// function init
     
    190175    ob_start();
    191176    echo '<pre>';
     177    if(count($variables)>1){
    192178    foreach($variables as $key => $line){
    193179      echo  $key . " =>  " . $line ;
    194180      echo "<br />";
    195181    }       
     182    }else{
     183        echo "<i>".$variables."</i><br />";
     184    }
     185
    196186    $m= ob_get_contents();
    197187    ob_end_clean();
Note: See TracChangeset for help on using the changeset viewer.