index-smarty.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * @package chamilo.main
  5. */
  6. define('CHAMILO_HOMEPAGE', true);
  7. $language_file = array('courses', 'index');
  8. /* Flag forcing the 'current course' reset, as we're not inside a course anymore. */
  9. // Maybe we should change this into an api function? an example: Coursemanager::unset();
  10. $cidReset = true;
  11. /* Included libraries */
  12. // The section (for the tabs).
  13. $this_section = SECTION_CAMPUS;
  14. require_once 'main/inc/global.inc.php';
  15. require_once api_get_path(LIBRARY_PATH).'userportal.lib.php';
  16. $header_title = null;
  17. if (!api_is_anonymous()) {
  18. $header_title = " ";
  19. }
  20. $index = new IndexManager($header_title);
  21. $tpl = $index->tpl->get_template('layout/layout_two_col.tpl');
  22. $user_id = api_get_user_id();
  23. //@todo move this inside the IndexManager
  24. $index->tpl->assign('login_block', $index->show_login_form($user_id));
  25. $index->tpl->assign('teacher_block', $index->display_teacher_link($user_id));
  26. $index->tpl->assign('home_page', $index->return_home_page());
  27. $index->tpl->assign('profile_block', $index->return_profile_block());
  28. $index->tpl->assign('notice_block', $index->return_notice($home));
  29. $index->tpl->assign('plugin_campushomepage', $index->return_plugin_campushomepage());
  30. $index->tpl->display($tpl);