From a73754d20ffb384b2b3882b5a4bf107b9d46be71 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 4 May 2009 22:32:16 +0200 Subject: [PATCH] [svn r20297] Minor - UI improvement, also adding some Database::escape_string see FS#3772 --- index.php | 99 ++++++++++++++++++++++++------------------------- user_portal.php | 42 +++++++++++---------- 2 files changed, 71 insertions(+), 70 deletions(-) diff --git a/index.php b/index.php index d4fe1b5c54..62b97ea485 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ -, Ghent University, Refactoring -* @version $Id: index.php 20032 2009-04-23 21:04:45Z juliomontoya $ +* @version $Id: index.php 20297 2009-05-04 20:32:16Z juliomontoya $ * @todo check the different @todos in this page and really do them * @todo check if the news management works as expected */ @@ -98,14 +98,11 @@ $track_login_table = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_L $_setting['display_courses_to_anonymous_users'] = 'true'; /** @todo remove this piece of code because this is not used */ -if (isset ($_user['user_id'])) { +if (isset($_user['user_id'])) { $nameTools = api_get_setting('siteName'); } - - - /* ============================================================================== LOGIN @@ -390,51 +387,11 @@ function display_anonymous_right_menu() { } } - /*** hide right menu "general" and other parts on anonymous right menu *****/ - echo "
", "".get_lang("MenuGeneral").""; - echo "'; - echo '
'; - - if ($_user['user_id'] && api_number_of_plugins('campushomepage_menu') > 0) { - echo '
'; - api_plugin('campushomepage_menu'); - echo '
'; - } - /** - * User section - */ + // My Account section if (isset($_SESSION['_user']['user_id']) && $_SESSION['_user']['user_id']!=0) { // tabs that are deactivated are added here - if (!empty($menu_navigation)) { - echo "
"; - echo "".get_lang("MainNavigation").""; - echo ""; - echo '
'; - } + $show_menu=false; $show_create_link=false; @@ -469,8 +426,50 @@ function display_anonymous_right_menu() { echo ""; echo ""; } - } + if (!empty($menu_navigation)) { + echo "
"; + echo "".get_lang("MainNavigation").""; + echo ""; + echo '
'; + } + } + + // help ection + /*** hide right menu "general" and other parts on anonymous right menu *****/ + echo "
", "".get_lang("MenuGeneral").""; + echo "'; + echo '
'; + + if ($_user['user_id'] && api_number_of_plugins('campushomepage_menu') > 0) { + echo '
'; + api_plugin('campushomepage_menu'); + echo '
'; + } + // includes for any files to be displayed below anonymous right menu if (!file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_exists($home.'home_notice.html') && file_get_contents($home.'home_notice.html')!='') { @@ -565,7 +564,7 @@ function display_anonymous_course_list() { //init $user_identified = (api_get_user_id()>0 && !api_is_anonymous()); $web_course_path = api_get_path(WEB_COURSE_PATH); - $category = $_GET["category"]; + $category = Databas::escape_string($_GET['category']); global $setting_show_also_closed_courses; // Database table definitions diff --git a/user_portal.php b/user_portal.php index 4676659850..4d0ce922b3 100644 --- a/user_portal.php +++ b/user_portal.php @@ -1,4 +1,4 @@ -'; + echo '