Changeset 10385 for extensions/Mail_supervisor/mail_super.inc.php
- Timestamp:
- Apr 15, 2011, 4:09:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/mail_super.inc.php
r10179 r10385 20 20 // | USA. | 21 21 // +-----------------------------------------------------------------------+ 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."/");29 22 30 23 class mail_supervisor { … … 46 39 */ 47 40 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"; 52 48 if (PHPWG_VERSION < 2.2 ) { 53 49 $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 59 51 } 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 64 54 } 65 55 if(isset($_GET['action_spam']) and $_GET['action_spam']=="no"){ 66 $action_spam = pwg_get_session_var('action_spam') ;67 56 pwg_set_session_var('action_spam', "false"); 68 57 unset ($_SESSION['pwg_'.'action_spam']); 69 58 } 70 71 59 $action_spam=pwg_get_session_var('action_spam'); 72 60 $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.'" />'); 84 70 $template->parse( 'mail_superv_init', false); 85 86 71 return ;// 87 72 }// function init … … 190 175 ob_start(); 191 176 echo '<pre>'; 177 if(count($variables)>1){ 192 178 foreach($variables as $key => $line){ 193 179 echo $key . " => " . $line ; 194 180 echo "<br />"; 195 181 } 182 }else{ 183 echo "<i>".$variables."</i><br />"; 184 } 185 196 186 $m= ob_get_contents(); 197 187 ob_end_clean();
Note: See TracChangeset
for help on using the changeset viewer.