[ Index ] |
|
Code source de Claroline 188 |
1 <?php // $Id: index.php,v 1.63.2.3 2007/10/15 10:01:47 mathieu Exp $ 2 /** 3 * CLAROLINE 4 ****************************************************************************** 5 * Campus Home Page 6 * 7 * @version 1.8 $Revision: 1.63.2.3 $ 8 * 9 * @copyright (c) 2001-2007 Universite catholique de Louvain (UCL) 10 * 11 * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE 12 * 13 * @package CLINDEX 14 * 15 * @author Claro Team <cvs@claroline.net> 16 * 17 */ 18 19 unset($includePath); // prevent hacking 20 21 // Flag forcing the 'current course' reset, as we're not anymore inside a course 22 23 $cidReset = TRUE; 24 $tidReset = TRUE; 25 26 // Include Library and configuration file 27 28 require './claroline/inc/claro_init_global.inc.php'; // main init 29 include claro_get_conf_repository() . 'CLHOME.conf.php'; // conf file 30 31 require_once get_path('incRepositorySys') . '/lib/courselist.lib.php'; // conf file 32 33 // CLAROLINE HEADER AND BANNER 34 require get_path('incRepositorySys') . '/claro_init_header.inc.php'; 35 36 echo '<table width="100%" border="0" cellpadding="4">' . "\n" 37 . '<tr>' . "\n" 38 . '<td valign="top">' . "\n" 39 ; 40 41 // INTRODUCTION MESSAGE 42 43 $displayIntroMessage = (bool) ! isset($_REQUEST['category']) || ! get_conf('homepage_hide_introduction_messages_on_course_categories_page',false); 44 45 if ( $displayIntroMessage ) 46 { 47 if ( file_exists('./textzone_top.inc.html') ) 48 { 49 include './textzone_top.inc.html'; 50 } 51 else 52 { 53 echo '<div style="text-align: center">' 54 . '<img src="./claroline/img/logo.gif" border="0" alt="Claroline logo" />' . "\n" 55 . '<p><strong>Claroline Open Source e-Learning</strong></p>' . "\n" 56 . '</div>' 57 ; 58 59 if(claro_is_platform_admin()) 60 { 61 echo '<p>' 62 . get_lang('blockTextZoneHelp', array('%textZoneFile' => 'textzone_top.inc.html')) 63 . '</p>' . "\n"; 64 } 65 } 66 67 if( claro_is_platform_admin() ) 68 { 69 echo '<p>' 70 . '<a href="claroline/admin/managing/editFile.php?cmd=rqEdit&file=0">' 71 . '<img src="claroline/img/edit.gif" alt="" />' 72 . get_lang('Edit text zone') 73 . '</a>' 74 . '</p>' . "\n" 75 ; 76 } 77 78 if(claro_is_user_authenticated()) 79 { 80 if ( file_exists('./platform/textzone/textzone_top.authenticated.inc.html') ) 81 { 82 include './platform/textzone/textzone_top.authenticated.inc.html'; 83 84 if( claro_is_platform_admin() ) 85 { 86 echo '<p>' 87 . '<a href="claroline/admin/managing/editFile.php?cmd=rqEdit&file=2">' 88 . '<img src="claroline/img/edit.gif" alt="" />' . get_lang('Edit text zone') 89 . '</a>' 90 . '</p>' . "\n"; 91 } 92 } 93 94 } 95 else 96 { 97 if ( file_exists('./platform/textzone/textzone_top.anonymous.inc.html') ) 98 { 99 include './platform/textzone/textzone_top.anonymous.inc.html'; 100 } 101 102 } 103 } 104 105 // Dock - Campus homepage - Top 106 107 $campusHomePageTop = new Dock('campusHomePageTop'); 108 109 echo $campusHomePageTop->render(); 110 111 if ( claro_is_user_authenticated() ) 112 { 113 /** 114 * Commands line 115 */ 116 $userCommands = array(); 117 118 $userCommands[] = '<a href="' . $_SERVER['PHP_SELF'] . '" class="claroCmd">' 119 . '<img src="' . get_path('imgRepositoryWeb') . 'course.gif" alt="" /> ' 120 . get_lang('My course list') 121 . '</a>'; 122 123 if (claro_is_allowed_to_create_course()) // 'Create Course Site' command. Only available for teacher. 124 { 125 $userCommands[] = '<a href="claroline/course/create.php" class="claroCmd">' 126 . '<img src="' . get_path('imgRepositoryWeb') . 'course.gif" alt="" /> ' 127 . get_lang('Create a course site') 128 . '</a>'; 129 } 130 131 if (get_conf('allowToSelfEnroll',true)) 132 { 133 $userCommands[] = '<a href="claroline/auth/courses.php?cmd=rqReg&category=" class="claroCmd">' 134 . '<img src="' . get_path('imgRepositoryWeb') . 'enroll.gif" alt="" /> ' 135 . get_lang('Enrol on a new course') 136 . '</a>'; 137 138 $userCommands[] = '<a href="claroline/auth/courses.php?cmd=rqUnreg" class="claroCmd">' 139 . '<img src="' . get_path('imgRepositoryWeb') . 'unenroll.gif" alt="" /> ' 140 . get_lang('Remove course enrolment') 141 . '</a>'; 142 } 143 144 $userCommands[] = '<a href="'.$_SERVER['PHP_SELF'].'?category=" class="claroCmd">' 145 . '<img src="' . get_path('imgRepositoryWeb') . 'course.gif" alt="" /> ' 146 . get_lang('All platform courses') 147 . '</a>' 148 ; 149 150 echo '<p>' . claro_html_menu_horizontal($userCommands) . '</p>' . "\n"; 151 } 152 153 if ( claro_get_current_user_id() ) 154 { 155 if ( isset($_REQUEST['category']) || (isset($_REQUEST['cmd']) && $_REQUEST['cmd'] == 'search' ) ) 156 { 157 // DISPLAY PLATFORM COURSE LIST and search result 158 require get_path('incRepositorySys') . '/index_platformcourses.inc.php'; 159 } 160 else 161 { 162 // DISPLAY USER OWN COURSE LIST 163 require get_path('incRepositorySys') . '/index_mycourses.inc.php'; 164 } 165 } 166 else 167 { 168 event_open(); 169 170 if ( ! get_conf('course_categories_hidden_to_anonymous',false) ) 171 { 172 // DISPLAY PLATFORM COURSE LIST 173 require get_path('incRepositorySys') . '/index_platformcourses.inc.php'; 174 } 175 } 176 177 // Dock - Campus homepage - Bottom 178 179 $campusHomePageBottom = new Dock('campusHomePageBottom'); 180 181 echo $campusHomePageBottom->render(); 182 183 echo '</td>' . "\n" 184 . '<td width="200" valign="top" class="claroRightMenu">' 185 ; 186 187 if ( claro_is_user_authenticated() ) 188 { 189 // DISPLAY CROSS COURSE DIGEST FOR USER 190 require get_path('incRepositorySys') . '/index_mydigest.inc.php'; 191 } 192 else 193 { 194 // Display preferred language form 195 echo claro_display_preferred_language_form(); 196 197 // DISPLAY LOGIN FORM 198 require get_path('incRepositorySys') . '/index_loginzone.inc.php'; 199 } 200 201 //RIGHT MENU DOCK declaration 202 203 $homePageRightMenu = new Dock('campusHomePageRightMenu'); 204 205 echo $homePageRightMenu->render(); 206 207 //Include right text zone, if there is any 208 if ( file_exists('./textzone_right.inc.html') ) 209 { 210 include './textzone_right.inc.html'; 211 } 212 elseif(claro_is_platform_admin()) 213 { 214 echo '<p>' 215 . get_lang('blockTextZoneHelp', array('%textZoneFile' => 'textzone_right.inc.html')) 216 . '</p>' . "\n"; 217 } 218 219 if(claro_is_platform_admin()) 220 { 221 echo '<p>' 222 . '<a href="claroline/admin/managing/editFile.php?cmd=rqEdit&file=3">' 223 . '<img src="claroline/img/edit.gif" alt="" />' . get_lang('Edit text zone') 224 . '</a>' 225 . '</p>' . "\n"; 226 } 227 228 ?> 229 230 </td> 231 </tr> 232 </table> 233 234 <?php 235 236 /* 237 * CLAROLINE FOOTER 238 */ 239 240 require get_path('incRepositorySys') . '/claro_init_footer.inc.php'; 241 242 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 14:38:42 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |