diff --git a/main/template/default/layout/layout_2_col.tpl b/main/template/default/layout/layout_2_col.tpl index 1c6c89cc8c..7659dc8fc2 100644 --- a/main/template/default/layout/layout_2_col.tpl +++ b/main/template/default/layout/layout_2_col.tpl @@ -5,9 +5,14 @@ {/block} {block name=body} + {if $show_sniff == 1 } + {include file="default/layout/sniff.tpl"} + {/if}
+ {$plugin_courses_block} {$home_page_block} + {$sniff_notification} {$content} {$announcements_block}
diff --git a/main/template/default/layout/sniff.tpl b/main/template/default/layout/sniff.tpl new file mode 100644 index 0000000000..84cb1e64ee --- /dev/null +++ b/main/template/default/layout/sniff.tpl @@ -0,0 +1,134 @@ +{literal} + +{/literal} + +
+ + + + + + + + + + +
+{if empty($smarty.post.sniff_navigator) } + +{/if} \ No newline at end of file diff --git a/user_portal.php b/user_portal.php index da19248690..6b8815ea3c 100755 --- a/user_portal.php +++ b/user_portal.php @@ -184,143 +184,7 @@ if ($load_dirs) { } /* Sniffing system */ -//by Juan Carlos RaƱa Trabado -?> - - -
- - - - - - - - - - -
- -'; - echo 'sendSniff();'; - echo ''; -} //store posts to sessions $_SESSION['sniff_screen_size_w']=Security::remove_XSS($_POST['sniff_navigator_screen_size_w']); @@ -333,17 +197,6 @@ $_SESSION['sniff_check_some_plugins']=Security::remove_XSS($_POST['sniff_navigat $_SESSION['sniff_java']=Security::remove_XSS($_POST['sniff_navigator_java']); $_SESSION['sniff_java_sun_ver']=Security::remove_XSS($_POST['sniff_navigator_java_sun_ver']); -//var_dump($_SESSION); - -// end sniffing system - -//check for flash and message -if (stripos("flash_yes", $_SESSION['sniff_check_some_activex'])===0 || stripos("flash_yes", $_SESSION['sniff_check_some_plugins'])===0){ - - Display::display_warning_message(get_lang('NoFlash'),false); -} - - /* MAIN CODE */ $controller = new IndexManager(get_lang('MyCourses')); @@ -368,6 +221,15 @@ ob_get_clean(); // $controller->tpl->assign('content', $courses_and_sessions); +$controller->tpl->assign('show_sniff', 1); + +$sniff_notification = ''; +//check for flash and message +if (stripos("flash_yes", $_SESSION['sniff_check_some_activex'])===0 || stripos("flash_yes", $_SESSION['sniff_check_some_plugins'])===0){ + $sniff_notification = Display::return_message(get_lang('NoFlash'), 'warning', false); + $controller->tpl->assign('sniff_notification', $sniff_notification); +} + $controller->tpl->assign('plugin_courses_block', $controller->return_courses_main_plugin()); $controller->tpl->assign('profile_block', $controller->return_profile_block()); $controller->tpl->assign('account_block', $controller->return_account_block());