$link_url = ''; } else { $filename = ''; } } break; } } break; } //end of second switch($action) (when POST['formSent'] was not set, yet) } // end of "else" in if($_POST['formSent']) condition } else { //if $action is empty, then prepare a list of the course categories to display (?) $Categories = CourseCategory::getCategoriesToDisplayInHomePage(); } // Display section Display::display_header($tool_name); switch ($action) { case 'open_link': if (!empty($link)) { // $link is only set in case of action=open_link and is filtered $open = @(string) file_get_contents($homep . $link); $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); echo $open; } break; case 'edit_notice': // Display for edit_notice case ?>